idm

package
Version: v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewParser

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

Types

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 {
	crc.CRC
	// 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)

Source Files

Jump to

Keyboard shortcuts

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