|
Developing with ZBOSS for Zigbee
|
Door Lock device has 5 clusters (see spec 7.4.11):
Door Lock device sample
- Example
◆ ZB_HA_DECLARE_DOOR_LOCK_CLUSTER_LIST
#define ZB_HA_DECLARE_DOOR_LOCK_CLUSTER_LIST |
( |
|
cluster_list_name, |
|
|
|
door_lock_attr_list, |
|
|
|
basic_attr_list, |
|
|
|
identify_attr_list, |
|
|
|
groups_attr_list, |
|
|
|
scenes_attr_list |
|
) |
| |
Declare cluster list for Door Lock device.
- Parameters
-
cluster_list_name | - cluster list variable name |
door_lock_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 |
groups_attr_list | - attribute list for Groups cluster |
scenes_attr_list | - attribute list for Scenes cluster |
◆ ZB_HA_DECLARE_DOOR_LOCK_CTX
Declares Door Lock device context.
- Parameters
-
device_ctx | - device context variable name. |
ep_name | - endpoint variable name. |
◆ ZB_HA_DECLARE_DOOR_LOCK_EP
#define ZB_HA_DECLARE_DOOR_LOCK_EP |
( |
|
ep_name, |
|
|
|
ep_id, |
|
|
|
cluster_list |
|
) |
| |
Value: ZB_ZCL_DECLARE_DOOR_LOCK_SIMPLE_DESC(ep_name, ep_id, \
ZB_HA_DOOR_LOCK_IN_CLUSTER_NUM, ZB_HA_DOOR_LOCK_OUT_CLUSTER_NUM); \
ZBOSS_DEVICE_DECLARE_REPORTING_CTX(reporting_info## device_ctx_name, \
ZB_HA_DOOR_LOCK_REPORT_ATTR_COUNT); \
0, \
NULL, \
cluster_list, \
(zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
ZB_HA_DOOR_LOCK_REPORT_ATTR_COUNT, \
reporting_info## device_ctx_name, \
0, NULL)
Declare endpoint for Door Lock device.
- Parameters
-
ep_name | - endpoint variable name |
ep_id | - endpoint ID |
cluster_list | - endpoint cluster list |
◆ ZB_HA_DEVICE_VER_DOOR_LOCK
#define ZB_HA_DEVICE_VER_DOOR_LOCK 0 |
#define ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT( attr_list, zcl_version, app_version, stack_version, hardware_version, manufacturer_name, model_id, date_code, power_source, location_id, ph_env, sw_build_id)
Declare attribute list for Basic cluster (extended attribute set).
Definition: zb_zcl_basic.h:358
#define ZB_ZCL_BASIC_HW_VERSION_DEFAULT_VALUE
Default value for Hardware version attribute.
Definition: zb_zcl_basic.h:167
#define ZB_AF_HA_PROFILE_ID
Definition: zboss_api_af.h:287
#define ZB_ZCL_REGISTER_DEVICE_CB(func_ptr)
Set Device user application callback. The macro sets a callback being called upon to need inform User...
Definition: zboss_api_af.h:748
@ ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_ID
LockState attribute.
Definition: zb_zcl_door_lock.h:66
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:153
zb_ret_t status
Definition: zboss_api_zcl.h:1758
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:359
#define ZB_ZCL_CLUSTER_ID_ON_OFF
Definition: zb_zcl_common.h:211
#define ZB_ZCL_DECLARE_GROUPS_ATTRIB_LIST(attr_list, name_support)
Declare attribute list for Groups cluster.
Definition: zb_zcl_groups.h:70
zb_uint16_t attr_id
Definition: zb_zcl_common.h:2099
#define ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE
Default value for ZCL version attribute.
Definition: zb_zcl_basic.h:158
#define ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE
Default value for Scene valid attribute.
Definition: zb_zcl_scenes.h:106
ZCL cluster description.
Definition: zb_zcl_common.h:127
#define ZB_ZCL_BASIC_SW_BUILD_ID_DEFAULT_VALUE
Default value for SWBuildId attribute.
Definition: zb_zcl_basic.h:222
@ ZB_ZCL_DOOR_LOCK_UNLOCK_DOOR_CB_ID
Definition: zboss_api_zcl.h:1603
zb_uint8_t zb_bool_t
General purpose boolean type. For C90, 'zb_bool_t' is an alias of 'zb_uint8_t'. For C99,...
Definition: zb_types.h:371
#define ZB_HA_DECLARE_DOOR_LOCK_EP(ep_name, ep_id, cluster_list)
Declare endpoint for Door Lock device.
Definition: zb_ha_door_lock.h:172
@ ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_LOCKED
Definition: zb_zcl_door_lock.h:177
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:447
#define ZB_ZCL_CLUSTER_SERVER_ROLE
Definition: zb_zcl_common.h:188
#define ZB_ZCL_BASIC_APPLICATION_VERSION_DEFAULT_VALUE
Default value for Application version attribute.
Definition: zb_zcl_basic.h:161
zb_uint8_t data8
Definition: zb_zcl_common.h:2109
char zb_char_t
Project-local char type.
Definition: zb_types.h:149
#define ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE
Default value for Identify attribute.
Definition: zb_zcl_identify.h:64
@ ZB_ZCL_SET_ATTR_VALUE_CB_ID
Definition: zboss_api_zcl.h:381
#define ZB_ZCL_BASIC_MANUFACTURER_NAME_DEFAULT_VALUE
Default value for Manufacturer name attribute.
Definition: zb_zcl_basic.h:170
@ ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_UNLOCKED
Definition: zb_zcl_door_lock.h:179
#define ZB_AF_REGISTER_DEVICE_CTX(_device_ctx)
Definition: zboss_api_af.h:734
#define ZB_HA_DECLARE_DOOR_LOCK_CTX(device_ctx, ep_name)
Declares Door Lock device context.
Definition: zb_ha_door_lock.h:192
#define ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE
Default value for Current group attribute.
Definition: zb_zcl_scenes.h:103
#define ZB_ZCL_DECLARE_SCENES_ATTRIB_LIST( attr_list, scene_count, current_scene, current_group, scene_valid, name_support)
Declares Scenes attribute list.
Definition: zb_zcl_scenes.h:180
@ ZB_ZCL_DOOR_LOCK_LOCK_DOOR_CB_ID
Definition: zboss_api_zcl.h:1590
#define ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE
Default value for Power source attribute.
Definition: zb_zcl_basic.h:179
#define ZB_ZCL_BASIC_MODEL_IDENTIFIER_DEFAULT_VALUE
Default value for Model identifier attribute.
Definition: zb_zcl_basic.h:173
zb_zcl_status_t zb_zcl_set_attr_val(zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint8_t cluster_role, zb_uint16_t attr_id, zb_uint8_t *value, zb_bool_t check_access)
Sets attribute value, perform all needed checks before and after setting new value.
Data for Device user application callback. This structure has receive to User application callback (s...
Definition: zboss_api_zcl.h:1751
#define RET_OK
Error codes for non-void stack functions. In general, function can return OK, BLOCKED or some error....
Definition: zb_errors.h:78
#define ZB_ZCL_BASIC_DATE_CODE_DEFAULT_VALUE
Default value for Date code attribute.
Definition: zb_zcl_basic.h:176
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:157
#define ZB_ZCL_BASIC_STACK_VERSION_DEFAULT_VALUE
Default value for Stack version attribute.
Definition: zb_zcl_basic.h:164
zb_uint16_t cluster_id
Definition: zb_zcl_common.h:2098
@ ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID
OnOff attribute.
Definition: zb_zcl_on_off.h:60
union zb_zcl_device_callback_param_s::@1 cb_param
#define ZB_ZCL_DECLARE_DOOR_LOCK_ATTRIB_LIST(attr_list, lock_state, lock_type, actuator_enabled)
Declare attribute list for Door Lock cluster.
Definition: zb_zcl_door_lock.h:243
#define ZB_FALSE
Definition: zb_types.h:374
#define ZB_ZCL_SCENES_SCENE_COUNT_DEFAULT_VALUE
Default value for Scene count attribute.
Definition: zb_zcl_scenes.h:97
#define ZB_ZCL_CLUSTER_ID_DOOR_LOCK
Definition: zb_zcl_common.h:238
#define ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE
Default value for Current scene attribute.
Definition: zb_zcl_scenes.h:100
#define ZB_ZCL_BASIC_PHYSICAL_ENVIRONMENT_DEFAULT_VALUE
Default value for Physical environment attribute.
Definition: zb_zcl_basic.h:206
zb_zcl_device_callback_id_t device_cb_id
Definition: zboss_api_zcl.h:1754
#define ZB_ZCL_BASIC_LOCATION_DESCRIPTION_DEFAULT_VALUE
Default value for location description attribute.
Definition: zb_zcl_basic.h:203
#define ZB_HA_DECLARE_DOOR_LOCK_CLUSTER_LIST( cluster_list_name, door_lock_attr_list, basic_attr_list, identify_attr_list, groups_attr_list, scenes_attr_list)
Declare cluster list for Door Lock device.
Definition: zb_ha_door_lock.h:90