idm

package
Version: 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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPacketConfig

func NewPacketConfig(symbolLength int) (cfg decode.PacketConfig)

func NewParser

func NewParser(symbolLength, decimation int) (p parse.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 added in v0.6.2

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

func (IDM) Checksum added in v0.7.1

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 {
	decode.Decoder
	crc.CRC
}

func (*Parser) Cfg added in v0.6.1

func (p *Parser) Cfg() *decode.PacketConfig

func (Parser) Dec added in v0.6.1

func (p Parser) Dec() decode.Decoder

func (Parser) Parse

func (p Parser) Parse(indices []int) (msgs []parse.Message)

Source Files

Jump to

Keyboard shortcuts

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