Door Lock Controller device has 5 clusters (see spec 7.4.12):
Door Lock Controller 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);
ZB_ZCL_DECLARE_GROUPS_ATTRIB_LIST(groups_attr_list,
&g_attr_name_support);
basic_attr_list,
identify_attr_list,
groups_attr_list);
HA_DOOR_LOCK_CONTROLLER_ENDPOINT,
door_lock_controller_cluster);
door_lock_controller_ep);
Registering device list Example of command handler switch( cmd_info -> cmd_id )
{
TRACE_MSG(TRACE_ZCL3,
"Got cluster command res 0x%04x",
TRACE_MSG(TRACE_ZCL1,
"Response: ZB_ZCL_CMD_DOOR_LOCK_UNLOCK_DOOR_RES",
(FMT__0));
if( pupayload )
{
{
TRACE_MSG(TRACE_ERROR, "Error, unknown response received", (FMT__0));
}
else
{
TRACE_MSG(TRACE_ZCL2, " Command \" Unlock Door\" OK", (FMT__0));
}
}
else
{
TRACE_MSG(TRACE_ERROR, "Error, no payload received", (FMT__0));
}
break;
See ha/devices_closures sample
#define ZB_HA_DECLARE_DOOR_LOCK_CONTROLLER_CLUSTER_LIST |
( |
|
cluster_list_name, |
|
|
|
basic_attr_list, |
|
|
|
identify_attr_list |
|
) |
| |
Declare cluster list for Door Lock Controller 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 Door Lock Controller device context.
- Parameters
-
device_ctx | - device context variable name. |
ep_name | - endpoint definition variable name. |
#define ZB_HA_DECLARE_DOOR_LOCK_CONTROLLER_EP |
( |
|
ep_name, |
|
|
|
ep_id, |
|
|
|
cluster_list |
|
) |
| |
Value:ZB_ZCL_DECLARE_DOOR_LOCK_CONTROLLER_SIMPLE_DESC(ep_name, ep_id, \
ZB_HA_DOOR_LOCK_CONTROLLER_IN_CLUSTER_NUM, ZB_HA_DOOR_LOCK_CONTROLLER_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 endpointy for Door Lock Controller device.
- Parameters
-
ep_name | - endpoint variable name |
ep_id | - endpoint ID |
cluster_list | - endpoint cluster list |
#define ZB_HA_DEVICE_VER_DOOR_LOCK_CONTROLLER 0 |
Door Lock Controller device version