Logo
Developing with ZBOSS for Zigbee
zboss_api_af.h File Reference

Data Structures

struct  zb_af_node_desc_s
 
struct  zb_af_node_power_desc_s
 
struct  zb_af_simple_desc_1_1_s
 
struct  zb_af_simple_desc_8_9_s
 
struct  zb_af_endpoint_desc_s
 Endpoint descriptor. More...
 

Macros

#define ZB_COORDINATOR   ZB_NWK_DEVICE_TYPE_COORDINATOR
 
#define ZB_ROUTER   ZB_NWK_DEVICE_TYPE_ROUTER
 
#define ZB_END_DEVICE   ZB_NWK_DEVICE_TYPE_ED
 
#define ZB_AF_SIMPLE_DESC_TYPE(in_num, out_num)   CAT5(zb_af_simple_desc_,in_num,_,out_num,_t)
 
#define ZB_DECLARE_SIMPLE_DESC(in_clusters_count, out_clusters_count)
 
#define ZB_AF_IS_EP_REGISTERED(_ep)   ((zb_af_get_endpoint_desc( _ep ) != NULL)?(ZB_TRUE):(ZB_FALSE))
 Check endpoint registration in ZCL. More...
 
#define ZB_AF_START_DECLARE_ENDPOINT_LIST(ep_list_name)   zb_af_endpoint_desc_t *ep_list_name[] = {
 
#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. More...
 
#define ZB_AF_FINISH_DECLARE_ENDPOINT_LIST   }
 
#define ZB_AF_SET_ENDPOINT_HANDLER(endpoint, handler)   (zb_af_get_endpoint_desc((endpoint))->device_handler = (handler))
 Allows application to register cluster commands handler for a specific endpoint. More...
 
#define ZB_AF_SET_IDENTIFY_NOTIFICATION_HANDLER(endpoint, handler)   (zb_af_get_endpoint_desc((endpoint))->identify_handler = (handler))
 Sets identify notification handler for endpoint. More...
 
#define ZB_ZCL_CLUSTER_DESC(cluster_id, attr_count, attr_desc_list, cluster_role_mask, manuf_code)
 
#define ZB_AF_DECLARE_DEVICE_CTX(device_ctx_name, ep_list_name, ep_count, reporting_attr_count)
 
#define ZB_AF_DECLARE_DEVICE_CTX_NO_REP(device_ctx_name, ep_list_name, ep_count)
 
#define ZBOSS_DEVICE_DECLARE_REPORTING_CTX(rep_ctx, rep_count)   zb_zcl_reporting_info_t rep_ctx[rep_count]
 
#define ZBOSS_DEVICE_DECLARE_LEVEL_CONTROL_CTX(lev_ctrl_ctx, lev_ctrl_count)   zb_zcl_cvc_alarm_variables_t lev_ctrl_ctx[lev_ctrl_count]
 
#define ZBOSS_DECLARE_DEVICE_CTX(device_ctx_name, ep_list_name, ep_count)
 
#define ZBOSS_DECLARE_DEVICE_CTX_1_EP(device_ctx_name, ep_name)
 
#define ZBOSS_DECLARE_DEVICE_CTX_2_EP(device_ctx_name, ep1_name, ep2_name)
 
#define ZBOSS_DECLARE_DEVICE_CTX_3_EP(device_ctx_name, ep1_name, ep2_name, ep3_name)
 
#define ZBOSS_DECLARE_DEVICE_CTX_4_EP(device_ctx_name, ep1_name, ep2_name, ep3_name, ep4_name)
 
#define ZB_AF_REGISTER_DEVICE_CTX(_device_ctx)   zb_af_register_device_ctx(_device_ctx)
 
#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 App about change device attribute or need to execute H/W command. More...
 
Node descriptor - frequency value

Note: These values were members of enum zb_freq_band_e type but were converted to a set of macros due to MISRA violations.

#define ZB_FREQ_BAND_868   1U
 
#define ZB_FREQ_BAND_SUB_GHZ_NA_FSK   (1U << 2)
 
#define ZB_FREQ_BAND_2400   (1U << 3)
 
#define ZB_FREQ_BAND_SUB_GHZ_EU_FSK   (1U << 4)
 
Node descriptor - server mask

Note: These values were members of enum zb_server_mask_bit_e type but were converted to a set of macros due to MISRA violations.

