devices

package
v0.0.0-...-09b1dbd Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DCDCErrors

func DCDCErrors() map[uint8]string

func DCDCOffReasons

func DCDCOffReasons() map[uint32]string

func DCDCOperationMode

func DCDCOperationMode() map[uint8]string

from ve direct protocol

func ReadBatteryMonitor

func ReadBatteryMonitor(record []byte, data *BatteryMonitorReading) error

func ReadDCDCCharger

func ReadDCDCCharger(record []byte, data *DCDCChargerReading) error

Types

type BatteryMonitor

type BatteryMonitor struct {
	// contains filtered or unexported fields
}

func NewBatteryMonitor

func NewBatteryMonitor(d Device, handler func(BatteryMonitorReading)) *BatteryMonitor

func (*BatteryMonitor) Handle

func (d *BatteryMonitor) Handle(ad scanner.Advertisement)

type BatteryMonitorReading

type BatteryMonitorReading struct {
	RemainingMinutes uint
	Voltage          float64
	Current          float64
}

type DCDCCharger

type DCDCCharger struct {
	// contains filtered or unexported fields
}

func NewDCDCCharger

func NewDCDCCharger(d Device, handler func(DCDCChargerReading)) *DCDCCharger

func (*DCDCCharger) Handle

func (d *DCDCCharger) Handle(ad scanner.Advertisement)

type DCDCChargerReading

type DCDCChargerReading struct {
	InputVoltage  float64
	OutputVoltage float64
	Mode, Error   string
	OffReasons    []string
}

type Device

type Device struct {
	Addr string
	Key  []byte
}

Jump to

Keyboard shortcuts

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