nRF5 SDK for Thread and Zigbee v4.2.0
Macros
Dimmable Light

Macros

#define ZB_HA_DEVICE_VER_LIGHT   1
 
#define ZB_HA_LIGHT_IN_CLUSTER_NUM   6
 
#define ZB_HA_LIGHT_OUT_CLUSTER_NUM   0
 
#define ZB_HA_LIGHT_CLUSTER_NUM
 
#define ZB_HA_LIGHT_REPORT_ATTR_COUNT   (ZB_ZCL_ON_OFF_REPORT_ATTR_COUNT + ZB_ZCL_LEVEL_CONTROL_REPORT_ATTR_COUNT)
 
#define ZB_HA_LIGHT_CVC_ATTR_COUNT   1
 
#define ZB_HA_DECLARE_LIGHT_CLUSTER_LIST(cluster_list_name,basic_attr_list,identify_attr_list,groups_attr_list,scenes_attr_list,on_off_attr_list,level_control_attr_list)
 Declare cluster list for Dimmable Light device. More...
 
#define ZB_ZCL_DECLARE_HA_LIGHT_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num)
 Declare simple descriptor for Dimmable Light device. More...
 
#define ZB_HA_DECLARE_LIGHT_EP(ep_name, ep_id, cluster_list)
 Declare endpoint for Dimmable Light device. More...
 
#define ZB_HA_DECLARE_LIGHT_CTX(device_ctx, ep_name)   ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx, ep_name)
 
#define ZB_HA_DEVICE_VER_DIMMABLE_LIGHT   1
 
#define ZB_HA_DECLARE_DIMMABLE_LIGHT_CLUSTER_LIST(cluster_list_name,basic_attr_list,identify_attr_list,groups_attr_list,on_off_attr_list,level_control_attr_list)
 Declare cluster list for Dimmable Light device. More...
 
#define ZB_HA_DECLARE_DIMMABLE_LIGHT_EP(ep_name, ep_id, cluster_list)
 Declare endpoint for Dimmable Light device. More...
 
#define ZB_HA_DECLARE_DIMMABLE_LIGHT_CTX(device_ctx, ep_name)   ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx, ep_name)
 Declare application's device context for Dimmable Light device. More...
 

Detailed Description

Macro Definition Documentation

#define ZB_HA_DECLARE_DIMMABLE_LIGHT_CLUSTER_LIST (   cluster_list_name,
  basic_attr_list,
  identify_attr_list,
  groups_attr_list,
  on_off_attr_list,
  level_control_attr_list 
)

Declare cluster list for Dimmable Light 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
on_off_attr_list- attribute list for On/Off cluster
level_control_attr_list- attribute list for Level Control cluster
#define ZB_HA_DECLARE_DIMMABLE_LIGHT_CTX (   device_ctx,
  ep_name 
)    ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx, ep_name)

Declare application's device context for Dimmable Light device.

Parameters
device_ctx- device context variable
ep_name- endpoint variable name
#define ZB_HA_DECLARE_DIMMABLE_LIGHT_EP (   ep_name,
  ep_id,
  cluster_list 
)
Value:
ZB_ZCL_DECLARE_HA_DIMMABLE_LIGHT_SIMPLE_DESC(ep_name, ep_id, \
ZB_HA_DIMMABLE_LIGHT_IN_CLUSTER_NUM, ZB_HA_DIMMABLE_LIGHT_OUT_CLUSTER_NUM); \
ZBOSS_DEVICE_DECLARE_REPORTING_CTX(reporting_info## device_ctx_name, \
ZB_HA_DIMMABLE_LIGHT_REPORT_ATTR_COUNT); \
ZBOSS_DEVICE_DECLARE_LEVEL_CONTROL_CTX(cvc_alarm_info## device_ctx_name, \
ZB_HA_DIMMABLE_LIGHT_CVC_ATTR_COUNT); \
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
(zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
ZB_HA_DIMMABLE_LIGHT_REPORT_ATTR_COUNT, \
reporting_info## device_ctx_name, \
ZB_HA_DIMMABLE_LIGHT_CVC_ATTR_COUNT, \
cvc_alarm_info## device_ctx_name)
#define ZB_AF_HA_PROFILE_ID
Definition: zboss_api_af.h:286
ZCL cluster description.
Definition: zb_zcl_common.h:146
#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:431
#define ZBOSS_DEVICE_DECLARE_LEVEL_CONTROL_CTX(lev_ctrl_ctx, lev_ctrl_count)
Definition: zboss_api_af.h:541
#define ZBOSS_DEVICE_DECLARE_REPORTING_CTX(rep_ctx, rep_count)
Definition: zboss_api_af.h:533
Definition: zboss_api_af.h:259

Declare endpoint for Dimmable Light device.

Parameters
ep_name- endpoint variable name
ep_id- endpoint ID
cluster_list- endpoint cluster list
#define ZB_HA_DECLARE_LIGHT_CLUSTER_LIST (   cluster_list_name,
  basic_attr_list,
  identify_attr_list,
  groups_attr_list,
  scenes_attr_list,
  on_off_attr_list,
  level_control_attr_list 
)

