Developing with ZBOSS
|
Macros | |
#define | ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST( cluster_list_name, on_off_switch_config_attr_list, basic_attr_list, identify_attr_list) |
Declare cluster list for On/Off switch device. More... | |
#define | ZB_HA_DECLARE_ON_OFF_SWITCH_EP(ep_name, ep_id, cluster_list) |
Declare endpoint for On/off Switch device. More... | |
#define | ZB_HA_DECLARE_ON_OFF_SWITCH_CTX(device_ctx, ep_name) ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx, ep_name) |
Declare On/Off Switch device context. More... | |
On/Off Switch device has 6 clusters (see spec 7.4.1):
On/Off Switch device sample
Declaring clusters:
Registering device list:
Example of command handler:
The complete set of On/Off samples can be found in /application/HA_samples/on_off_switch
#define ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST | ( | cluster_list_name, | |
on_off_switch_config_attr_list, | |||
basic_attr_list, | |||
identify_attr_list | |||
) |
Declare cluster list for On/Off switch device.
cluster_list_name | - cluster list variable name |
on_off_switch_config_attr_list | - attribute list for On/off switch configuration cluster |
basic_attr_list | - attribute list for Basic cluster |
identify_attr_list | - attribute list for Identify cluster |
#define ZB_HA_DECLARE_ON_OFF_SWITCH_CTX | ( | device_ctx, | |
ep_name | |||
) | ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx, ep_name) |
Declare On/Off Switch device context.
device_ctx | - device context variable name. |
ep_name | - endpoint variable name. |
#define ZB_HA_DECLARE_ON_OFF_SWITCH_EP | ( | ep_name, | |
ep_id, | |||
cluster_list | |||
) |
Declare endpoint for On/off Switch device.
ep_name | - endpoint variable name |
ep_id | - endpoint ID |
cluster_list | - endpoint cluster list |