Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SensorLabelFn = func(s Sensor) string { sensorCounter += 1 cleanLabel := strings.ReplaceAll(strings.ToLower(fmt.Sprintf("%T_", s)), ".", "_") return strings.TrimPrefix(cleanLabel, "*") + strconv.Itoa(sensorCounter) }
SensorLabelFn returns a unique label for a sensor.
Functions ¶
This section is empty.
Types ¶
type Sensor ¶
type Sensor interface { // Stringer is for human-readable name fmt.Stringer // Label returns unique label value for the sensor. // Generally this method should not be defined by user, // intstead it will be defined in embedded `*base.Base` Label() string Template() string cluster.Provider appconfig.Provider devicetree.Applier }
type Sensors ¶
type Sensors []Sensor
func (*Sensors) UniqueClusters ¶
UniqueClusters will return all unique clusters across all the sensors. Clusters might be configured for a specific sensor, so this method is mostly useful to *know* which clusters are available.
func (*Sensors) UnmarshalYAML ¶
type Simple ¶
type Simple struct { SensorName string SensorLabel string SensorTemplate string SensorClusters cluster.Clusters SensorAppConfig []appconfig.ConfigValue SensorAppOverlay func(*devicetree.DeviceTree) error }
func (*Simple) AppConfig ¶
func (s *Simple) AppConfig() []appconfig.ConfigValue
func (*Simple) ApplyOverlay ¶
func (s *Simple) ApplyOverlay(overlay *devicetree.DeviceTree) error
type WithExtenders ¶
Click to show internal directories.
Click to hide internal directories.