Documentation ¶
Overview ¶
Package thermal exposes an HTTP interface to thermal controllers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTemperature ¶
func GetTemperature(c Controller) http.HandlerFunc
GetTemperature returns an HTTP handler func that returns the temperature over HTTP
func GetTemperatureSetpoint ¶
func GetTemperatureSetpoint(c Controller) http.HandlerFunc
GetTemperatureSetpoint returns the temperature as JSON over HTTP
func HTTPController ¶
func HTTPController(c Controller, table generichttp.RouteTable)
HTTPController binds routes to control temperature to the table
func SetTemperatureSetpoint ¶
func SetTemperatureSetpoint(c Controller) http.HandlerFunc
SetTemperatureSetpoint returns an HTTP handler func that sets the temperature setpoint over HTTP
Types ¶
type Controller ¶
type Controller interface { // GetTemperatureSetpoint gets the temperature setpoint in Celcius GetTemperatureSetpoint() (float64, error) // SetTemperatureSetpoint sets the temperature setpoint in Celcius SetTemperatureSetpoint(float64) error // GetTemperature gets the temperature in Celcius GetTemperature() (float64, error) }
Controller is an interface to a thermal controller with a single channel
Click to show internal directories.
Click to hide internal directories.