nRF5 SDK for Thread and Zigbee v3.2.0
Macros
ZB_HA_IAS_WARNING_H

Macros

#define ZB_HA_IAS_WARNING_VER   0
 
#define ZB_HA_IAS_WARNING_IN_CLUSTER_NUM   6
 
#define ZB_HA_IAS_WARNING_OUT_CLUSTER_NUM   0
 
#define ZB_HA_IAS_WARNING_REPORT_ATTR_COUNT   (ZB_ZCL_IAS_ZONE_REPORT_ATTR_COUNT + ZB_ZCL_IAS_WD_REPORT_ATTR_COUNT)
 
#define ZB_HA_DECLARE_IAS_WARNING_CLUSTER_LIST(cluster_list_name,basic_attr_list,identify_attr_list,ias_wd_attr_list,ias_zone_attr_list,scenes_attr_list,groups_attr_list)
 Declare cluster list for IAS Warning device. More...
 
#define ZB_HA_DECLARE_IAS_WARNING_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num)
 Declare simple descriptor for IAS Warning device. More...
 
#define ZB_HA_DECLARE_IAS_WARNING_EP(ep_name, ep_id, cluster_list)
 Declare endpoint for IAS Warning device. More...
 
#define ZB_HA_DECLARE_IAS_WARNING_CTX(device_ctx, ep_name)   ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx, ep_name)
 

Detailed Description

IAS Warning Device

IAS Warning Device has 6 clusters (see spec 7.8.4):

Example
Delcaration clusters
/******************* Declare attributes ************************/
//* On/Off cluster attributes data */
/* On/Off cluster attributes additions data */
zb_bool_t g_attr_global_scene_ctrl = ZB_TRUE;
zb_uint16_t g_attr_on_time = 0;
zb_uint16_t g_attr_off_wait_time = 0;
ZB_ZCL_DECLARE_ON_OFF_ATTRIB_LIST_ZLL(on_off_attr_list, &g_attr_on_off,
&g_attr_global_scene_ctrl, &g_attr_on_time, &g_attr_off_wait_time);
/* Basic cluster attributes data */
zb_uint8_t g_attr_app_version = 0;
zb_uint8_t g_attr_stack_version = 0;
zb_uint8_t g_attr_hardware_version = 0;
zb_char_t g_attr_manufacturer_name[] = "\x15" "Test manufacture name";
zb_char_t g_attr_model_id[] = "\x03" "1.0";
zb_char_t g_attr_date_code[] = "\x0a" "20130509GP";
zb_char_t g_attr_sw_build_id[] = "\x0f" "111.111.111.111";
ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_ZLL(basic_attr_list, &g_attr_zcl_version, &g_attr_app_version,
&g_attr_stack_version, &g_attr_hardware_version, &g_attr_manufacturer_name, &g_attr_model_id,
&g_attr_date_code, &g_attr_power_source, &g_attr_sw_build_id);
/* Identify cluster attributes data */
ZB_ZCL_DECLARE_IDENTIFY_ATTRIB_LIST(identify_attr_list, &g_attr_identify_time);
/* Groups cluster attributes data */
zb_uint8_t g_attr_name_support = 0;
ZB_ZCL_DECLARE_GROUPS_ATTRIB_LIST(groups_attr_list, &g_attr_name_support);
/* Scenes cluster attribute data */
ZB_ZCL_DECLARE_SCENES_ATTRIB_LIST(scenes_attr_list, &g_attr_scenes_scene_count,
&g_attr_scenes_current_scene, &g_attr_scenes_current_group,
&g_attr_scenes_scene_valid, &g_attr_scenes_name_support);
/********************* Declare device **************************/
ZB_ZLL_DECLARE_ON_OFF_LIGHT_CLUSTER_LIST(
on_off_light_clusters,
basic_attr_list, identify_attr_list, groups_attr_list,
scenes_attr_list, on_off_attr_list, ZB_FALSE);
ZB_ZLL_DECLARE_ON_OFF_LIGHT_EP(on_off_light_ep, ENDPOINT, on_off_light_clusters);
ZB_ZLL_DECLARE_ON_OFF_LIGHT_CTX(on_off_light_ctx, on_off_light_ep);
Register device list
/* Register device list */
ZB_AF_REGISTER_DEVICE_CTX(&on_off_light_ctx);
ZB_ZCL_REGISTER_DEVICE_CB(test_device_cb);

