Digi XBee(R) ANSI C Host Library
Macros

On/Off Cluster: Attributes and commands for switching devices between 'On' and 'Off' states. More...

Go to the source code of this file.

Macros

#define ZCL_ONOFF_ATTR_ONOFF   0x0000
 OnOff attribute, Boolean, Read only, Mandatory; Shall be reported.
 
#define ZCL_ONOFF_ON   1
 
#define ZCL_ONOFF_OFF   0
 
#define ZCL_ONOFF_CMD_OFF   0x00
 Off command, Mandatory.
 
#define ZCL_ONOFF_CMD_ON   0x01
 On command, Mandatory.
 
#define ZCL_ONOFF_CMD_TOGGLE   0x02
 Toggle command, Mandatory.
 
#define ZCL_SWITCH_ATTR_SWITCH_TYPE   0x0000
 SwitchType, 8-bit Enumeration, Read only, Mandatory.
 
#define ZCL_SWITCH_TYPE_TOGGLE   0x00
 
#define ZCL_SWITCH_TYPE_MOMENTARY   0x01
 
#define ZCL_SWITCH_ATTR_SWITCH_ACTIONS   0x0010
 SwitchActions, 8-bit Enumeration, Read/Write, Mandatory.
 
#define ZCL_SWITCH_ACTION_ONOFF   0x00
 
#define ZCL_SWITCH_ACTION_OFFON   0x01
 
#define ZCL_SWITCH_ACTION_TOGGLE   0x02
 

Detailed Description

On/Off Cluster: Attributes and commands for switching devices between 'On' and 'Off' states.

ZCL General Specification, Section 3.8

On/Off Switch Configuration Cluster: Attributes and commands for configuring On/Off switching devices.

ZCL General Specification, Section 3.9

Todo:
Write code to support OnOff commands. Create sample program demonstrating use of these clusters (perhaps using LEDs and switches of XBIB-U-DEV board). REQUIRES: need to have reporting in place before this cluster is really useful. Devices need to receive updates whenever switch status changes.