parse

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2016 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeFormat = "2006-01-02T15:04:05.000"
)

Variables

This section is empty.

Functions

func Register added in v0.7.1

func Register(name string, parserFn NewParserFunc)

Types

type Data

type Data struct {
	Bits  string
	Bytes []byte
}

func NewDataFromBits

func NewDataFromBits(data string) (d Data)

func NewDataFromBytes

func NewDataFromBytes(data []byte) (d Data)

type FilterChain added in v0.7.1

type FilterChain []MessageFilter

func (*FilterChain) Add added in v0.7.1

func (fc *FilterChain) Add(filter MessageFilter)

func (FilterChain) Match added in v0.7.1

func (fc FilterChain) Match(msg Message) bool

type LogMessage

type LogMessage struct {
	Time   time.Time
	Offset int64
	Length int
	Message
}

func (LogMessage) Record

func (msg LogMessage) Record() (r []string)

func (LogMessage) String

func (msg LogMessage) String() string

func (LogMessage) StringNoOffset

func (msg LogMessage) StringNoOffset() string

type Message

type Message interface {
	csv.Recorder
	MsgType() string
	MeterID() uint32
	MeterType() uint8
	Checksum() []byte
}

type MessageFilter added in v0.7.1

type MessageFilter interface {
	Filter(Message) bool
}

type NewParserFunc added in v0.7.1

type NewParserFunc func(symbolLength, decimation int) Parser

type Parser

type Parser interface {
	Parse([]int) []Message
	Dec() decode.Decoder
	Cfg() *decode.PacketConfig
	Log()
}

func NewParser added in v0.7.1

func NewParser(name string, symbolLength, decimation int) (Parser, error)

Jump to

Keyboard shortcuts

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