Logo
Developing with ZBOSS for Zigbee
zboss_api_aps.h File Reference
#include "zb_config.h"
#include "zb_address.h"
#include "zboss_api_aps_interpan.h"

Data Structures

struct  zb_aps_hdr_s
 Parsed APS header. More...
 
struct  zb_apsme_binding_req_s
 APSME binding structure. More...
 
struct  zb_aps_check_binding_req_s
 
struct  zb_aps_check_binding_resp_s
 
struct  zb_apsme_add_group_req_s
 APSME-ADD-GROUP.request primitive parameters, should be passed to zb_zdo_add_group_req() More...
 
struct  zb_apsme_add_group_conf_s
 APSME-ADD-GROUP.confirm primitive parameters. More...
 
struct  zb_apsme_remove_all_groups_req_s
 APSME-REMOVE-ALL-GROUPS.request primitive parameters, should be passed to zb_zdo_remove_all_groups_req(). More...
 
struct  zb_apsme_remove_all_groups_conf_s
 APSME-REMOVE-ALL-GROUPS.confirm primitive parameters. More...
 

Macros

#define ZB_MIN_ENDPOINT_NUMBER   1U
 Minimum valid endpoint number. More...
 
#define ZB_MAX_ENDPOINT_NUMBER   240U
 Maximum valid endpoint number. More...
 
#define ZB_APS_BROADCAST_ENDPOINT_NUMBER   255U
 Broadcast endpoint number. More...
 
#define ZB_APS_FC_GET_DELIVERY_MODE(fc)   (((fc)>>2U) & 3U)
 
#define FIRST_INTERNAL_APSIND_FIELD   extended_fc
 
APS status constants

#define ZB_APS_STATUS_SUCCESS   0x00U
 
#define ZB_APS_ASDU_TOO_LONG   0xa0U
 
#define ZB_APS_DEFRAG_DEFERRED   0xa1U
 
#define ZB_APS_DEFRAG_UNSUPPORTED   0xa2U
 
#define ZB_APS_STATUS_ILLEGAL_REQUEST   0xa3U
 
#define ZB_APS_STATUS_INVALID_BINDING   0xa4U
 
#define ZB_APS_STATUS_INVALID_GROUP   0xa5U
 
#define ZB_APS_STATUS_INVALID_PARAMETER   0xa6U
 
#define ZB_APS_STATUS_NO_ACK   0xa7U
 
#define ZB_APS_STATUS_NO_BOUND_DEVICE   0xa8U
 
#define ZB_APS_STATUS_NO_SHORT_ADDRESS   0xa9U
 
#define ZB_APS_STATUS_NOT_SUPPORTED   0xaaU
 
#define ZB_APS_STATUS_SECURED_LINK_KEY   0xabU
 
#define ZB_APS_STATUS_SECURED_NWK_KEY   0xacU
 
#define ZB_APS_STATUS_SECURITY_FAIL   0xadU
 
#define ZB_APS_STATUS_TABLE_FULL   0xaeU
 
#define ZB_APS_STATUS_UNSECURED   0xafU
 
#define ZB_APS_STATUS_UNSUPPORTED_ATTRIBUTE   0xb0U
 
APS addressing mode constants

#define ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT   0x00U
 
#define ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT   0x01U
 
#define ZB_APS_ADDR_MODE_16_ENDP_PRESENT   0x02U
 
#define ZB_APS_ADDR_MODE_64_ENDP_PRESENT   0x03U
 
#define ZB_APS_ADDR_MODE_BIND_TBL_ID   0x04U
 
APS frame delivery mode values

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

#define ZB_APS_DELIVERY_UNICAST   0U
 
#define ZB_APS_DELIVERY_RESERVED   1U
 
#define ZB_APS_DELIVERY_BROADCAST   2U
 
#define ZB_APS_DELIVERY_GROUP   3U
 

Typedefs

typedef zb_uint8_t zb_aps_status_t
 Type for APS status constants. More...
 
typedef zb_uint8_t zb_aps_addr_mode_t
 Type for APS addressing mode constants. More...
 
typedef struct zb_aps_hdr_s zb_aps_hdr_t
 Parsed APS header. More...
 
typedef zb_aps_hdr_t zb_apsde_data_indication_t
 
typedef struct zb_apsme_binding_req_s zb_apsme_binding_req_t
 APSME binding structure. More...
 
typedef struct zb_aps_check_binding_req_s zb_aps_check_binding_req_t
 
typedef struct zb_aps_check_binding_resp_s zb_aps_check_binding_resp_t
 
typedef struct zb_apsme_add_group_req_s zb_apsme_add_group_req_t
 APSME-ADD-GROUP.request primitive parameters, should be passed to zb_zdo_add_group_req() More...
 
typedef struct zb_apsme_add_group_conf_s zb_apsme_add_group_conf_t
 APSME-ADD-GROUP.confirm primitive parameters. More...
 
typedef struct zb_apsme_add_group_req_s zb_apsme_remove_group_req_t
 APSME-REMOVE-GROUP.request primitive parameters, should be passed to zb_zdo_add_group_req() More...
 
