Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyChecksum ¶ added in v0.4.0
Types ¶
type ChecksumError ¶
func (*ChecksumError) Error ¶
func (e *ChecksumError) Error() string
type Event ¶ added in v0.3.0
type Event struct {
Pos lexer.Position `parser:""`
Timestamp *Timestamp `parser:"'(' @@ ')'"`
Value *Measurement `parser:"'(' @@ ( ')' (?='(') )?"`
}
Event represents a timestamp+duration.
type EventLog ¶ added in v0.3.0
type EventLog struct {
Pos lexer.Position `parser:""`
Count *Number `parser:"@@ ')'"`
OBIS *OBIS `parser:"'(' @@ ( ')' (?='(') )?"`
Value []*Event `parser:"@@*"`
}
EventLog represents a log of events.
type Measurement ¶
type Measurement struct {
Pos lexer.Position `parser:""`
Value *Number `parser:"@@"`
Unit *String `parser:"'*' @@"`
}
Measurement represents a number+unit.
func (*Measurement) Position ¶ added in v0.3.0
func (m *Measurement) Position() lexer.Position
type Object ¶ added in v0.3.0
type Object struct {
Pos lexer.Position `parser:""`
OBIS *OBIS `parser:"@@"`
Value Value `parser:"'(' @@* ')' (?=EOL)"`
}
Object is a COSEM object in the Telegram represented by the OBIS (Object Identification System) and one or more attributes.
type String ¶ added in v0.3.0
type String struct {
Pos lexer.Position `parser:""`
// Also check for `EOL` token so both Header and Footer
// can use this Value struct as well.
Value string `parser:"@(~(')' | EOL)+)"`
}
String literal.
type Telegram ¶
type Telegram struct {
Pos lexer.Position `parser:""`
Header *Header `parser:"@@"`
Data Data `parser:"@@*"`
}
Struct for telegram data.
Click to show internal directories.
Click to hide internal directories.