See ha/ias_devices test

Macro Definition Documentation

#define ZB_HA_DECLARE_IAS_WARNING_CLUSTER_LIST (   cluster_list_name,
  basic_attr_list,
  identify_attr_list,
  ias_wd_attr_list,
  ias_zone_attr_list,
  scenes_attr_list,
  groups_attr_list 
)

Declare cluster list for IAS Warning device.

Parameters
cluster_list_name[IN] - cluster list variable name.
basic_attr_list[IN] - attribute list for Basic cluster.
identify_attr_list[IN] - attribute list for Identify cluster.
ias_wd_attr_list[IN] - attribute list for IAS WD cluster.
ias_zone_attr_list[IN] - attribute list for IAS Zone cluster.
scenes_attr_list[IN] - attribute list for Scenes cluster.
groups_attr_list[IN] - attribute list for Groups cluster.
#define ZB_HA_DECLARE_IAS_WARNING_EP (   ep_name,
  ep_id,
  cluster_list 
)
Value:
ep_name, \
ep_id, \
ZBOSS_DEVICE_DECLARE_REPORTING_CTX(reporting_info## device_ctx_name, \
ZB_HA_IAS_WARNING_REPORT_ATTR_COUNT); \
ep_name, \
ep_id, \
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE( \
cluster_list, \
cluster_list, \
(zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
ZB_HA_IAS_WARNING_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, 0, NULL)
#define ZB_HA_DECLARE_IAS_WARNING_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num)
Declare simple descriptor for IAS Warning device.
Definition: zb_ha_ias_warning_device.h:158
ZCL cluster description.
Definition: zb_zcl_common.h:143
Definition: zboss_api_af.h:287
#define ZBOSS_DEVICE_DECLARE_REPORTING_CTX(rep_ctx, rep_count)
Definition: zboss_api_af.h:579
#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
#define ZB_HA_IAS_WARNING_IN_CLUSTER_NUM
Definition: zb_ha_ias_warning_device.h:78
#define ZB_HA_IAS_WARNING_OUT_CLUSTER_NUM
Definition: zb_ha_ias_warning_device.h:79
Definition: zboss_api_af.h:201

Declare endpoint for IAS Warning device.

Parameters
ep_name[IN] - endpoint variable name.
ep_id[IN] - endpoint ID.
cluster_list[IN] - endpoint cluster list.
#define ZB_HA_DECLARE_IAS_WARNING_SIMPLE_DESC (   ep_name,
  ep_id,
  in_clust_num,
  out_clust_num 
)
Value:
ZB_DECLARE_SIMPLE_DESC(in_clust_num, out_clust_num); \
ZB_AF_SIMPLE_DESC_TYPE(in_clust_num, out_clust_num) \
simple_desc_##ep_name = \
{ \
ep_id, \
0, \
in_clust_num, \
out_clust_num, \
{ \
} \
}
Definition: zb_zcl_common.h:205
Definition: zboss_api_af.h:287
Definition: zb_zcl_common.h:204
Definition: zb_zcl_common.h:264
#define ZB_DECLARE_SIMPLE_DESC(in_clusters_count, out_clusters_count)
Definition: zboss_api_af.h:185
Definition: zb_ha_device_config.h:126
Definition: zb_zcl_common.h:200
Definition: zb_zcl_common.h:206
Definition: zb_zcl_common.h:266
#define ZB_HA_IAS_WARNING_VER
Definition: zb_ha_ias_warning_device.h:76
#define ZB_AF_SIMPLE_DESC_TYPE(in_num, out_num)
Definition: zboss_api_af.h:172

Declare simple descriptor for IAS Warning device.

Parameters
ep_name- endpoint variable name.
ep_id[IN] - endpoint ID.
in_clust_num[IN] - number of supported input clusters.
out_clust_num[IN] - number of supported output clusters.
Note
in_clust_num, out_clust_num should be defined by numeric constants, not variables or any definitions, because these values are used to form simple descriptor type name.
#define ZB_HA_IAS_WARNING_IN_CLUSTER_NUM   6

Input clusters number.

#define ZB_HA_IAS_WARNING_OUT_CLUSTER_NUM   0

Output clusters number.

#define ZB_HA_IAS_WARNING_VER   0

Device version


Documentation feedback | Developer Zone | Subscribe | Updated