|
Developing with ZBOSS for Zigbee
|
|
#define | ZB_HA_DEVICE_VER_WINDOW_COVERING 0 |
|
#define | ZB_HA_DECLARE_WINDOW_COVERING_CLUSTER_LIST( cluster_list_name, basic_attr_list, identify_attr_list, groups_attr_list, scenes_attr_list, window_covering_attr_list) |
| Declare cluster list for window covering device. More...
|
|
#define | ZB_ZCL_DECLARE_WINDOW_COVERING_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num) |
| Declare simple descriptor for window covering device. More...
|
|
#define | ZB_HA_DECLARE_WINDOW_COVERING_EP(ep_name, ep_id, cluster_list) |
| Declare endpoint for window covering device. More...
|
|
#define | ZB_HA_DECLARE_WINDOW_COVERING_CTX(device_ctx, ep_name) ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx, ep_name) |
| Declare application's device context for Window Covering device. More...
|
|
Window Covering device has 5 clusters (see spec 7.6.3):
Window Covering device sample
- Example
◆ ZB_HA_DECLARE_WINDOW_COVERING_CLUSTER_LIST
#define ZB_HA_DECLARE_WINDOW_COVERING_CLUSTER_LIST |
( |
|
cluster_list_name, |
|
|
|
basic_attr_list, |
|
|
|
identify_attr_list, |
|
|
|
groups_attr_list, |
|
|
|
scenes_attr_list, |
|
|
|
window_covering_attr_list |
|
) |
| |
Declare cluster list for window covering 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 |
groups_attr_list | - attribute list for Groups cluster |
scenes_attr_list | - attribute list for Scenes cluster |
window_covering_attr_list | - attribute list for Window covering cluster |
◆ ZB_HA_DECLARE_WINDOW_COVERING_CTX
Declare application's device context for Window Covering device.
- Parameters
-
device_ctx | - device context variable |
ep_name | - endpoint variable name |
◆ ZB_HA_DECLARE_WINDOW_COVERING_EP
#define ZB_HA_DECLARE_WINDOW_COVERING_EP |
( |
|
ep_name, |
|
|
|
ep_id, |
|
|
|
cluster_list |
|
) |
| |
Value:
ZB_HA_WINDOW_COVERING_IN_CLUSTER_NUM, ZB_HA_WINDOW_COVERING_OUT_CLUSTER_NUM); \
ZBOSS_DEVICE_DECLARE_REPORTING_CTX(reporting_info## ep_name, \
ZB_HA_WINDOW_COVERING_REPORT_ATTR_COUNT); \
0, \
NULL, \
(zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
ZB_HA_WINDOW_COVERING_REPORT_ATTR_COUNT, reporting_info## ep_name, \
0, NULL)
Declare endpoint for window covering device.
- Parameters
-
ep_name | - endpoint variable name |
ep_id | - endpoint ID |
cluster_list | - endpoint cluster list |
◆ ZB_HA_DEVICE_VER_WINDOW_COVERING
#define ZB_HA_DEVICE_VER_WINDOW_COVERING 0 |
Window covering device version
◆ ZB_ZCL_DECLARE_WINDOW_COVERING_SIMPLE_DESC
#define ZB_ZCL_DECLARE_WINDOW_COVERING_SIMPLE_DESC |
( |
|
ep_name, |
|
|
|
ep_id, |
|
|
|
in_clust_num, |
|
|
|
out_clust_num |
|
) |
| |
Value:
ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) simple_desc_##ep_name = \
{ \
ep_id, \
ZB_AF_HA_PROFILE_ID, \
ZB_HA_WINDOW_COVERING_DEVICE_ID, \
ZB_HA_DEVICE_VER_WINDOW_COVERING, \
0, \
in_clust_num, \
out_clust_num, \
{ \
ZB_ZCL_CLUSTER_ID_BASIC, \
ZB_ZCL_CLUSTER_ID_IDENTIFY, \
ZB_ZCL_CLUSTER_ID_WINDOW_COVERING, \
ZB_ZCL_CLUSTER_ID_SCENES, \
ZB_ZCL_CLUSTER_ID_GROUPS \
} \
}
Declare simple descriptor for window covering device.
- Parameters
-
ep_name | - endpoint variable name |
ep_id | - endpoint ID |
in_clust_num | - number of supported input clusters |
out_clust_num | - number of supported output clusters |
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value,...
Definition: zb_zcl_common.h:878
#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:374
#define ZB_ZCL_BASIC_HW_VERSION_DEFAULT_VALUE
Default value for Hardware version attribute.
Definition: zb_zcl_basic.h:170
#define ZB_AF_HA_PROFILE_ID
Definition: zboss_api_af.h:287
#define ZB_ZCL_SCENES_FREE_SCENE_TABLE_RECORD
Declares a "free record" marker for a scene table Used as a value of a group_id field in a correspond...
Definition: zb_zcl_scenes.h:174
#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_uint16_t group_id
Definition: zb_zcl_scenes.h:1011
@ ZB_ZCL_SCENES_INTERNAL_REMOVE_ALL_SCENES_ALL_ENDPOINTS_ALL_GROUPS_CB_ID
Definition: zboss_api_zcl.h:1630
#define ZB_DECLARE_SIMPLE_DESC(in_clusters_count, out_clusters_count)
Definition: zboss_api_af.h:237
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:1811
#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
@ ZB_ZCL_WINDOW_COVERING_GO_TO_LIFT_PERCENTAGE_CB_ID
Definition: zboss_api_zcl.h:1432
#define ZB_ZCL_DECLARE_GROUPS_ATTRIB_LIST(attr_list, name_support)
Declare attribute list for Groups cluster.
Definition: zb_zcl_groups.h:73
#define ZB_ZCL_WINDOW_COVERING_WINDOW_COVERING_TYPE_DEFAULT_VALUE
Window covering type attribute default value.
Definition: zb_zcl_window_covering.h:193
#define ZB_ZCL_STATUS_NOT_FOUND
Definition: zb_zcl_common.h:362
#define ZB_ZCL_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_DEFAULT_VALUE
Current position lift percentage attribute default value.
Definition: zb_zcl_window_covering.h:202
#define ZB_ZCL_WINDOW_COVERING_INSTALLED_OPEN_LIMIT_TILT_DEFAULT_VALUE
Installed open limit tilt attribute default value.
Definition: zb_zcl_window_covering.h:220
#define ZB_AF_SET_ENDPOINT_HANDLER(endpoint, handler)
Allows application to register cluster commands handler for a specific endpoint.
Definition: zboss_api_af.h:552
@ ZB_ZCL_WINDOW_COVERING_UP_OPEN_CB_ID
Definition: zboss_api_zcl.h:1398
Store scene command payload structure.
Definition: zb_zcl_scenes.h:928
#define ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE
Default value for ZCL version attribute.
Definition: zb_zcl_basic.h:161
Definition: zb_zcl_common.h:1130
#define ZB_ZCL_DEVICE_CMD_PARAM_CMD_INFO(_param)
Definition: zboss_api_zcl.h:1920
#define ZB_ZCL_WINDOW_COVERING_INSTALLED_CLOSED_LIMIT_TILT_DEFAULT_VALUE
Installed closed limit tilt attribute default value.
Definition: zb_zcl_window_covering.h:223
#define ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE
Default value for Scene valid attribute.
Definition: zb_zcl_scenes.h:119
@ ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE_ID
Current Position Tilt Percentage attribute.
Definition: zb_zcl_window_covering.h:80
ZCL cluster description.
Definition: zb_zcl_common.h:127
#define ZB_ZCL_FRAME_DIRECTION_TO_CLI
Definition: zb_zcl_common.h:1038
ZCL attribute definition structure.
Definition: zb_zcl_common.h:705
#define ZB_ZCL_BASIC_SW_BUILD_ID_DEFAULT_VALUE
Default value for SWBuildId attribute.
Definition: zb_zcl_basic.h:225
@ ZB_ZCL_WINDOW_COVERING_DOWN_CLOSE_CB_ID
Definition: zboss_api_zcl.h:1409
#define ZB_HA_DECLARE_WINDOW_COVERING_CTX(device_ctx, ep_name)
Declare application's device context for Window Covering device.
Definition: zb_ha_window_covering.h:189
#define ZB_MAC_LQI_UNDEFINED
Definition: zboss_api_nwk.h:160
#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
signed char zb_int8_t
Project-local 1-byte signed int type.
Definition: zb_types.h:155
#define ZB_ZCL_BASIC_APPLICATION_VERSION_DEFAULT_VALUE
Default value for Application version attribute.
Definition: zb_zcl_basic.h:164
#define ZB_ZCL_PARSED_HDR_SHORT_DATA(header)
Extract common addressing data from parsed ZCL structure.
Definition: zb_zcl_common.h:1194
char zb_char_t
Project-local char type.
Definition: zb_types.h:149
#define ZB_MAC_RSSI_UNDEFINED
Definition: zboss_api_nwk.h:164
#define ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE
Default value for Identify attribute.
Definition: zb_zcl_identify.h:67
@ ZB_ZCL_SET_ATTR_VALUE_CB_ID
Definition: zboss_api_zcl.h:382
#define ZB_ZCL_DECLARE_WINDOW_COVERING_CLUSTER_ATTRIB_LIST(attr_list, window_covering_type, config_status, current_position_lift_percentage, current_position_tilt_percentage, installed_open_limit_lift, installed_closed_limit_lift, installed_open_limit_tilt, installed_closed_limit_tilt, mode)
Declare attribute list for Window Covering cluster.
Definition: zb_zcl_window_covering.h:263
#define ZB_ZCL_BASIC_MANUFACTURER_NAME_DEFAULT_VALUE
Default value for Manufacturer name attribute.
Definition: zb_zcl_basic.h:173
#define ZB_AF_REGISTER_DEVICE_CTX(_device_ctx)
Definition: zboss_api_af.h:734
Structured representation of GO_TO_TILT_PERCENTAGE command payload.
Definition: zb_zcl_window_covering.h:524
void zb_zdo_get_diag_data(zb_uint16_t short_address, zb_uint8_t *lqi, zb_int8_t *rssi)
Obtains last known LQI and RSSI values from device with specified short address.
#define ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE
Default value for Current group attribute.
Definition: zb_zcl_scenes.h:116
@ ZB_ZCL_ATTR_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE_ID
Current Position Lift Percentage attribute.
Definition: zb_zcl_window_covering.h:78
#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:194
#define ZB_ZCL_WINDOW_COVERING_MODE_DEFAULT_VALUE
Mode attribute default value.
Definition: zb_zcl_window_covering.h:236
zb_uint8_t scene_id
Definition: zb_zcl_scenes.h:1012
zb_uint16_t group_id
Definition: zb_zcl_scenes.h:930
#define ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE
Default value for Power source attribute.
Definition: zb_zcl_basic.h:182
@ ZB_ZCL_SCENES_STORE_SCENE_CB_ID
Definition: zboss_api_zcl.h:1481
zb_uint8_t cmd_direction
Definition: zb_zcl_common.h:1166
#define ZB_HA_DECLARE_WINDOW_COVERING_CLUSTER_LIST( cluster_list_name, basic_attr_list, identify_attr_list, groups_attr_list, scenes_attr_list, window_covering_attr_list)
Declare cluster list for window covering device.
Definition: zb_ha_window_covering.h:90
#define ZB_ZCL_COPY_PARSED_HEADER(buf, dst)
Copy parsed ZCL header from buffer.
Definition: zb_zcl_common.h:1444
#define ZB_ZCL_BASIC_MODEL_IDENTIFIER_DEFAULT_VALUE
Default value for Model identifier attribute.
Definition: zb_zcl_basic.h:176
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:1804
zb_zcl_attr_t * zb_zcl_get_attr_desc_a(zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint8_t cluster_role, zb_uint16_t attr_id)
#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
zb_uint8_t scene_id
Definition: zb_zcl_scenes.h:931
#define ZB_ZCL_BASIC_DATE_CODE_DEFAULT_VALUE
Default value for Date code attribute.
Definition: zb_zcl_basic.h:179
#define ZB_ZCL_DEVICE_CMD_PARAM_OUT_GET(_param, _ptype)
Definition: zboss_api_zcl.h:1913
#define ZB_ZCL_WINDOW_COVERING_INSTALLED_CLOSED_LIMIT_LIFT_DEFAULT_VALUE
Installed closed limit lift attribute default value.
Definition: zb_zcl_window_covering.h:217
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:167
#define ZB_ZCL_WINDOW_COVERING_INSTALLED_OPEN_LIMIT_LIFT_DEFAULT_VALUE
Installed open limit lift attribute default value.
Definition: zb_zcl_window_covering.h:214
@ ZB_ZCL_WINDOW_COVERING_GO_TO_TILT_PERCENTAGE_CB_ID
Definition: zboss_api_zcl.h:1444
#define ZB_ZCL_STATUS_SUCCESS
Definition: zb_zcl_common.h:346
zb_uint8_t percentage_tilt_value
Definition: zb_zcl_window_covering.h:527
@ 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
Structured representation of GO_TO_LIFT_PERCENTAGE command payload.
Definition: zb_zcl_window_covering.h:509
@ ZB_ZCL_SCENES_RECALL_SCENE_CB_ID
Definition: zboss_api_zcl.h:1539
Recall scene command payload structure.
Definition: zb_zcl_scenes.h:1009
#define ZB_ZCL_CLUSTER_ID_WINDOW_COVERING
Definition: zb_zcl_common.h:239
#define ZB_ZCL_WINDOW_COVERING_CONFIG_STATUS_DEFAULT_VALUE
Config/status attribute default value.
Definition: zb_zcl_window_covering.h:197
#define ZB_HA_DECLARE_WINDOW_COVERING_EP(ep_name, ep_id, cluster_list)
Declare endpoint for window covering device.
Definition: zb_ha_window_covering.h:170
#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:110
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:361
zb_uint8_t percentage_lift_value
Definition: zb_zcl_window_covering.h:512
#define ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE
Default value for Current scene attribute.
Definition: zb_zcl_scenes.h:113
#define ZB_ZCL_BASIC_PHYSICAL_ENVIRONMENT_DEFAULT_VALUE
Default value for Physical environment attribute.
Definition: zb_zcl_basic.h:209
#define ZB_ZCL_STATUS_INSUFF_SPACE
Definition: zb_zcl_common.h:360
zb_zcl_device_callback_id_t device_cb_id
Definition: zboss_api_zcl.h:1807
#define ZB_ZCL_DEVICE_CMD_PARAM_IN_GET(_param, _ptype)
Definition: zboss_api_zcl.h:1905
@ ZB_ZCL_WINDOW_COVERING_STOP_CB_ID
Definition: zboss_api_zcl.h:1420
#define ZB_ZCL_BASIC_LOCATION_DESCRIPTION_DEFAULT_VALUE
Default value for location description attribute.
Definition: zb_zcl_basic.h:206
#define ZB_ZCL_DECLARE_WINDOW_COVERING_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num)
Declare simple descriptor for window covering device.
Definition: zb_ha_window_covering.h:144
#define ZB_ZCL_STATUS_INVALID_FIELD
Definition: zb_zcl_common.h:356