netidm

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: AGPL-3.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPacketConfig

func NewPacketConfig(chipLength int) (cfg protocol.PacketConfig)

func NewParser

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

Types

type Interval

type Interval [27]uint16

func (Interval) Record

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

type NetIDM

type NetIDM struct {
	Preamble                         uint32 // Training and Frame sync.
	ProtocolID                       uint8
	PacketLength                     uint8 // Packet Length MSB
	HammingCode                      uint8 // Packet Length LSB
	ApplicationVersion               uint8
	ERTType                          uint8
	ERTSerialNumber                  uint32
	ConsumptionIntervalCount         uint8
	ProgrammingState                 uint8
	LastGeneration                   uint32
	LastConsumption                  uint32
	LastConsumptionNet               uint32
	DifferentialConsumptionIntervals Interval // 53 Bytes
	TransmitTimeOffset               uint16
	SerialNumberCRC                  uint16
	PacketCRC                        uint16
}

Net Meter Interval Data Message

func NewNetIDM

func NewNetIDM(data protocol.Data) (netidm NetIDM)

func (NetIDM) Checksum

func (netidm NetIDM) Checksum() []byte

func (NetIDM) MeterID

func (netidm NetIDM) MeterID() uint32

func (NetIDM) MeterType

func (netidm NetIDM) MeterType() uint8

func (NetIDM) MsgType

func (netidm NetIDM) MsgType() string

func (NetIDM) Record

func (netidm NetIDM) Record() (r []string)

func (NetIDM) String

func (netidm NetIDM) String() 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(d *protocol.Decoder)

Jump to

Keyboard shortcuts

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