Documentation ¶
Index ¶
Constants ¶
View Source
const ( STATUS_RX_PENDING = 0x01 STATUS_TX_PENDING = 0x02 STATUS_UNDEF_0 = 0x04 STATUS_UNDEF_1 = 0x08 STATUS_ERROR = 0x10 STATUS_FAULT = 0x20 STATUS_POWERED = 0x40 STATUS_CAN_RES = 0x80 )
Variables ¶
View Source
var StatusStrings = [...]string{
"rx-pending",
"tx-pending",
"undefined_0",
"undefined_1",
"driver error",
"electric fault",
"powered",
"resistor",
}
Functions ¶
This section is empty.
Types ¶
type Information ¶
type Information struct { Type [8]byte Signature [4]byte VersionMajor byte VersionMinor byte ChipId [12]byte }
Information
func (*Information) MarshalJSON ¶
func (di *Information) MarshalJSON() ([]byte, error)
func (*Information) String ¶
func (di *Information) String() string
type PowerStatus ¶
type PowerStatus struct { Status StatusByte `json:"status"` Voltage float32 `json:"voltage"` CurrentSense uint16 `json:"current_sense"` RefLevel float32 `json:"reference_voltage"` }
PowerStatus
type StatusByte ¶
type StatusByte byte
StatusByte
func (StatusByte) MarshalJSON ¶
func (s StatusByte) MarshalJSON() ([]byte, error)
func (StatusByte) String ¶
func (s StatusByte) String() string
func (StatusByte) Strings ¶
func (s StatusByte) Strings() []string
Click to show internal directories.
Click to hide internal directories.