Documentation
¶
Index ¶
- Constants
- type DeviceConfig
- type HardwareSensors
- func (s *HardwareSensors) IsLeakPresent() (bool, error)
- func (s *HardwareSensors) IsPumpOn() (bool, error)
- func (s *HardwareSensors) ReadRoomAndWaterTemperature() (TemperatureReading, TemperatureReading)
- func (s *HardwareSensors) ReadTemperatures() []TemperatureReading
- func (s *HardwareSensors) TurnOzoneOff() error
- func (s *HardwareSensors) TurnOzoneOn() error
- func (s *HardwareSensors) TurnPumpOff() error
- func (s *HardwareSensors) TurnPumpOn() error
- type MockSensors
- func (m *MockSensors) IsLeakPresent() (bool, error)
- func (m *MockSensors) IsPumpOn() (bool, error)
- func (m *MockSensors) ReadRoomAndWaterTemperature() (TemperatureReading, TemperatureReading)
- func (m *MockSensors) ReadTemperatures() []TemperatureReading
- func (m *MockSensors) TurnOzoneOff() error
- func (m *MockSensors) TurnOzoneOn() error
- func (m *MockSensors) TurnPumpOff() error
- func (m *MockSensors) TurnPumpOn() error
- type SensorConfig
- type SensorType
- type Sensors
- type TemperatureReading
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceConfig ¶
type DeviceConfig struct { DriverType string `json:"driver_type"` SensorType string `json:"sensor_type"` Address string `json:"address"` Name string `json:"name"` Description string `json:"description"` NormallyOn bool `json:"normally_on,omitempty"` CalibrationOffsetCelsius float64 `json:"calibration_offset_celsius"` }
type HardwareSensors ¶
type HardwareSensors struct {
// contains filtered or unexported fields
}
func (*HardwareSensors) IsLeakPresent ¶
func (s *HardwareSensors) IsLeakPresent() (bool, error)
func (*HardwareSensors) IsPumpOn ¶
func (s *HardwareSensors) IsPumpOn() (bool, error)
func (*HardwareSensors) ReadRoomAndWaterTemperature ¶
func (s *HardwareSensors) ReadRoomAndWaterTemperature() (TemperatureReading, TemperatureReading)
func (*HardwareSensors) ReadTemperatures ¶
func (s *HardwareSensors) ReadTemperatures() []TemperatureReading
func (*HardwareSensors) TurnOzoneOff ¶
func (s *HardwareSensors) TurnOzoneOff() error
func (*HardwareSensors) TurnOzoneOn ¶
func (s *HardwareSensors) TurnOzoneOn() error
func (*HardwareSensors) TurnPumpOff ¶
func (s *HardwareSensors) TurnPumpOff() error
func (*HardwareSensors) TurnPumpOn ¶
func (s *HardwareSensors) TurnPumpOn() error
type MockSensors ¶
type MockSensors struct {
// contains filtered or unexported fields
}
func (*MockSensors) IsLeakPresent ¶
func (m *MockSensors) IsLeakPresent() (bool, error)
func (*MockSensors) IsPumpOn ¶
func (m *MockSensors) IsPumpOn() (bool, error)
func (*MockSensors) ReadRoomAndWaterTemperature ¶
func (m *MockSensors) ReadRoomAndWaterTemperature() (TemperatureReading, TemperatureReading)
func (*MockSensors) ReadTemperatures ¶
func (m *MockSensors) ReadTemperatures() []TemperatureReading
func (*MockSensors) TurnOzoneOff ¶
func (m *MockSensors) TurnOzoneOff() error
func (*MockSensors) TurnOzoneOn ¶
func (m *MockSensors) TurnOzoneOn() error
func (*MockSensors) TurnPumpOff ¶
func (m *MockSensors) TurnPumpOff() error
func (*MockSensors) TurnPumpOn ¶
func (m *MockSensors) TurnPumpOn() error
type SensorConfig ¶
type SensorConfig struct { SensorTimeout time.Duration Devices []DeviceConfig TemperatureSensors map[string]DeviceConfig LeakSensor DeviceConfig OzoneDevice DeviceConfig PumpDevice DeviceConfig }
type SensorType ¶
type SensorType int
type Sensors ¶
type Sensors interface { ReadRoomAndWaterTemperature() (TemperatureReading, TemperatureReading) ReadTemperatures() []TemperatureReading IsLeakPresent() (bool, error) TurnOzoneOn() error TurnOzoneOff() error IsPumpOn() (bool, error) TurnPumpOn() error TurnPumpOff() error }
func NewSensorConfig ¶
func NewSensorConfig(sensorTimeout int, devices []DeviceConfig, useMockSensor bool) (Sensors, error)
type TemperatureReading ¶
type TemperatureReading struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Address string `json:"address,omitempty"` TemperatureC float64 `json:"temperature_c,omitempty"` TemperatureF float64 `json:"temperature_f,omitempty"` Err error `json:"err,omitempty"` }
Click to show internal directories.
Click to hide internal directories.