Documentation
¶
Index ¶
- Variables
- func NewSensor(ctx context.Context, deps resource.Dependencies, conf resource.Config, ...) (sensor.Sensor, error)
- type CloudConfig
- type Config
- func (c *Config) Close(ctx context.Context) error
- func (c *Config) Readings(ctx context.Context, extra map[string]interface{}) (map[string]interface{}, error)
- func (c *Config) Ready(ctx context.Context, extra map[string]interface{}) (bool, error)
- func (c *Config) Reconfigure(ctx context.Context, deps resource.Dependencies, conf resource.Config) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Description = "An on/Off fan controller for Viam"
View Source
var Model = resource.NewModel("viam-soleng", "fan", "onoff")
View Source
var PrettyName = "Raspberry Pi Clock Sensor"
View Source
var Version = utils.Version
Functions ¶
Types ¶
type CloudConfig ¶
type CloudConfig struct { BoardName string `json:"board_name"` FanPin string `json:"fan_pin"` SensorName string `json:"sensor_name"` SensorValueField string `json:"sensor_value_field"` SensorValueRegex string `json:"sensor_value_regex"` OnTemperature float64 `json:"on_temperature"` OffTemperature float64 `json:"off_temperature"` OnDelay int64 `json:"on_delay"` OffDelay int64 `json:"off_delay"` }
type Config ¶
type Config struct { resource.Named FanPin board.GPIOPin Board *board.Board Sensor sensor.Sensor SensorValueField string SensorValueRegex *regexp.Regexp OnTemperature float64 OffTemperature float64 OnDelay time.Duration OffDelay time.Duration LastStateChange time.Time // contains filtered or unexported fields }
func (*Config) Reconfigure ¶
Click to show internal directories.
Click to hide internal directories.