Declare cluster list for Dimmable Light 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
on_off_attr_list- attribute list for On/Off cluster
level_control_attr_list- attribute list for Level Control cluster
#define ZB_HA_DECLARE_LIGHT_EP (   ep_name,
  ep_id,
  cluster_list 
)
Value:
ZB_HA_LIGHT_IN_CLUSTER_NUM, ZB_HA_LIGHT_OUT_CLUSTER_NUM); \
ZBOSS_DEVICE_DECLARE_REPORTING_CTX(reporting_info## device_ctx_name, \
ZBOSS_DEVICE_DECLARE_LEVEL_CONTROL_CTX(cvc_alarm_info## device_ctx_name, \
ZB_HA_LIGHT_CVC_ATTR_COUNT); \
0, \
NULL, \
ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), \
cluster_list, \
(zb_af_simple_desc_1_1_t*)&simple_desc_##ep_name, \
ZB_HA_LIGHT_REPORT_ATTR_COUNT, reporting_info## device_ctx_name, \
ZB_HA_LIGHT_CVC_ATTR_COUNT, cvc_alarm_info## device_ctx_name)
#define ZB_AF_HA_PROFILE_ID
Definition: zboss_api_af.h:286
ZCL cluster description.
Definition: zb_zcl_common.h:146
#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:431
#define ZBOSS_DEVICE_DECLARE_LEVEL_CONTROL_CTX(lev_ctrl_ctx, lev_ctrl_count)
Definition: zboss_api_af.h:541
#define ZB_ZCL_DECLARE_HA_LIGHT_SIMPLE_DESC(ep_name, ep_id, in_clust_num, out_clust_num)
Declare simple descriptor for Dimmable Light device.
Definition: zb_ha_bulb.h:132
#define ZB_HA_LIGHT_REPORT_ATTR_COUNT
Definition: zb_ha_bulb.h:54
#define ZBOSS_DEVICE_DECLARE_REPORTING_CTX(rep_ctx, rep_count)
Definition: zboss_api_af.h:533
Definition: zboss_api_af.h:259

Declare endpoint for Dimmable Light device.

Parameters
ep_name- endpoint variable name
ep_id- endpoint ID
cluster_list- endpoint cluster list
#define ZB_HA_DEVICE_VER_DIMMABLE_LIGHT   1

Dimmable light device version

#define ZB_HA_LIGHT_CLUSTER_NUM
Value:
(ZB_HA_LIGHT_IN_CLUSTER_NUM + \
ZB_HA_LIGHT_OUT_CLUSTER_NUM)
#define ZB_HA_LIGHT_REPORT_ATTR_COUNT   (ZB_ZCL_ON_OFF_REPORT_ATTR_COUNT + ZB_ZCL_LEVEL_CONTROL_REPORT_ATTR_COUNT)

Number of attribute for reporting on Dimmable Light device

#define ZB_ZCL_DECLARE_HA_LIGHT_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, \
ZB_AF_HA_PROFILE_ID, \
ZB_HA_DIMMABLE_LIGHT_DEVICE_ID, \
ZB_HA_DEVICE_VER_LIGHT, \
0, \
in_clust_num, \
out_clust_num, \
{ \
ZB_ZCL_CLUSTER_ID_BASIC, \
ZB_ZCL_CLUSTER_ID_IDENTIFY, \
ZB_ZCL_CLUSTER_ID_SCENES, \
ZB_ZCL_CLUSTER_ID_GROUPS, \
ZB_ZCL_CLUSTER_ID_ON_OFF, \
ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL \
} \
}
#define ZB_AF_SIMPLE_DESC_TYPE(in_num, out_num)
Definition: zboss_api_af.h:223
#define ZB_DECLARE_SIMPLE_DESC(in_clusters_count, out_clusters_count)
Definition: zboss_api_af.h:237

Declare simple descriptor for Dimmable Light 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

Documentation feedback | Developer Zone | Subscribe | Updated