base

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Type string

	// Connection provides information about communication protocol.
	Connection map[string]string
	// contains filtered or unexported fields
}

Sensor defines all information necessary about the attached sensor.

func (*Base) AppConfig

func (*Base) AppConfig() []appconfig.ConfigValue

func (*Base) ApplyOverlay

func (*Base) ApplyOverlay(overlay *devicetree.DeviceTree) error

func (*Base) CPPComponentType

func (*Base) CPPComponentType() string

func (*Base) Clusters

func (*Base) Clusters() cluster.Clusters

func (*Base) Includes

func (*Base) Includes() []string

Includes is an optional include statements that will be written in main.cpp.

func (*Base) Label

func (b *Base) Label() string

func (*Base) NeedsDevice

func (*Base) NeedsDevice() bool

func (*Base) SetLabel

func (b *Base) SetLabel(label string)

func (*Base) Template

func (*Base) Template() string

type CommonDeviceClusters

type CommonDeviceClusters struct {
	*Base `yaml:",inline"`
}

func NewCommonDeviceClusters

func NewCommonDeviceClusters() *CommonDeviceClusters

func (*CommonDeviceClusters) Clusters

func (o *CommonDeviceClusters) Clusters() cluster.Clusters

func (*CommonDeviceClusters) String

func (*CommonDeviceClusters) String() string

func (*CommonDeviceClusters) Template

func (*CommonDeviceClusters) Template() string

type I2CConnection

type I2CConnection struct {
	ID   string
	Addr string
}

func (I2CConnection) Reg

func (c I2CConnection) Reg() string

func (I2CConnection) UnitAddress

func (c I2CConnection) UnitAddress() string

type IASZone

type IASZone struct {
	*Base    `yaml:",inline"`
	Button   string              `yaml:"button"`
	ZoneType cluster.IasZoneType `yaml:"zone_type"`
}

func NewContact

func NewContact() *IASZone

func (*IASZone) CPPComponentType

func (*IASZone) CPPComponentType() string

func (*IASZone) Clusters

func (z *IASZone) Clusters() cluster.Clusters

func (*IASZone) Includes

func (*IASZone) Includes() []string

func (*IASZone) String

func (*IASZone) String() string

func (*IASZone) Template

func (*IASZone) Template() string

func (*IASZone) WriteFiles

func (*IASZone) WriteFiles() []generator.WriteFile

type OnOff

type OnOff struct {
	*Base `yaml:",inline"`
	Pin   types.Pin
}

func (*OnOff) AppConfig

func (*OnOff) AppConfig() []appconfig.ConfigValue

func (*OnOff) ApplyOverlay

func (o *OnOff) ApplyOverlay(overlay *devicetree.DeviceTree) error

func (*OnOff) CPPComponentType

func (*OnOff) CPPComponentType() string

func (*OnOff) Clusters

func (o *OnOff) Clusters() cluster.Clusters

func (*OnOff) Extenders

func (*OnOff) Extenders() []generator.Extender

func (*OnOff) Includes

func (*OnOff) Includes() []string

func (*OnOff) String

func (*OnOff) String() string

func (*OnOff) Template

func (*OnOff) Template() string

func (*OnOff) WriteFiles

func (*OnOff) WriteFiles() []generator.WriteFile

type PowerConfiguration

type PowerConfiguration struct {
	*Base                      `yaml:",inline"`
	cluster.PowerConfiguration `yaml:",inline"`
	ADCPin                     devicetree.ADCPin `yaml:"adc_pin"`
}

func (*PowerConfiguration) AppConfig

func (*PowerConfiguration) AppConfig() []appconfig.ConfigValue

func (*PowerConfiguration) ApplyOverlay

func (o *PowerConfiguration) ApplyOverlay(overlay *devicetree.DeviceTree) error

func (*PowerConfiguration) CPPComponentType

func (*PowerConfiguration) CPPComponentType() string

func (*PowerConfiguration) Clusters

func (o *PowerConfiguration) Clusters() cluster.Clusters

func (*PowerConfiguration) Includes

func (*PowerConfiguration) Includes() []string

func (*PowerConfiguration) String

func (*PowerConfiguration) String() string

func (*PowerConfiguration) Template

func (*PowerConfiguration) Template() string

func (*PowerConfiguration) WriteFiles

func (*PowerConfiguration) WriteFiles() []generator.WriteFile

type SensorType

type SensorType struct {
	Type string
}

SensorType is type that will fetch only

type SoilMoistureADC

type SoilMoistureADC struct {
	*Base         `yaml:",inline"`
	MinMoistureMv uint16            `yaml:"min_moisture_mv"`
	MaxMoistureMv uint16            `yaml:"max_moisture_mv"`
	ADCPin        devicetree.ADCPin `yaml:"adc_pin"`
}

func (*SoilMoistureADC) AppConfig

func (*SoilMoistureADC) AppConfig() []appconfig.ConfigValue

func (*SoilMoistureADC) ApplyOverlay

func (o *SoilMoistureADC) ApplyOverlay(overlay *devicetree.DeviceTree) error

func (*SoilMoistureADC) CPPComponentType

func (*SoilMoistureADC) CPPComponentType() string

func (*SoilMoistureADC) Clusters

func (o *SoilMoistureADC) Clusters() cluster.Clusters

func (*SoilMoistureADC) Includes

func (*SoilMoistureADC) Includes() []string

func (*SoilMoistureADC) String

func (*SoilMoistureADC) String() string

func (*SoilMoistureADC) Template

func (*SoilMoistureADC) Template() string

func (*SoilMoistureADC) WriteFiles

func (*SoilMoistureADC) WriteFiles() []generator.WriteFile

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL