cluster

package
v0.0.0-...-7b92d88 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basic

type Basic struct{}

ZCL 3.5

func (Basic) CAttrType

func (Basic) CAttrType() string

func (Basic) CVarName

func (Basic) CVarName() string

func (Basic) ID

func (t Basic) ID() ID

func (Basic) ReportAttrCount

func (Basic) ReportAttrCount() int

func (Basic) Side

func (Basic) Side() Side

type CarbonDioxide

type CarbonDioxide struct {
	MinMeasuredValue int16
	MaxMeasuredValue int16
	Tolerance        uint16
}

ZCL 4.5.2

func (CarbonDioxide) CAttrType

func (CarbonDioxide) CAttrType() string

func (CarbonDioxide) CVarName

func (CarbonDioxide) CVarName() string

func (CarbonDioxide) ID

func (t CarbonDioxide) ID() ID

func (CarbonDioxide) ReportAttrCount

func (CarbonDioxide) ReportAttrCount() int

func (CarbonDioxide) Side

func (CarbonDioxide) Side() Side

type Cluster

type Cluster interface {
	ID() ID
	CAttrType() string
	CVarName() string
	// ReportAttrCount returns how many attributes are reportable
	ReportAttrCount() int
	// Side tells if the cluster is client and/or server. ZCL 1.3.
	Side() Side
}

type Clusters

type Clusters []Cluster

func (Clusters) Clients

func (c Clusters) Clients() (count int)

func (Clusters) ReportAttrCount

func (c Clusters) ReportAttrCount() (count int)

func (Clusters) Servers

func (c Clusters) Servers() (count int)

type DeviceTemperature

type DeviceTemperature struct{}

ZCL 3.4.2

func (DeviceTemperature) CAttrType

func (DeviceTemperature) CAttrType() string

func (DeviceTemperature) CVarName

func (DeviceTemperature) CVarName() string

func (DeviceTemperature) ID

func (t DeviceTemperature) ID() ID

func (DeviceTemperature) ReportAttrCount

func (DeviceTemperature) ReportAttrCount() int

func (DeviceTemperature) Side

func (DeviceTemperature) Side() Side

type IASZone

type IASZone struct {
	ZoneType IasZoneType
}

ZCL 4.5.2

Currently only supports contact zone type.

func (IASZone) CAttrType

func (IASZone) CAttrType() string

func (IASZone) CVarName

func (IASZone) CVarName() string

func (IASZone) ID

func (z IASZone) ID() ID

func (IASZone) ReportAttrCount

func (IASZone) ReportAttrCount() int

func (IASZone) Side

func (z IASZone) Side() Side

type ID

type ID int
const ID_BASIC ID = 0 // Basic cluster identifier.
const ID_CARBON_DIOXIDE ID = 0x040d
const ID_DEVICE_TEMP_CONFIG ID = 2 // Device temperature cluster.
const ID_IAS_ZONE ID = 0x0500
const ID_IDENTIFY ID = 3 // Identify cluster identifier.
const ID_ON_OFF ID = 6 // On/Off cluster identifier.
const ID_POWER_CONFIG ID = 1
const ID_PRESSURE_MEASUREMENT ID = 0x0403 // Pressure measurement
const ID_REL_HUMIDITY_MEASUREMENT ID = 0x0405 // Relative humidity measurement
const ID_SOIL_MOISTURE_MEASUREMENT ID = 0x0408 // Soil moisture measurement
const ID_TEMP_MEASUREMENT ID = 0x0402 // Temperature measurement

Measurement and Sensing

func (ID) ToZCL

func (id ID) ToZCL() (string, error)

type IasZoneType

type IasZoneType string
const (
	IasZoneContact IasZoneType = "contact"
)

func (IasZoneType) String

func (c IasZoneType) String() string

type Identify

type Identify struct{}

ZCL 3.5

func (Identify) CAttrType

func (Identify) CAttrType() string

func (Identify) CVarName

func (Identify) CVarName() string

func (Identify) ID

func (t Identify) ID() ID

func (Identify) ReportAttrCount

func (Identify) ReportAttrCount() int

func (Identify) Side

func (Identify) Side() Side

type OnOff

type OnOff struct {
	PinLabel string
}

func (OnOff) CAttrType

func (OnOff) CAttrType() string

func (OnOff) CVarName

func (OnOff) CVarName() string

func (OnOff) ID

func (o OnOff) ID() ID

func (OnOff) ReportAttrCount

func (OnOff) ReportAttrCount() int

func (OnOff) Side

func (OnOff) Side() Side

type PowerConfiguration

type PowerConfiguration struct {
	BatteryRatedVoltage        uint16 `yaml:"battery_rated_voltage"`
	BatteryVoltageMinThreshold uint16 `yaml:"battery_voltage_min_threshold"`
}

func (PowerConfiguration) CAttrType

func (PowerConfiguration) CAttrType() string

func (PowerConfiguration) CVarName

func (PowerConfiguration) CVarName() string

func (PowerConfiguration) ID

func (o PowerConfiguration) ID() ID

func (PowerConfiguration) ReportAttrCount

func (PowerConfiguration) ReportAttrCount() int

func (PowerConfiguration) Side

func (PowerConfiguration) Side() Side

type Pressure

type Pressure struct {
	MinMeasuredValue int16
	MaxMeasuredValue int16
	Tolerance        uint16
}

ZCL 4.5.2

func (Pressure) CAttrType

func (Pressure) CAttrType() string

func (Pressure) CVarName

func (Pressure) CVarName() string

func (Pressure) ID

func (t Pressure) ID() ID

func (Pressure) ReportAttrCount

func (Pressure) ReportAttrCount() int

func (Pressure) Side

func (Pressure) Side() Side

type Provider

type Provider interface {
	Clusters() Clusters
}

type Side

type Side uint8
const (
	None            Side = iota
	Server          Side = 1 << iota
	Client          Side = 1 << iota
	ClientAndServer Side = Server | Client
)

func (Side) IsClient

func (s Side) IsClient() bool

func (Side) IsServer

func (s Side) IsServer() bool

func (Side) String

func (s Side) String() string

func (*Side) UnmarshalYAML

func (s *Side) UnmarshalYAML(node *yaml.Node) error

type Temperature

type Temperature struct {
	MinMeasuredValue int16
	MaxMeasuredValue int16
	Tolerance        uint16
}

ZCL 4.4.2

func (Temperature) CAttrType

func (Temperature) CAttrType() string

func (Temperature) CVarName

func (Temperature) CVarName() string

func (Temperature) ID

func (t Temperature) ID() ID

func (Temperature) ReportAttrCount

func (Temperature) ReportAttrCount() int

func (Temperature) Side

func (Temperature) Side() Side

type WaterContent

type WaterContent struct {
	MinMeasuredValue uint16
	MaxMeasuredValue uint16

	ClusterID   ID     `yaml:"-"`
	CVarNameStr string `yaml:"-"`
}

ZCL 4.7.2

func NewRelativeHumidity

func NewRelativeHumidity(minVal, maxVal uint16) *WaterContent

func NewSoilMoisture

func NewSoilMoisture(minVal, maxVal uint16) *WaterContent

func (WaterContent) CAttrType

func (wc WaterContent) CAttrType() string

func (WaterContent) CVarName

func (wc WaterContent) CVarName() string

func (WaterContent) ID

func (wc WaterContent) ID() ID

func (WaterContent) ReportAttrCount

func (WaterContent) ReportAttrCount() int

func (WaterContent) Side

func (WaterContent) Side() Side

Jump to

Keyboard shortcuts

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