Documentation
¶
Overview ¶
Package device provides a framework for managing hardware devices with support for messaging, periodic operations, and state management. Devices can be controlled via MQTT messages and can publish their state and data periodically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("device not found") ErrDeviceExists = errors.New("device already exists") ErrTypeMismatch = errors.New("device registered with different type") ErrTypeNotImplemented = errors.New("method not implemented") )
View Source
var (
ErrNotImplemented = errors.New("Method is not implemented")
)
Functions ¶
Types ¶
type DeviceManager ¶
type DeviceManager struct {
// contains filtered or unexported fields
}
func NewDeviceManager ¶
func NewDeviceManager() *DeviceManager
type DeviceState ¶
type DeviceState uint8
const ( StateUnknown DeviceState = iota StateInitializing StateRunning StateError StateStopped )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bme280 provides a driver for the BME280 temperature, humidity, and pressure sensor using I2C communication.
|
Package bme280 provides a driver for the BME280 temperature, humidity, and pressure sensor using I2C communication. |
|
The drivers include GPIO (digital), analog (via ads1115), serial, I2C at this point.
|
The drivers include GPIO (digital), analog (via ads1115), serial, I2C at this point. |
|
examples
|
|
|
ads1115
command
|
|
|
blink
command
|
|
|
bme280
command
|
|
|
gtu7
command
|
|
|
json
command
|
|
|
oled
command
|
|
|
relay
command
|
|
|
switch
command
|
|
|
vh400
command
|
|
Click to show internal directories.
Click to hide internal directories.