protocol

package
v0.0.0-...-38ef4c5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateChecksum

func CalculateChecksum(data []byte)

func ConvertToByte

func ConvertToByte(d DataPoint) []byte

func VerifyChecksum

func VerifyChecksum(data []byte) error

Types

type DataPoint

type DataPoint struct {
	Date        time.Time
	DC          Measurement
	AC          Measurement
	Temperature float32
	HeatFlux    float32
	EnergyDay   float32
	EnergyTotal float32
}

func Convert

func Convert(data []byte) (DataPoint, error)

type Error

type Error struct {
	Date time.Time
	Code byte
}

type Measurement

type Measurement struct {
	Voltage float32
	Current float32
	Power   float32
}

Jump to

Keyboard shortcuts

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