Developing with ZBOSS

Macros

#define ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST( cluster_list_name, on_off_switch_config_attr_list, basic_attr_list, identify_attr_list)
 Declare cluster list for On/Off switch device. More...
 
#define ZB_HA_DECLARE_ON_OFF_SWITCH_EP(ep_name, ep_id, cluster_list)
 Declare endpoint for On/off Switch device. More...
 
#define ZB_HA_DECLARE_ON_OFF_SWITCH_CTX(device_ctx, ep_name)   ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx, ep_name)
 Declare On/Off Switch device context. More...
 

Detailed Description

On/Off Switch device has 6 clusters (see spec 7.4.1):

On/Off Switch device sample

Example

Macro Definition Documentation

◆ ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST

#define ZB_HA_DECLARE_ON_OFF_SWITCH_CLUSTER_LIST (   cluster_list_name,
  on_off_switch_config_attr_list,
  basic_attr_list,
  identify_attr_list 
)

Declare cluster list for On/Off switch device.

Parameters
cluster_list_name- cluster list variable name
on_off_switch_config_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

◆ ZB_HA_DECLARE_ON_OFF_SWITCH_CTX

#define ZB_HA_DECLARE_ON_OFF_SWITCH_CTX (   device_ctx,
  ep_name 
)    ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx, ep_name)

Declare On/Off Switch device context.

Parameters
device_ctx- device context variable name.
ep_name- endpoint variable name.

◆ ZB_HA_DECLARE_ON_OFF_SWITCH_EP

#define ZB_HA_DECLARE_ON_OFF_SWITCH_EP (   ep_name,
  ep_id,
  cluster_list 
)
Value:
ZB_ZCL_DECLARE_ON_OFF_SWITCH_SIMPLE_DESC( \
ep_name, \
ep_id, \
ZB_HA_ON_OFF_SWITCH_IN_CLUSTER_NUM, \
ZB_HA_ON_OFF_SWITCH_OUT_CLUSTER_NUM); \
ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, \
ep_id, \
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, \
0, NULL, /* No reporting ctx */ \
0, NULL) /* No CVC ctx */
ZCL cluster description.
Definition: zb_zcl_common.h:146
Definition: zboss_api_af.h:314

Declare endpoint for On/off Switch device.

Parameters
ep_name- endpoint variable name
ep_id- endpoint ID
cluster_list- endpoint cluster list