Documentation
¶
Index ¶
- Constants
- func ZehnderVersionDecode(val uint32) []int
- type MsgType
- type PDOSensor
- type PDOValue
- func (pv PDOValue) Float() float64
- func (pv PDOValue) GetData() interface{}
- func (pv PDOValue) IsBool() bool
- func (pv PDOValue) IsFloat() bool
- func (pv PDOValue) IsSigned() bool
- func (pv PDOValue) IsString() bool
- func (pv PDOValue) Number() uint
- func (pv PDOValue) SignedNumber() int
- func (pv PDOValue) String() string
- type ZehnderCanMessage
- type ZehnderDestination
- type ZehnderDevice
- func (dev *ZehnderDevice) CaptureAll(fn string) error
- func (dev *ZehnderDevice) Connect(interfaceName string) error
- func (dev *ZehnderDevice) DumpPDO()
- func (dev *ZehnderDevice) ProcessDumpFile(filename string) (err error)
- func (dev *ZehnderDevice) RequestPDO(prod byte, pdo uint16, interval byte)
- func (dev *ZehnderDevice) RequestPDOBySlug(prod byte, pdoSlug string, interval byte) error
- func (dev *ZehnderDevice) SetDefaultRMICallback(fn func(*ZehnderRMI))
- func (dev *ZehnderDevice) Start() error
- func (dev *ZehnderDevice) StartHttpServer(host string, port int)
- func (dev *ZehnderDevice) Stop()
- func (dev *ZehnderDevice) Wait()
- type ZehnderRMI
- type ZehnderType
- type ZehnderTypeFlag
Constants ¶
View Source
const ( UNIT_WATT = "W" UNIT_KWH = "kWh" UNIT_CELCIUS = "°C" UNIT_PERCENT = "%" UNIT_RPM = "rpm" UNIT_M3H = "m³/h" UNIT_SECONDS = "seconds" UNIT_UNKNOWN = "unknown" UNIT_DAYS = "Days" )
Variables ¶
This section is empty.
Functions ¶
func ZehnderVersionDecode ¶
Types ¶
type PDOSensor ¶
type PDOSensor struct { Name string Units string DataType ZehnderType DecimalPlaces int // contains filtered or unexported fields }
type PDOValue ¶
func (PDOValue) SignedNumber ¶
type ZehnderCanMessage ¶
type ZehnderCanMessage struct { CanId uint32 NodeId uint32 Data [8]byte Length uint8 Remote bool // contains filtered or unexported fields }
func MessageFromFrame ¶
func MessageFromFrame(frame can.Frame) ZehnderCanMessage
func (ZehnderCanMessage) String ¶
func (msg ZehnderCanMessage) String() string
type ZehnderDestination ¶
func NewZehnderDestination ¶
func NewZehnderDestination(node byte, unit byte, subunit byte) ZehnderDestination
func (ZehnderDestination) GetMultiple ¶
func (zr ZehnderDestination) GetMultiple(dev *ZehnderDevice, props []byte, flags ZehnderTypeFlag, cbFn func(*ZehnderRMI))
func (ZehnderDestination) GetOne ¶
func (zr ZehnderDestination) GetOne(dev *ZehnderDevice, prop byte, flags ZehnderTypeFlag, cbFn func(*ZehnderRMI))
func (ZehnderDestination) SetOne ¶
func (zr ZehnderDestination) SetOne(dev *ZehnderDevice, prop byte, value []byte)
type ZehnderDevice ¶
type ZehnderDevice struct { Name string NodeID byte Connected bool Model string SerialNumber string SoftwareVersion string // contains filtered or unexported fields }
func NewZehnderDevice ¶
func NewZehnderDevice(id byte) *ZehnderDevice
func (*ZehnderDevice) CaptureAll ¶
func (dev *ZehnderDevice) CaptureAll(fn string) error
func (*ZehnderDevice) Connect ¶
func (dev *ZehnderDevice) Connect(interfaceName string) error
func (*ZehnderDevice) DumpPDO ¶
func (dev *ZehnderDevice) DumpPDO()
func (*ZehnderDevice) ProcessDumpFile ¶
func (dev *ZehnderDevice) ProcessDumpFile(filename string) (err error)
func (*ZehnderDevice) RequestPDO ¶
func (dev *ZehnderDevice) RequestPDO(prod byte, pdo uint16, interval byte)
func (*ZehnderDevice) RequestPDOBySlug ¶
func (dev *ZehnderDevice) RequestPDOBySlug(prod byte, pdoSlug string, interval byte) error
func (*ZehnderDevice) SetDefaultRMICallback ¶
func (dev *ZehnderDevice) SetDefaultRMICallback(fn func(*ZehnderRMI))
func (*ZehnderDevice) Start ¶
func (dev *ZehnderDevice) Start() error
func (*ZehnderDevice) StartHttpServer ¶
func (dev *ZehnderDevice) StartHttpServer(host string, port int)
func (*ZehnderDevice) Stop ¶
func (dev *ZehnderDevice) Stop()
func (*ZehnderDevice) Wait ¶
func (dev *ZehnderDevice) Wait()
type ZehnderRMI ¶
type ZehnderRMI struct { SourceId byte DestId byte Sequence byte Counter byte IsMulti bool IsRequest bool IsError bool Data []byte DataLength int // contains filtered or unexported fields }
func (*ZehnderRMI) GetData ¶
func (zrmi *ZehnderRMI) GetData(typ ZehnderType) (rv any, err error)
func (ZehnderRMI) MakeCANId ¶
func (zrmi ZehnderRMI) MakeCANId() uint32
type ZehnderType ¶
type ZehnderType int
const ( CN_BOOL ZehnderType = iota // 00 (false), 01 (true) CN_UINT8 // 00 (0) until ff (255) CN_UINT16 // 3412 = 1234 CN_UINT32 // 7856 3412 = 12345678 CN_INT8 CN_INT16 //3412 = 1234 CN_INT64 CN_STRING CN_TIME CN_VERSION )
type ZehnderTypeFlag ¶
type ZehnderTypeFlag byte
const ( ZehnderRMITypeNoValue ZehnderTypeFlag = 0x00 ZehnderRMITypeActualValue ZehnderTypeFlag = 0x10 ZehnderRMITypeRange ZehnderTypeFlag = 0x20 ZehnderRMITypeStepSize ZehnderTypeFlag = 0x40 )
Click to show internal directories.
Click to hide internal directories.