r900

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: AGPL-3.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

View Source
const (
	PayloadSymbols = 42
)

Variables

This section is empty.

Functions

func NewPacketConfig

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

func NewParser

func NewParser(chipLength int) protocol.Parser

Types

type Parser

type Parser struct {
	*protocol.Decoder
	// 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)

Given a list of indices the preamble exists at, decode and parse a message.

func (*Parser) SetDecoder added in v0.9.0

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

type R900

type R900 struct {
	ID          uint32 `xml:",attr"` // 32 bits
	Unkn1       uint8  `xml:",attr"` // 8 bits
	NoUse       uint8  `xml:",attr"` // 6 bits, day bins of no use
	BackFlow    uint8  `xml:",attr"` // 2 bits, backflow past 35d hi/lo
	Consumption uint32 `xml:",attr"` // 24 bits
	Unkn3       uint8  `xml:",attr"` // 2 bits
	Leak        uint8  `xml:",attr"` // 4 bits, day bins of leak
	LeakNow     uint8  `xml:",attr"` // 2 bits, leak past 24h hi/lo
	// contains filtered or unexported fields
}

func (R900) Checksum added in v0.7.1

func (r900 R900) Checksum() []byte

func (R900) MeterID

func (r900 R900) MeterID() uint32

func (R900) MeterType

func (r900 R900) MeterType() uint8

func (R900) MsgType

func (r900 R900) MsgType() string

func (R900) Record

func (r900 R900) Record() (r []string)

func (R900) String

func (r900 R900) String() string

Directories

Path Synopsis
Package gf implements arithmetic over Galois Fields.
Package gf implements arithmetic over Galois Fields.

Jump to

Keyboard shortcuts

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