v0.0.0-...-61b8281 Latest Latest

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

Go to latest
Published: Feb 25, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0




This section is empty.


This section is empty.


func NewParser

func NewParser(chipLength int) (p protocol.Parser)


type IDM

type IDM struct {
	Preamble                         uint32 // Training and Frame sync.
	PacketTypeID                     uint8
	PacketLength                     uint8 // Packet Length MSB
	HammingCode                      uint8 // Packet Length LSB
	ApplicationVersion               uint8
	ERTType                          uint8
	ERTSerialNumber                  uint32
	ConsumptionIntervalCount         uint8
	ModuleProgrammingState           uint8
	TamperCounters                   []byte // 6 Bytes
	AsynchronousCounters             uint16
	PowerOutageFlags                 []byte // 6 Bytes
	LastConsumptionCount             uint32
	DifferentialConsumptionIntervals Interval // 53 Bytes
	TransmitTimeOffset               uint16
	SerialNumberCRC                  uint16
	PacketCRC                        uint16

Standard Consumption Message

func NewIDM

func NewIDM(data protocol.Data) (idm IDM)

func (IDM) Checksum

func (idm IDM) Checksum() []byte

func (IDM) MeterID

func (idm IDM) MeterID() uint32

func (IDM) MeterType

func (idm IDM) MeterType() uint8

func (IDM) MsgType

func (idm IDM) MsgType() string

func (IDM) Record

func (idm IDM) Record() (r []string)

func (IDM) String

func (idm IDM) String() string

type Interval

type Interval [47]uint16

func (Interval) Record

func (interval Interval) Record() (r []string)

type Parser

type Parser struct {
	// contains filtered or unexported fields

func (Parser) Cfg

func (p Parser) Cfg() protocol.PacketConfig

func (Parser) Parse

func (p Parser) Parse(pkts []protocol.Data, msgCh chan protocol.Message, wg *sync.WaitGroup)

func (Parser) SetDecoder

func (p Parser) SetDecoder(*protocol.Decoder)

Jump to

Keyboard shortcuts

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