Scene Selector device has 4 clusters (see spec 7.4.5):
Scene Selector device sample
- Example
- Declaring clusters
ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST(basic_attr_list, &g_attr_zcl_version, &g_attr_power_source);
ZB_ZCL_DECLARE_IDENTIFY_ATTRIB_LIST(identify_attr_list, &g_attr_identify_time);
Registering device list Example of command handler switch (cmd_info->cluster_id)
{
{
{
TRACE_MSG(TRACE_ZCL3, "Got response in cluster 0x%04x",
( FMT__D, cmd_info->cluster_id));
break;
default:
TRACE_MSG(TRACE_ZCL2,
"Skip general command %hd", (FMT__H, cmd_info->
cmd_id));
break;
}
}
else
{
{
TRACE_MSG(TRACE_ZCL3,
"Got cluster command 0x%04x", (FMT__D, cmd_info->
cmd_id));
break;
default:
TRACE_MSG(TRACE_ZCL2,
"Cluster command %hd, skip it", (FMT__H, cmd_info->
cmd_id));
break;
}
}
break;
See ha/devices_generic sample
#define ZB_HA_DECLARE_SCENE_SELECTOR_CLUSTER_LIST |
( |
|
cluster_list_name, |
|
|
|
basic_attr_list, |
|
|
|
identify_attr_list |
|
) |
| |
Declare cluster list for Scene selector device.
- Parameters
-
cluster_list_name | - cluster list variable name |
basic_attr_list | - attribute list for Basic cluster |
identify_attr_list | - attribute list for Identify cluster |
Declare Scene Selector device context.
- Parameters
-
device_ctx | - device context variable name. |
ep_name | - endpoint variable name. |
#define ZB_HA_DECLARE_SCENE_SELECTOR_EP |
( |
|
ep_name, |
|
|
|
ep_id, |
|
|
|
cluster_list |
|
) |
| |
Value:ZB_ZCL_DECLARE_SCENE_SELECTOR_SIMPLE_DESC(ep_name, ep_id, \
ZB_HA_SCENE_SELECTOR_IN_CLUSTER_NUM, ZB_HA_SCENE_SELECTOR_OUT_CLUSTER_NUM);
\
0, NULL, \
0, NULL)
ZCL cluster description.
Definition: zb_zcl_common.h:97
Definition: zboss_api_af.h:287
#define ZB_AF_DECLARE_ENDPOINT_DESC(ep_name,ep_id,profile_id,reserved_length,reserved_ptr,cluster_number,cluster_list,simple_desc,rep_count,rep_ctx,lev_ctrl_count,lev_ctrl_ctx)
Initialize endpoint descriptor.
Definition: zboss_api_af.h:490
Definition: zboss_api_af.h:201
Declare endpoint for Scene selector device.
- Parameters
-
ep_name | - endpoint variable name |
ep_id | - endpoint ID |
cluster_list | - endpoint cluster list |
#define ZB_HA_DEVICE_VER_SCENE_SELECTOR 0 |
Scene selector device version