Documentation ¶
Index ¶
- func SerializeMagicValue(dataType ZclDataType, val interface{}) string
- func TransitionTimeFrom(duration time.Duration) uint16
- type Access
- type Attribute
- type AttributeAccessControl
- type AttributeDescriptor
- type AttributeId
- type AttributeInformation
- type AttributeRecord
- type AttributeReport
- type AttributeReportingConfigurationRecord
- type AttributeReportingConfigurationResponseRecord
- type AttributeSelector
- type AttributeStatusRecord
- type ClosuresWindowCoveringDown
- type ClosuresWindowCoveringGoToLiftPercentage
- type ClosuresWindowCoveringStop
- type ClosuresWindowCoveringUp
- type Cluster
- type ClusterId
- type ClusterLibrary
- type CommandDescriptor
- type CommandDescriptors
- type ConfigureReportingCommand
- type ConfigureReportingResponse
- type Date
- type DefaultResponseCommand
- type Definition
- type DiscoverAttributesCommand
- type DiscoverAttributesExtendedCommand
- type DiscoverAttributesExtendedResponse
- type DiscoverAttributesResponse
- type DiscoverCommandsGeneratedCommand
- type DiscoverCommandsGeneratedResponse
- type DiscoverCommandsReceivedCommand
- type DiscoverCommandsReceivedResponse
- type EffectId
- type ExtendedAttributeInformation
- type GenIdentifyTriggerEffectCommand
- type GenOnOffOffCommand
- type GenOnOffOnCommand
- type GenOnOffToggleCommand
- type IdentifyCommand
- type IdentifyQueryCommand
- type IdentifyQueryResponse
- type LightingColorCtrlMoveToColor
- type LightingColorCtrlMoveToColorTemperature
- type LocalCommand
- type MoveCommand
- type MoveOnOffCommand
- type MoveToLevelCommand
- type MoveToLevelOnOffCommand
- type OffWithEffectCommand
- type OnWithRecallGlobalSceneCommand
- type OnWithTimedOffCommand
- type ReadAttributeStatus
- type ReadAttributesCommand
- type ReadAttributesResponse
- type ReadAttributesStructuredCommand
- type ReadReportingConfigurationCommand
- type ReadReportingConfigurationResponse
- type ReportAttributesCommand
- type ReportDirection
- type ResetToFactoryDefaultsCommand
- type ScenesMysteryCommand7
- type StepCommand
- type StepOnOffCommand
- type StopCommand
- type StopOnOffCommand
- type TimeOfDay
- type WriteAttributeRecord
- type WriteAttributeStatus
- type WriteAttributeStatusRecord
- type WriteAttributeStructuredRecord
- type WriteAttributesCommand
- type WriteAttributesNoResponseCommand
- type WriteAttributesResponse
- type WriteAttributesStructuredCommand
- type WriteAttributesStructuredResponse
- type WriteAttributesUndividedCommand
- type ZclCommand
- type ZclDataType
- type ZclStatus
- type ZoneStatus
- type ZoneStatusChangeNotificationCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SerializeMagicValue ¶
func SerializeMagicValue(dataType ZclDataType, val interface{}) string
takes in way too magical interface{} which is one of Go's built-in representation types that were unmarshaled from []byte based on ZclDataType
TODO: move this somewhere TODO: test this? TODO: document why this works TODO: refactor code so eventually this is not required
func TransitionTimeFrom ¶
Zigbee transition times are in units of 100 milliseconds
Types ¶
type Attribute ¶
type Attribute struct { DataType ZclDataType // upon serialization this disappears (only *Value* is marshaled) Value interface{} }
NOTE: has custom marshaling defined
func (*Attribute) Deserialize ¶
WARNING: this is called magically from dyrkin/bin
type AttributeAccessControl ¶
type AttributeDescriptor ¶
type AttributeDescriptor struct { Name string Type ZclDataType Access Access }
type AttributeId ¶
type AttributeId uint16
const ( AttrBasicManufacturerName AttributeId = 4 AttrBasicModelId AttributeId = 5 AttrBasicPowerSource AttributeId = 7 )
these are used from elsewhere, so prevent magic constants
type AttributeInformation ¶
type AttributeInformation struct { AttributeName string `transient:"true"` AttributeID uint16 AttributeDataType ZclDataType }
type AttributeRecord ¶
type AttributeRecord struct { Direction ReportDirection AttributeName string `transient:"true"` AttributeID uint16 }
type AttributeReport ¶
type AttributeReportingConfigurationRecord ¶
type AttributeReportingConfigurationRecord struct { Direction ReportDirection AttributeName string `transient:"true"` AttributeID uint16 AttributeDataType ZclDataType `cond:"uint:Direction==0"` // specified by the attribute MinimumReportingInterval uint16 `cond:"uint:Direction==0"` // [s] MaximumReportingInterval uint16 `cond:"uint:Direction==0"` // [s] ReportableChange *Attribute `cond:"uint:Direction==0"` // [in units of the attribute] TimeoutPeriod uint16 `cond:"uint:Direction==1"` }
type AttributeReportingConfigurationResponseRecord ¶
type AttributeReportingConfigurationResponseRecord struct { Status ZclStatus Direction ReportDirection AttributeName string `transient:"true"` AttributeID uint16 AttributeDataType ZclDataType `cond:"uint:Direction==0;uint:Status==0"` MinimumReportingInterval uint16 `cond:"uint:Direction==0;uint:Status==0"` MaximumReportingInterval uint16 `cond:"uint:Direction==0;uint:Status==0"` ReportableChange *Attribute `cond:"uint:Direction==0;uint:Status==0"` TimeoutPeriod uint16 `cond:"uint:Direction==1;uint:Status==0"` }
type AttributeSelector ¶
type AttributeStatusRecord ¶
type AttributeStatusRecord struct { Status ZclStatus Direction ReportDirection AttributeName string `transient:"true"` AttributeID uint16 }
type ClosuresWindowCoveringDown ¶
type ClosuresWindowCoveringDown struct{}
ZCL spec section: 7.4.2.2.2
func (*ClosuresWindowCoveringDown) CommandClusterAndId ¶
func (c *ClosuresWindowCoveringDown) CommandClusterAndId() (ClusterId, uint8)
type ClosuresWindowCoveringGoToLiftPercentage ¶
type ClosuresWindowCoveringGoToLiftPercentage struct {
Value uint8 // 0-100
}
ZCL spec section: 7.4.2.2.4
func (*ClosuresWindowCoveringGoToLiftPercentage) CommandClusterAndId ¶
func (c *ClosuresWindowCoveringGoToLiftPercentage) CommandClusterAndId() (ClusterId, uint8)
type ClosuresWindowCoveringStop ¶
type ClosuresWindowCoveringStop struct{}
ZCL spec section: 7.4.2.2.3
func (*ClosuresWindowCoveringStop) CommandClusterAndId ¶
func (c *ClosuresWindowCoveringStop) CommandClusterAndId() (ClusterId, uint8)
type ClosuresWindowCoveringUp ¶
type ClosuresWindowCoveringUp struct{}
ZCL spec section: 7.4.2.2.1
func (*ClosuresWindowCoveringUp) CommandClusterAndId ¶
func (c *ClosuresWindowCoveringUp) CommandClusterAndId() (ClusterId, uint8)
type Cluster ¶
type Cluster struct { Name string AttributeDescriptors map[uint16]*AttributeDescriptor CommandDescriptors *CommandDescriptors }
type ClusterId ¶
type ClusterId uint16
const ( IdGenBasic ClusterId = 0 IdGenPowerCfg ClusterId = 1 IdGenDeviceTempCfg ClusterId = 2 IdGenIdentify ClusterId = 3 IdGenGroups ClusterId = 4 IdGenScenes ClusterId = 5 IdGenOnOff ClusterId = 6 IdGenOnOffSwitchCfg ClusterId = 7 IdGenLevelCtrl ClusterId = 8 IdGenAlarms ClusterId = 9 IdGenTime ClusterId = 10 IdGenRssiLocation ClusterId = 11 IdGenAnalogInput ClusterId = 12 IdGenAnalogOutput ClusterId = 13 IdGenAnalogValue ClusterId = 14 IdGenBinaryInput ClusterId = 15 IdGenBinaryOutput ClusterId = 16 IdGenBinaryValue ClusterId = 17 IdGenMultistateInput ClusterId = 18 IdGenMultistateOutput ClusterId = 19 IdGenMultistateValue ClusterId = 20 IdGenCommissioning ClusterId = 21 IdGenOta ClusterId = 25 IdGenPollCtrl ClusterId = 32 IdGreenPower ClusterId = 33 IdMobileDeviceCfg ClusterId = 34 IdNeighborCleaning ClusterId = 35 IdNearestGateway ClusterId = 36 IdClosuresShadeCfg ClusterId = 256 IdClosuresDoorLock ClusterId = 257 IdClosuresWindowCovering ClusterId = 258 IdHvacPumpCfgCtrl ClusterId = 512 IdHvacThermostat ClusterId = 513 IdHvacFanCtrl ClusterId = 514 IdHvacDehumidificationCtrl ClusterId = 515 IdHvacUserInterfaceCfg ClusterId = 516 IdLightingColorCtrl ClusterId = 768 IdLightingBallastCfg ClusterId = 769 IdMsIlluminanceMeasurement ClusterId = 1024 IdMsIlluminanceLevelSensing ClusterId = 1025 IdMsTemperatureMeasurement ClusterId = 1026 IdMsPressureMeasurement ClusterId = 1027 IdMsFlowMeasurement ClusterId = 1028 IdMsRelativeHumidity ClusterId = 1029 IdMsOccupancySensing ClusterId = 1030 IdMsSoilMoisture ClusterId = 1032 IdPHMeasurement ClusterId = 1033 IdMsCO2 ClusterId = 1037 IdSsIasZone ClusterId = 1280 IdSsIasAce ClusterId = 1281 IdSsIasWd ClusterId = 1282 IdPiGenericTunnel ClusterId = 1536 IdPiBacnetProtocolTunnel ClusterId = 1537 IdPiAnalogInputReg ClusterId = 1538 IdPiAnalogInputExt ClusterId = 1539 IdPiAnalogOutputReg ClusterId = 1540 IdPiAnalogOutputExt ClusterId = 1541 IdPiAnalogValueReg ClusterId = 1542 IdPiAnalogValueExt ClusterId = 1543 IdPiBinaryInputReg ClusterId = 1544 IdPiBinaryInputExt ClusterId = 1545 IdPiBinaryOutputReg ClusterId = 1546 IdPiBinaryOutputExt ClusterId = 1547 IdPiBinaryValueReg ClusterId = 1548 IdPiBinaryValueExt ClusterId = 1549 IdPiMultistateInputReg ClusterId = 1550 IdPiMultistateInputExt ClusterId = 1551 IdPiMultistateOutputReg ClusterId = 1552 IdPiMultistateOutputExt ClusterId = 1553 IdPiMultistateValueReg ClusterId = 1554 IdPiMultistateValueExt ClusterId = 1555 IdPi11073ProtocolTunnel ClusterId = 1556 IdPiIso7818ProtocolTunnel ClusterId = 1557 IdPiRetailTunnel ClusterId = 1559 IdSeMetering ClusterId = 1794 IdTelecommunicationsInformation ClusterId = 2304 IdTelecommunicationsVoiceOverZigbee ClusterId = 2308 IdTelecommunicationsChatting ClusterId = 2309 IdHaApplianceIdentification ClusterId = 2816 IdHaMeterIdentification ClusterId = 2817 IdHaApplianceEventsAlerts ClusterId = 2818 IdHaApplianceStatistics ClusterId = 2819 IdHaElectricalMeasurement ClusterId = 2820 IdHaDiagnostic ClusterId = 2821 IdTouchlink ClusterId = 4096 IdManuSpecificClusterAduroSmart ClusterId = 64716 IdManuSpecificOsram ClusterId = 64527 IdManuSpecificPhilips ClusterId = 64512 IdManuSpecificSinope ClusterId = 65281 IdManuSpecificUbisysDimmerSetup ClusterId = 64513 IdWiserDeviceInfo ClusterId = 65027 IdManuSpecificTuya ClusterId = 61184 IdAqaraOpple ClusterId = 64704 IdManuSpecificCentraliteHumidity ClusterId = 64581 IdManuSpecificSmartThingsArrivalSensor ClusterId = 64517 IdManuSpecificSamsungAccelerometer ClusterId = 64514 IdHeimanSpecificPM25Measurement ClusterId = 1066 IdHeimanSpecificFormaldehydeMeasurement ClusterId = 1067 IdHeimanSpecificAirQuality ClusterId = 64641 IdHeimanSpecificScenes ClusterId = 64640 IdHeimanSpecificInfraRedRemote ClusterId = 64642 IdDevelcoSpecificAirQuality ClusterId = 64515 )
type ClusterLibrary ¶
type ClusterLibrary struct {
// contains filtered or unexported fields
}
func NewClusterLibrary ¶
func NewClusterLibrary() *ClusterLibrary
func (*ClusterLibrary) Clusters ¶
func (cl *ClusterLibrary) Clusters() map[ClusterId]*Cluster
func (*ClusterLibrary) Global ¶
func (cl *ClusterLibrary) Global() map[uint8]*CommandDescriptor
type CommandDescriptor ¶
type CommandDescriptor struct { Name string Command interface{} }
type CommandDescriptors ¶
type CommandDescriptors struct { Received map[uint8]*CommandDescriptor Generated map[uint8]*CommandDescriptor }
type ConfigureReportingCommand ¶
type ConfigureReportingCommand struct {
AttributeReportingConfigurationRecords []*AttributeReportingConfigurationRecord
}
type ConfigureReportingResponse ¶
type ConfigureReportingResponse struct { // "In the case of successful configuration of all attributes, only a single attribute status // record SHALL be included in the command, with the status field set to SUCCESS and the // direction and attribute identifier fields omitted. AttributeStatusRecords []*AttributeStatusRecord // you can think of this as "failed attribute sets" }
type DefaultResponseCommand ¶
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
func FindDefinition ¶
func FindDefinition(id ClusterId) *Definition
func (*Definition) Attribute ¶
func (d *Definition) Attribute(id AttributeId) *AttributeDescriptor
func (*Definition) Name ¶
func (d *Definition) Name() string
type DiscoverAttributesExtendedResponse ¶
type DiscoverAttributesExtendedResponse struct { DiscoveryComplete uint8 ExtendedAttributeInformations []*ExtendedAttributeInformation }
type DiscoverAttributesResponse ¶
type DiscoverAttributesResponse struct { DiscoveryComplete uint8 AttributeInformations []*AttributeInformation }
type EffectId ¶
type EffectId uint8
const ( EffectIdBlink EffectId = 0x00 // Light is turned on/off once EffectIdBreathe EffectId = 0x01 // Light turned on/off over 1 second and repeated 15 times. EffectIdOkay EffectId = 0x02 // Colored light turns green for 1 second; noncolored light flashes twice EffectIdChannelChange EffectId = 0x0b // Colored light turns orange for 8 seconds; noncolored light switches to maximum brightness for 0.5s and then minimum brightness for 7.5s. EffectIdFinishEffect EffectId = 0xfe // Complete the current effect sequence before terminating. e.g., if in the middle of a breathe effect (as above), first complete the current 1s breathe effect and then terminate the effect EffectIdStopEffect EffectId = 0xff // Terminate the effect as soon as possible )
type ExtendedAttributeInformation ¶
type ExtendedAttributeInformation struct { AttributeName string `transient:"true"` AttributeID uint16 AttributeDataType ZclDataType AttributeAccessControl *AttributeAccessControl }
type GenIdentifyTriggerEffectCommand ¶
type GenIdentifyTriggerEffectCommand struct { Effect EffectId EffectVariant uint8 // variant of effect *EffectIdentifier*. usually zero }
ZCL spec section: 3.5.2.3.3
func (*GenIdentifyTriggerEffectCommand) CommandClusterAndId ¶
func (c *GenIdentifyTriggerEffectCommand) CommandClusterAndId() (ClusterId, uint8)
type GenOnOffOffCommand ¶
type GenOnOffOffCommand struct{}
ZCL spec section: 3.8.2.3.1
func (*GenOnOffOffCommand) CommandClusterAndId ¶
func (c *GenOnOffOffCommand) CommandClusterAndId() (ClusterId, uint8)
type GenOnOffOnCommand ¶
type GenOnOffOnCommand struct{}
ZCL spec section: 3.8.2.3.2
func (*GenOnOffOnCommand) CommandClusterAndId ¶
func (c *GenOnOffOnCommand) CommandClusterAndId() (ClusterId, uint8)
type GenOnOffToggleCommand ¶
type GenOnOffToggleCommand struct{}
ZCL spec section: 3.8.2.3.3
func (*GenOnOffToggleCommand) CommandClusterAndId ¶
func (c *GenOnOffToggleCommand) CommandClusterAndId() (ClusterId, uint8)
type IdentifyCommand ¶
type IdentifyCommand struct {
IdentifyTime uint16
}
type IdentifyQueryCommand ¶
type IdentifyQueryCommand struct{}
type IdentifyQueryResponse ¶
type IdentifyQueryResponse struct {
Timeout uint16
}
type LightingColorCtrlMoveToColor ¶
ZCL spec section: 5.2.2.3.10
func (*LightingColorCtrlMoveToColor) CommandClusterAndId ¶
func (c *LightingColorCtrlMoveToColor) CommandClusterAndId() (ClusterId, uint8)
type LightingColorCtrlMoveToColorTemperature ¶
type LightingColorCtrlMoveToColorTemperature struct { ColorTemperatureMireds uint16 // Blue sky = 40 mireds, photography flash = 200 mireds. Candle flame = 667. http://www.photokaboom.com/photography/learn/Photoshop_Elements/color/1_color_temperature_mired.htm valid range (0x0000, 0xfeff) TransitionTime uint16 }
ZCL spec section: 5.2.2.3.13
func (*LightingColorCtrlMoveToColorTemperature) CommandClusterAndId ¶
func (c *LightingColorCtrlMoveToColorTemperature) CommandClusterAndId() (ClusterId, uint8)
type LocalCommand ¶
Local command is cluster-specific command and its arguments.
E.G. CommandClusterAndId=(cluster=On/Off command=Off With Effect) and its arguments are struct fields EffectIdentifier and EffectVariant
type MoveCommand ¶
ZCL spec section: 3.10.2.4.2
func (*MoveCommand) CommandClusterAndId ¶
func (c *MoveCommand) CommandClusterAndId() (ClusterId, uint8)
type MoveOnOffCommand ¶
ZCL spec section: 3.10.2.4.5
func (*MoveOnOffCommand) CommandClusterAndId ¶
func (c *MoveOnOffCommand) CommandClusterAndId() (ClusterId, uint8)
type MoveToLevelCommand ¶
type MoveToLevelCommand struct { Level uint8 // valid range (0x00, 0xfe) TransitionTime uint16 // [100ms], valid range (0x0000, 0xffff) }
ZCL spec section: 3.10.2.4.1
func (*MoveToLevelCommand) CommandClusterAndId ¶
func (c *MoveToLevelCommand) CommandClusterAndId() (ClusterId, uint8)
type MoveToLevelOnOffCommand ¶
ZCL spec section: 3.10.2.4.5
func (*MoveToLevelOnOffCommand) CommandClusterAndId ¶
func (c *MoveToLevelOnOffCommand) CommandClusterAndId() (ClusterId, uint8)
type OffWithEffectCommand ¶
type OnWithRecallGlobalSceneCommand ¶
type OnWithRecallGlobalSceneCommand struct{}
type OnWithTimedOffCommand ¶
type ReadAttributeStatus ¶
type ReadAttributesCommand ¶
type ReadAttributesCommand struct {
AttributeIDs []uint16
}
type ReadAttributesResponse ¶
type ReadAttributesResponse struct {
ReadAttributeStatuses []*ReadAttributeStatus
}
type ReadAttributesStructuredCommand ¶
type ReadAttributesStructuredCommand struct {
AttributeSelectors []*AttributeSelector
}
type ReadReportingConfigurationCommand ¶
type ReadReportingConfigurationCommand struct {
AttributeRecords []*AttributeRecord
}
type ReadReportingConfigurationResponse ¶
type ReadReportingConfigurationResponse struct {
AttributeReportingConfigurationResponseRecords []*AttributeReportingConfigurationResponseRecord
}
type ReportAttributesCommand ¶
type ReportAttributesCommand struct {
AttributeReports []*AttributeReport
}
type ReportDirection ¶
type ReportDirection uint8
const ( ReportDirectionAttributeReported ReportDirection = 0x00 ReportDirectionAttributeReceived ReportDirection = 0x01 )
type ResetToFactoryDefaultsCommand ¶
type ResetToFactoryDefaultsCommand struct { }
type ScenesMysteryCommand7 ¶
type ScenesMysteryCommand7 struct {
DataRaw [4]byte
}
undocumented in ZCL spec...........
func (*ScenesMysteryCommand7) CommandClusterAndId ¶
func (c *ScenesMysteryCommand7) CommandClusterAndId() (ClusterId, uint8)
func (*ScenesMysteryCommand7) Left ¶
func (c *ScenesMysteryCommand7) Left() bool
type StepCommand ¶
ZCL spec section: 3.10.2.4.3
func (*StepCommand) CommandClusterAndId ¶
func (c *StepCommand) CommandClusterAndId() (ClusterId, uint8)
type StepOnOffCommand ¶
ZCL spec section: 3.10.2.4.5
func (*StepOnOffCommand) CommandClusterAndId ¶
func (c *StepOnOffCommand) CommandClusterAndId() (ClusterId, uint8)
type StopCommand ¶
type StopCommand struct{}
ZCL spec section: 3.10.2.4.4
func (*StopCommand) CommandClusterAndId ¶
func (c *StopCommand) CommandClusterAndId() (ClusterId, uint8)
type StopOnOffCommand ¶
type StopOnOffCommand struct{}
0x07,StopOnOff, ZCL spec section: 3.10.2.4.5
func (*StopOnOffCommand) CommandClusterAndId ¶
func (c *StopOnOffCommand) CommandClusterAndId() (ClusterId, uint8)
type WriteAttributeRecord ¶
type WriteAttributeStatus ¶
type WriteAttributesCommand ¶
type WriteAttributesCommand struct {
WriteAttributeRecords []*WriteAttributeRecord
}
type WriteAttributesNoResponseCommand ¶
type WriteAttributesNoResponseCommand struct {
WriteAttributeRecords []*WriteAttributeRecord
}
type WriteAttributesResponse ¶
type WriteAttributesResponse struct {
WriteAttributeStatuses []*WriteAttributeStatus
}
type WriteAttributesStructuredCommand ¶
type WriteAttributesStructuredCommand struct {
WriteAttributeStructuredRecords []*WriteAttributeStructuredRecord
}
type WriteAttributesStructuredResponse ¶
type WriteAttributesStructuredResponse struct {
WriteAttributeStatusRecords []*WriteAttributeStatusRecord
}
type WriteAttributesUndividedCommand ¶
type WriteAttributesUndividedCommand struct {
WriteAttributeRecords []*WriteAttributeRecord
}
type ZclCommand ¶
type ZclCommand uint8
const ( ZclCommandReadAttributes ZclCommand = 0x00 ZclCommandReadAttributesResponse ZclCommand = 0x01 ZclCommandWriteAttributes ZclCommand = 0x02 ZclCommandWriteAttributesUndivided ZclCommand = 0x03 ZclCommandWriteAttributesResponse ZclCommand = 0x04 ZclCommandWriteAttributesNoResponse ZclCommand = 0x05 ZclCommandConfigureReporting ZclCommand = 0x06 ZclCommandConfigureReportingResponse ZclCommand = 0x07 ZclCommandReadReportingConfiguration ZclCommand = 0x08 ZclCommandReadReportingConfigurationResponse ZclCommand = 0x09 ZclCommandReportAttributes ZclCommand = 0x0a ZclCommandDefaultResponse ZclCommand = 0x0b ZclCommandDiscoverAttributes ZclCommand = 0x0c ZclCommandDiscoverAttributesResponse ZclCommand = 0x0d ZclCommandReadAttributesStructured ZclCommand = 0x0e ZclCommandWriteAttributesStructured ZclCommand = 0x0f ZclCommandWriteAttributesStructuredResponse ZclCommand = 0x10 ZclCommandDiscoverCommandsReceived ZclCommand = 0x11 ZclCommandDiscoverCommandsReceivedResponse ZclCommand = 0x12 ZclCommandDiscoverCommandsGenerated ZclCommand = 0x13 ZclCommandDiscoverCommandsGeneratedResponse ZclCommand = 0x14 ZclCommandDiscoverAttributesExtended ZclCommand = 0x15 ZclCommandDiscoverAttributesExtendedResponse ZclCommand = 0x16 )
type ZclDataType ¶
type ZclDataType uint8
const ( ZclDataTypeNoData ZclDataType = 0x00 ZclDataTypeData8 ZclDataType = 0x08 ZclDataTypeData16 ZclDataType = 0x09 ZclDataTypeData24 ZclDataType = 0x0a ZclDataTypeData32 ZclDataType = 0x0b ZclDataTypeData40 ZclDataType = 0x0c ZclDataTypeData48 ZclDataType = 0x0d ZclDataTypeData56 ZclDataType = 0x0e ZclDataTypeData64 ZclDataType = 0x0f ZclDataTypeBoolean ZclDataType = 0x10 ZclDataTypeBitmap8 ZclDataType = 0x18 ZclDataTypeBitmap16 ZclDataType = 0x19 ZclDataTypeBitmap24 ZclDataType = 0x1a ZclDataTypeBitmap32 ZclDataType = 0x1b ZclDataTypeBitmap40 ZclDataType = 0x1c ZclDataTypeBitmap48 ZclDataType = 0x1d ZclDataTypeBitmap56 ZclDataType = 0x1e ZclDataTypeBitmap64 ZclDataType = 0x1f ZclDataTypeUint8 ZclDataType = 0x20 ZclDataTypeUint16 ZclDataType = 0x21 ZclDataTypeUint24 ZclDataType = 0x22 ZclDataTypeUint32 ZclDataType = 0x23 ZclDataTypeUint40 ZclDataType = 0x24 ZclDataTypeUint48 ZclDataType = 0x25 ZclDataTypeUint56 ZclDataType = 0x26 ZclDataTypeUint64 ZclDataType = 0x27 ZclDataTypeInt8 ZclDataType = 0x28 ZclDataTypeInt16 ZclDataType = 0x29 ZclDataTypeInt24 ZclDataType = 0x2a ZclDataTypeInt32 ZclDataType = 0x2b ZclDataTypeInt40 ZclDataType = 0x2c ZclDataTypeInt48 ZclDataType = 0x2d ZclDataTypeInt56 ZclDataType = 0x2e ZclDataTypeInt64 ZclDataType = 0x2f ZclDataTypeEnum8 ZclDataType = 0x30 ZclDataTypeEnum16 ZclDataType = 0x31 ZclDataTypeSemiPrec ZclDataType = 0x38 ZclDataTypeSinglePrec ZclDataType = 0x39 ZclDataTypeDoublePrec ZclDataType = 0x3a ZclDataTypeOctetStr ZclDataType = 0x41 ZclDataTypeCharStr ZclDataType = 0x42 ZclDataTypeLongOctetStr ZclDataType = 0x43 ZclDataTypeLongCharStr ZclDataType = 0x44 ZclDataTypeArray ZclDataType = 0x48 ZclDataTypeStruct ZclDataType = 0x4c ZclDataTypeSet ZclDataType = 0x50 ZclDataTypeBag ZclDataType = 0x51 ZclDataTypeTod ZclDataType = 0xe0 ZclDataTypeDate ZclDataType = 0xe1 ZclDataTypeUtc ZclDataType = 0xe2 ZclDataTypeClusterId ZclDataType = 0xe8 ZclDataTypeAttrId ZclDataType = 0xe9 ZclDataTypeBacOid ZclDataType = 0xea ZclDataTypeIeeeAddr ZclDataType = 0xf0 ZclDataType_128BitSecKey ZclDataType = 0xf1 ZclDataTypeUnknown ZclDataType = 0xff )
type ZclStatus ¶
type ZclStatus uint8
const ( ZclStatusSuccess ZclStatus = 0x00 ZclStatusFailure ZclStatus = 0x01 // 0x02-0x7D are reserved. ZclStatusNotAuthorized ZclStatus = 0x7E ZclStatusMalformedCommand ZclStatus = 0x80 ZclStatusUnsupClusterCommand ZclStatus = 0x81 ZclStatusUnsupGeneralCommand ZclStatus = 0x82 ZclStatusUnsupManuClusterCommand ZclStatus = 0x83 ZclStatusUnsupManuGeneralCommand ZclStatus = 0x84 ZclStatusInvalidField ZclStatus = 0x85 ZclStatusUnsupportedAttribute ZclStatus = 0x86 ZclStatusInvalidValue ZclStatus = 0x87 ZclStatusReadOnly ZclStatus = 0x88 ZclStatusInsufficientSpace ZclStatus = 0x89 ZclStatusDuplicateExists ZclStatus = 0x8a ZclStatusNotFound ZclStatus = 0x8b ZclStatusUnreportableAttribute ZclStatus = 0x8c ZclStatusInvalidDataType ZclStatus = 0x8d ZclStatusInvalidSelector ZclStatus = 0x8e ZclStatusWriteOnly ZclStatus = 0x8f ZclStatusInconsistentStartupState ZclStatus = 0x90 ZclStatusDefinedOutOfBand ZclStatus = 0x91 ZclStatusInconsistent ZclStatus = 0x92 ZclStatusActionDenied ZclStatus = 0x93 ZclStatusTimeout ZclStatus = 0x94 ZclStatusAbort ZclStatus = 0x95 ZclStatusInvalidImage ZclStatus = 0x96 ZclStatusWaitForData ZclStatus = 0x97 ZclStatusNoImageAvailable ZclStatus = 0x98 ZclStatusRequireMoreImage ZclStatus = 0x99 // 0xbd-bf are reserved. ZclStatusHardwareFailure ZclStatus = 0xc0 ZclStatusSoftwareFailure ZclStatus = 0xc1 ZclStatusCalibrationError ZclStatus = 0xc2 // 0xc3-0xff are reserved. ZclStatusCmdHasRsp ZclStatus = 0xFF // Non-standard status (used for Default Rsp) )
type ZoneStatus ¶
type ZoneStatus uint16
ZCL spec section: 8.2.2.2.1.3
func (ZoneStatus) Alarm1 ¶
func (z ZoneStatus) Alarm1() bool
func (ZoneStatus) UnimplementedBitsSet ¶
func (z ZoneStatus) UnimplementedBitsSet() bool
type ZoneStatusChangeNotificationCommand ¶
type ZoneStatusChangeNotificationCommand struct { ZoneStatus ZoneStatus ExtendedStatus uint8 // "SHALL be set to zero" ZoneID uint8 Delay uint16 }