#define ZB_PRIMARY_TRUST_CENTER   1U
 
#define ZB_BACKUP_TRUST_CENTER   (1U << 1)
 
#define ZB_PRIMARY_BINDING_TABLE_CENTER   (1U << 2)
 
#define ZB_BACKUP_BINDING_TABLE_CENTER   (1U << 3)
 
#define ZB_PRIMARY_DISCOVERY_CACHE   (1U << 4)
 
#define ZB_BACKUP_DISCOVERY_CACHE   (1U << 5)
 
#define ZB_NETWORK_MANAGER   (1U << 6)
 
Node descriptor - capability mask

Note: These values were members of enum zb_desc_capability_e type but were converted to a set of macros due to MISRA violations.

#define ZB_EXT_ACTIVE_EP_LIST   1U
 
#define ZB_EXT_SIMPLE_DESC_LIST   (1U << 1)
 
Power descriptor types

#define ZB_POWER_MODE_SYNC_ON_WHEN_IDLE   0U
 
#define ZB_POWER_MODE_COME_ON_PERIODICALLY   1U
 
#define ZB_POWER_MODE_COME_ON_WHEN_STIMULATED   2U
 
Power source types

#define ZB_POWER_SRC_CONSTANT   1U
 
#define ZB_POWER_SRC_RECHARGEABLE_BATTERY   (1U << 1)
 
#define ZB_POWER_SRC_DISPOSABLE_BATTERY   (1U << 2)
 
Power source level values

#define ZB_POWER_LEVEL_CRITICAL   0U
 
#define ZB_POWER_LEVEL_33   4U
 
#define ZB_POWER_LEVEL_66   8U
 
#define ZB_POWER_LEVEL_100   12U
 
Profile identifiers

Note: These values were members of enum zb_af_profile_id_e type but were converted to a set of macros due to MISRA violations.

#define ZB_AF_ZDO_PROFILE_ID   0x0000U
 
#define ZB_AF_LEGACY_PROFILE1_ID   0x0101U
 
#define ZB_AF_LEGACY_PROFILE2_ID   0x0102U
 
#define ZB_AF_LEGACY_PROFILE3_ID   0x0103U
 
#define ZB_AF_HA_PROFILE_ID   0x0104U
 
#define ZB_AF_LEGACY_PROFILE4_ID   0x0105U
 
#define ZB_AF_LEGACY_PROFILE5_ID   0x0106U
 
#define ZB_AF_LEGACY_PROFILE6_ID   0x0107U
 
#define ZB_AF_LEGACY_PROFILE7_ID   0x0108U
 
#define ZB_AF_SE_PROFILE_ID   0x0109U
 
#define ZB_AF_ZLL_PROFILE_ID   0xC05EU
 
#define ZB_AF_TEST_PROFILE_ID   0x7F01U
 
#define ZB_AF_WILDCARD_PROFILE_ID   0xFFFFU
 
#define ZB_AF_GP_PROFILE_ID   0xA1E0U
 
#define ZB_MSP_INITIAL_PROFILE_ID   0xC000U
 

Typedefs

typedef struct zb_af_node_desc_s zb_af_node_desc_t
 
typedef zb_nwk_device_type_t zb_logical_type_t
 
typedef zb_uint8_t zb_current_power_mode_t
 Type for power descriptor types. More...
 
typedef zb_uint8_t zb_power_src_t
 Type for power source types. More...
 
typedef zb_uint8_t zb_power_source_level_t
 Type for power source level values. More...
 
typedef struct zb_af_node_power_desc_s zb_af_node_power_desc_t
 
typedef struct zb_af_simple_desc_1_1_s zb_af_simple_desc_1_1_t
 
typedef struct zb_af_simple_desc_8_9_s zb_af_simple_desc_8_9_t
 
typedef zb_uint8_t(* zb_device_handler_t) (zb_uint8_t param)
 
typedef struct zb_af_endpoint_desc_s zb_af_endpoint_desc_t
 Endpoint descriptor. More...
 
typedef void(* zb_af_transmission_res_cb_t) (zb_uint8_t status)
 

Functions

zb_af_endpoint_desc_tzb_af_get_endpoint_desc (zb_uint8_t ep_id)
 Search for endpoint (device) descriptor by endpoint ID. More...
 
void zb_apsde_data_indication_cont (zb_uint8_t param)