bottle

package
v0.10.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VERSION string
	Min     = regexp.MustCompile(`([a-zA-Z0-9]{4})([0-9]{2})([0-9]{3})([0-9]{2})([0-9]{2})([a-zA-Z0-9]{3})(.*)`)
	Hour    = regexp.MustCompile(`([a-zA-Z0-9]{4})([0-9]{2})([0-9]{3})([0-9]{2})(.*)`)
	Day     = regexp.MustCompile(`([a-zA-Z0-9]{4})([0-9]{2})([0-9]{3})(.*)`)
)

SSSSYYDDD<source>[<channel>][<gain>] SSSSYYDDDHHCH? SSSSYYDDDHHMMCH?_20

Functions

This section is empty.

Types

type Bottle3DFloat64

type Bottle3DFloat64 struct {
	DataType   string
	TimeSeries string
	Time       time.Time
	Value      float64
	Quality    string
	Level      string
	Version    time.Time
}
type Header struct {
	MagicNum      int16
	Reserved      int16
	HeaderSize    int32
	StartTimeUnix float64
	Interval      float32
	Length        int32
	Type          int32
	Invalid       int32
	Reserved2     int32
	BottleID      int32
}

func (Header) Duration

func (header Header) Duration() time.Duration

func (Header) StartTime

func (header Header) StartTime() time.Time

type Scanner

type Scanner struct {
	Reader   *bufio.Reader
	Header   Header
	Order    binary.ByteOrder
	DataType string
}

func NewScanner

func NewScanner(r io.Reader, filePath string) (scanner Scanner, err error)

func (Scanner) Scan

func (scanner Scanner) Scan() (bSlice []Bottle3DFloat64, err error)

func (Scanner) ScanHeader

func (scanner Scanner) ScanHeader() (header Header, order binary.ByteOrder, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL