Developing with ZBOSS for Zigbee
AF API add-ons

Macros

#define __CAT_VA__(a, b, ...)   a## __VA_ARGS__## b
 Redefinition of CAT as variadic macro. More...
 
#define ZB_AF_SIMPLE_DESC_TYPE_VA(in_num, out_num, ...)   __CAT_VA__(zb_af_simple_desc_, _t, __VA_ARGS__)
 Redefinition of ZB_AF_SIMPLE_DESC_TYPE as variadic macro. More...
 
#define ZB_DECLARE_SIMPLE_DESC_VA(in_clusters_count, out_clusters_count, ...)
 Redefinition of ZB_DECLARE_SIMPLE_DESC as variadic macro. More...
 
#define ZBOSS_DECLARE_DEVICE_CTX_EP_VA(device_ctx_name, ...)
 Redefinition of ZBOSS_DECLARE_DEVICE_CTX_N_EP as variadic macro. More...
 

Detailed Description

Macro Definition Documentation

◆ __CAT_VA__

#define __CAT_VA__ (   a,
  b,
  ... 
)    a## __VA_ARGS__## b

Redefinition of CAT as variadic macro.

Parameters
[in]aMandatory argument to concatenate.
[in]bMandatory argument to concatenate.
[in]...Optional argument to concatenate.

◆ ZB_AF_SIMPLE_DESC_TYPE_VA

#define ZB_AF_SIMPLE_DESC_TYPE_VA (   in_num,
  out_num,
  ... 
)    __CAT_VA__(zb_af_simple_desc_, _t, __VA_ARGS__)

Redefinition of ZB_AF_SIMPLE_DESC_TYPE as variadic macro.

Parameters
[in]in_numNumber of input clusters.
[in]out_numNumber of output clusters.
[in]...Optional argument to concatenate to the type name.

◆ ZB_DECLARE_SIMPLE_DESC_VA

#define ZB_DECLARE_SIMPLE_DESC_VA (   in_clusters_count,
  out_clusters_count,
  ... 
)
Value:
typedef ZB_PACKED_PRE struct zb_af_simple_desc_## __VA_ARGS__## _s \
{ \
zb_uint8_t endpoint; /* Endpoint */ \
zb_uint16_t app_profile_id; /* Application profile identifier */ \
zb_uint16_t app_device_id; /* Application device identifier */ \
zb_bitfield_t app_device_version:4; /* Application device version */ \
zb_bitfield_t reserved:4; /* Reserved */ \
zb_uint8_t app_input_cluster_count; /* Application input cluster count */ \
zb_uint8_t app_output_cluster_count; /* Application output cluster count */ \
/* Application input and output cluster list */ \
zb_uint16_t app_cluster_list[(in_clusters_count) + (out_clusters_count)]; \
zb_uint8_t cluster_encryption[((in_clusters_count) + (out_clusters_count) + 7)/8]; \
} ZB_PACKED_STRUCT zb_af_simple_desc_## __VA_ARGS__## _t

Redefinition of ZB_DECLARE_SIMPLE_DESC as variadic macro.

Parameters
[in]in_clusters_countNumber of input clusters.
[in]out_clusters_countNumber of output clusters.
[in]...Optional argument to concatenate to the type name.

◆ ZBOSS_DECLARE_DEVICE_CTX_EP_VA

#define ZBOSS_DECLARE_DEVICE_CTX_EP_VA (   device_ctx_name,
  ... 
)
Value:
zb_af_endpoint_desc_t *ep_list_##device_ctx_name[] = { \
__VA_ARGS__ \
}; \
ZBOSS_DECLARE_DEVICE_CTX(device_ctx_name, ep_list_##device_ctx_name, \
(ZB_ZCL_ARRAY_SIZE(ep_list_##device_ctx_name, zb_af_endpoint_desc_t*)))

Redefinition of ZBOSS_DECLARE_DEVICE_CTX_N_EP as variadic macro.

Parameters
[in]device_ctx_nameDevice context variable name.
[in]...Variables holding context for endpoints.
zb_af_endpoint_desc_s
Endpoint descriptor.
Definition: zboss_api_af.h:339