Configuration Tool device has 3 clusters (see spec 7.4.6):
Configuration Tool device sample
- Example
- Declaring clusters
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 res 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;
The complete set of Configuration Tool device samples can be found in /snippet/ha_configuration_tool_sample.c.
#define ZB_HA_DECLARE_CONFIGURATION_TOOL_CLUSTER_LIST |
( |
|
cluster_list_name, |
|
|
|
basic_attr_list, |
|
|
|
identify_attr_list |
|
) |
| |
Declare cluster list for Configuration tool 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 Configuration Tool device context.
- Parameters
-
device_ctx | - device context variable name. |
ep_name | - endpoint variable name. |
#define ZB_HA_DECLARE_CONFIGURATION_TOOL_EP |
( |
|
ep_name, |
|
|
|
ep_id, |
|
|
|
cluster_list |
|
) |
| |
Value:ZB_ZCL_DECLARE_CONFIGURATION_TOOL_SIMPLE_DESC(ep_name, ep_id, \
ZB_HA_CONFIGURATION_TOOL_IN_CLUSTER_NUM, ZB_HA_CONFIGURATION_TOOL_OUT_CLUSTER_NUM);
\
0, NULL, \
0, NULL)
ZCL cluster description.
Definition: zb_zcl_common.h:143
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 Configuration tool device.
- Parameters
-
ep_name | - endpoint variable name |
ep_id | - endpoint ID |
cluster_list | - endpoint cluster list |
#define ZB_HA_DEVICE_VER_CONFIGURATION_TOOL 0 |
Configuration tool device version