Developing with ZBOSS for Zigbee

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 */

Declare endpoint for On/off Switch device.

Parameters
ep_name- endpoint variable name
ep_id- endpoint ID
cluster_list- endpoint cluster list
ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT
#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:386
ZB_ZCL_BASIC_HW_VERSION_DEFAULT_VALUE
#define ZB_ZCL_BASIC_HW_VERSION_DEFAULT_VALUE
Default value for Hardware version attribute.
Definition: zb_zcl_basic.h:170
ZB_AF_HA_PROFILE_ID
#define ZB_AF_HA_PROFILE_ID
Definition: zboss_api_af.h:287
ZB_HA_DECLARE_ON_OFF_SWITCH_EP
#define ZB_HA_DECLARE_ON_OFF_SWITCH_EP(ep_name, ep_id, cluster_list)
Declare endpoint for On/off Switch device.
Definition: zb_ha_on_off_switch.h:183
ZB_ZCL_ON_OFF_SWITCH_CONFIGURATION_SWITCH_ACTIONS_DEFAULT_VALUE
#define ZB_ZCL_ON_OFF_SWITCH_CONFIGURATION_SWITCH_ACTIONS_DEFAULT_VALUE
Default value for Switch actions attribute.
Definition: zb_zcl_on_off_switch_conf.h:116
ZB_ZCL_REGISTER_DEVICE_CB
#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_osif_led_on
void zb_osif_led_on(zb_uint8_t led_no)
Set state of given LED to "On".
zb_uint8_t
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:153
zb_zcl_device_callback_param_s::status
zb_ret_t status
Definition: zboss_api_zcl.h:1823
TRACE_MSG
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:359
ZB_ZCL_CLUSTER_ID_ON_OFF
#define ZB_ZCL_CLUSTER_ID_ON_OFF
Definition: zb_zcl_common.h:212
ZB_ZCL_DECLARE_ON_OFF_SWITCH_CONFIGURATION_ATTRIB_LIST
#define ZB_ZCL_DECLARE_ON_OFF_SWITCH_CONFIGURATION_ATTRIB_LIST(attr_list, switch_type, switch_actions)
Declare attribute list for ON/OFF Switch configuration cluster.
Definition: zb_zcl_on_off_switch_conf.h:156
ZB_AF_SET_ENDPOINT_HANDLER
#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_BASIC_ZCL_VERSION_DEFAULT_VALUE
#define ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE
Default value for ZCL version attribute.
Definition: zb_zcl_basic.h:161
zb_zcl_parsed_hdr_s
Definition: zb_zcl_common.h:1141
zb_zcl_cluster_desc_s
ZCL cluster description.
Definition: zb_zcl_common.h:128
ZB_ZCL_FRAME_DIRECTION_TO_CLI
#define ZB_ZCL_FRAME_DIRECTION_TO_CLI
Definition: zb_zcl_common.h:1049
ZB_ZCL_BASIC_SW_BUILD_ID_DEFAULT_VALUE
#define ZB_ZCL_BASIC_SW_BUILD_ID_DEFAULT_VALUE
Default value for SWBuildId attribute.
Definition: zb_zcl_basic.h:225
ZB_MAC_LQI_UNDEFINED
#define ZB_MAC_LQI_UNDEFINED
Definition: zboss_api_nwk.h:160
ZB_BUF_GET_PARAM
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:447
zb_int8_t
signed char zb_int8_t
Project-local 1-byte signed int type.
Definition: zb_types.h:155
ZB_ZCL_BASIC_APPLICATION_VERSION_DEFAULT_VALUE
#define ZB_ZCL_BASIC_APPLICATION_VERSION_DEFAULT_VALUE
Default value for Application version attribute.
Definition: zb_zcl_basic.h:164
ZB_ZCL_PARSED_HDR_SHORT_DATA
#define ZB_ZCL_PARSED_HDR_SHORT_DATA(header)
Extract common addressing data from parsed ZCL structure.
Definition: zb_zcl_common.h:1206
zb_char_t
char zb_char_t
Project-local char type.
Definition: zb_types.h:149
ZB_MAC_RSSI_UNDEFINED
#define ZB_MAC_RSSI_UNDEFINED
Definition: zboss_api_nwk.h:164
ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE
#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
@ ZB_ZCL_SET_ATTR_VALUE_CB_ID
Definition: zboss_api_zcl.h:394
ZB_ZCL_BASIC_MANUFACTURER_NAME_DEFAULT_VALUE
#define ZB_ZCL_BASIC_MANUFACTURER_NAME_DEFAULT_VALUE
Default value for Manufacturer name attribute.
Definition: zb_zcl_basic.h:173
ZB_AF_REGISTER_DEVICE_CTX
#define ZB_AF_REGISTER_DEVICE_CTX(_device_ctx)
Definition: zboss_api_af.h:734
zb_zdo_get_diag_data
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.
ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE
#define ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE
Default value for Power source attribute.
Definition: zb_zcl_basic.h:182
zb_zcl_parsed_hdr_s::cmd_direction
zb_uint8_t cmd_direction
Definition: zb_zcl_common.h:1177
ZB_ZCL_COPY_PARSED_HEADER
#define ZB_ZCL_COPY_PARSED_HEADER(buf, dst)
Copy parsed ZCL header from buffer.
Definition: zb_zcl_common.h:1456
ZB_ZCL_BASIC_MODEL_IDENTIFIER_DEFAULT_VALUE
#define ZB_ZCL_BASIC_MODEL_IDENTIFIER_DEFAULT_VALUE
Default value for Model identifier attribute.
Definition: zb_zcl_basic.h:176
zb_zcl_device_callback_param_s
Data for Device user application callback. This structure has receive to User application callback (s...
Definition: zboss_api_zcl.h:1816
RET_OK
#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_osif_led_off
void zb_osif_led_off(zb_uint8_t led_no)
Set state of given LED to "Off".
ZB_ZCL_BASIC_DATE_CODE_DEFAULT_VALUE
#define ZB_ZCL_BASIC_DATE_CODE_DEFAULT_VALUE
Default value for Date code attribute.
Definition: zb_zcl_basic.h:179
zb_uint16_t
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:157
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.
Definition: zb_ha_on_off_switch.h:86
ZB_HA_DECLARE_ON_OFF_SWITCH_CTX
#define ZB_HA_DECLARE_ON_OFF_SWITCH_CTX(device_ctx, ep_name)
Declare On/Off Switch device context.
Definition: zb_ha_on_off_switch.h:204
ZB_ZCL_BASIC_STACK_VERSION_DEFAULT_VALUE
#define ZB_ZCL_BASIC_STACK_VERSION_DEFAULT_VALUE
Default value for Stack version attribute.
Definition: zb_zcl_basic.h:167
ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID
@ ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID
OnOff attribute.
Definition: zb_zcl_on_off.h:60
zb_zcl_device_callback_param_s::cb_param
union zb_zcl_device_callback_param_s::@1 cb_param
ZB_FALSE
#define ZB_FALSE
Definition: zb_types.h:374
zb_buf_len
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:361
ZB_ZCL_BASIC_PHYSICAL_ENVIRONMENT_DEFAULT_VALUE
#define ZB_ZCL_BASIC_PHYSICAL_ENVIRONMENT_DEFAULT_VALUE
Default value for Physical environment attribute.
Definition: zb_zcl_basic.h:209
zb_zcl_device_callback_param_s::device_cb_id
zb_zcl_device_callback_id_t device_cb_id
Definition: zboss_api_zcl.h:1819
ZB_ZCL_BASIC_LOCATION_DESCRIPTION_DEFAULT_VALUE
#define ZB_ZCL_BASIC_LOCATION_DESCRIPTION_DEFAULT_VALUE
Default value for location description attribute.
Definition: zb_zcl_basic.h:206