Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSensorServer ¶
func NewSensorServer() *sensorServer
Types ¶
type Sensor ¶
type Sensor struct { *bsbmp.BMP SensorID *uint8 `json:"sensor_id,omitempty"` Temperature *float32 `json:"temperature,omitempty"` Humidity *float32 `json:"humidity,omitempty"` Pressue *float32 `json:"pressure,omitempty"` Altitude *float32 `json:"altitude,omitempty"` }
Sensor is the retreived environment properties.
var PiSensor *Sensor
type SensorStore ¶
SensorStore is a simple in-memory database of tasks; SensorStore methods are safe to call concurrently.
func NewSensorStore ¶
func NewSensorStore() *SensorStore
func (*SensorStore) GetAllSensors ¶
func (ss *SensorStore) GetAllSensors() ([]Sensor, error)
GetAllSensors returns all the tasks in the store, in arbitrary order.
Click to show internal directories.
Click to hide internal directories.