typedef struct zb_apsme_add_group_conf_s zb_apsme_remove_group_conf_t
 APSME-REMOVE-GROUP.confirm primitive parameters. More...
 
typedef struct zb_apsme_remove_all_groups_req_s zb_apsme_remove_all_groups_req_t
 APSME-REMOVE-ALL-GROUPS.request primitive parameters, should be passed to zb_zdo_remove_all_groups_req(). More...
 
typedef struct zb_apsme_remove_all_groups_conf_s zb_apsme_remove_all_groups_conf_t
 APSME-REMOVE-ALL-GROUPS.confirm primitive parameters. More...
 
typedef void(* zb_aps_user_payload_callback_t) (zb_uint8_t param)
 Callback to notify an application of sending an APS user payload status. More...
 
typedef enum zb_aps_user_payload_cb_status_e zb_aps_user_payload_cb_status_t
 APS user payload transmission status. More...
 

Enumerations

enum  zb_aps_user_payload_cb_status_e { ZB_APS_USER_PAYLOAD_CB_STATUS_SUCCESS = (zb_uint8_t)0x00, ZB_APS_USER_PAYLOAD_CB_STATUS_NO_APS_ACK = (zb_uint8_t)0xbe }
 APS user payload transmission status. More...
 

Functions

 ZB_ASSERT_IF_NOT_ALIGNED_TO_4 (zb_aps_hdr_t)
 
zb_bool_t zb_aps_is_endpoint_in_group (zb_uint16_t group_id, zb_uint8_t endpoint)
 
void zb_apsme_bind_request (zb_uint8_t param)
 APSME-BIND.request primitive. More...
 
void zb_apsme_unbind_request (zb_uint8_t param)
 APSME-UNBIND.request primitive. More...
 
void zb_apsme_unbind_all (zb_uint8_t param)
 Perform unbind all entries. This custom function and it is not described in Zigbee specification. More...
 
void zb_aps_check_binding_request (zb_bufid_t param)
 Checks if the binding with specified parameters exists. More...
 
void zb_apsme_add_group_request (zb_uint8_t param)
 APSME-ADD-GROUP.request primitive. More...
 
void zb_apsme_remove_group_request (zb_uint8_t param)
 APSME-REMOVE-GROUP.request primitive. More...
 
void zb_apsme_remove_all_groups_request (zb_uint8_t param)
 APSME-REMOVE-ALL-GROUPS.request primitive. More...
 
void zb_aps_add_max_trans_size (zb_uint16_t short_addr, zb_uint16_t max_trans_size, zb_uint8_t max_buffer_size)
 
zb_uint16_t zb_aps_get_max_trans_size (zb_uint16_t short_addr)
 
zb_uint8_t zb_aps_get_max_buffer_size (zb_uint16_t short_addr)
 
zb_ret_t zb_aps_send_user_payload (zb_uint8_t param, zb_addr_u dst_addr, zb_uint16_t profile_id, zb_uint16_t cluster_id, zb_uint8_t dst_endpoint, zb_uint8_t src_endpoint, zb_uint8_t addr_mode, zb_bool_t aps_ack_is_enabled, zb_uint8_t *payload_ptr, zb_uint8_t payload_size)
 Send user payload using APS. More...
 
zb_uint8_tzb_aps_get_aps_payload (zb_uint8_t param, zb_uint8_t *aps_payload_size)
 Get pointer to an APS payload. More...
 
void zb_aps_set_user_data_tx_cb (zb_aps_user_payload_callback_t cb)
 Set callback to notify results of transmitting an APS frame with user payload. More...
 
void zb_af_set_zdo_data_conf_cb (zb_callback_t cb)
 Set callback to be called when ZDO command packet is sent. More...
 

Macro Definition Documentation

§ FIRST_INTERNAL_APSIND_FIELD

#define FIRST_INTERNAL_APSIND_FIELD   extended_fc

§ ZB_APS_DELIVERY_BROADCAST

#define ZB_APS_DELIVERY_BROADCAST   2U

Broadcast frame delivery.

§ ZB_APS_DELIVERY_GROUP

#define ZB_APS_DELIVERY_GROUP   3U

Group frame delivery.

§ ZB_APS_DELIVERY_RESERVED

#define ZB_APS_DELIVERY_RESERVED   1U

Reserved value, see Zigbee spec, subclause 2.2.5.1.1.2

§ ZB_APS_DELIVERY_UNICAST

#define ZB_APS_DELIVERY_UNICAST   0U

Unicast frame delivery.

§ ZB_APS_FC_GET_DELIVERY_MODE

#define ZB_APS_FC_GET_DELIVERY_MODE (   fc)    (((fc)>>2U) & 3U)
Macro for APS FC parse-compose

Function Documentation

§ zb_aps_add_max_trans_size()

void zb_aps_add_max_trans_size ( zb_uint16_t  short_addr,
zb_uint16_t  max_trans_size,
zb_uint8_t  max_buffer_size 
)

§ zb_aps_get_max_buffer_size()

zb_uint8_t zb_aps_get_max_buffer_size ( zb_uint16_t  short_addr)

§ zb_aps_get_max_trans_size()

zb_uint16_t zb_aps_get_max_trans_size ( zb_uint16_t  short_addr)