device

package
v0.0.0-...-947ae56 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: MIT Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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