Developing with ZBOSS for Zigbee

Data Structures

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. 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.
More...
 
struct  zb_apsme_remove_all_groups_conf_s
 APSME-REMOVE-ALL-GROUPS.confirm primitive parameters.
More...
 

Typedefs

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.
 
typedef struct zb_apsme_add_group_conf_s zb_apsme_add_group_conf_t
 APSME-ADD-GROUP.confirm primitive parameters.
 
typedef struct zb_apsme_add_group_req_s zb_apsme_remove_group_req_t
 APSME-REMOVE-GROUP.request primitive parameters.

 
typedef struct zb_apsme_add_group_conf_s zb_apsme_remove_group_conf_t
 APSME-REMOVE-GROUP.confirm primitive parameters.

 
typedef struct zb_apsme_remove_all_groups_req_s zb_apsme_remove_all_groups_req_t
 APSME-REMOVE-ALL-GROUPS.request primitive parameters.

 
typedef struct zb_apsme_remove_all_groups_conf_s zb_apsme_remove_all_groups_conf_t
 APSME-REMOVE-ALL-GROUPS.confirm primitive parameters.

 

Functions

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)
 
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...
 

Detailed Description

Typedef Documentation

◆ zb_aps_check_binding_req_t

◆ zb_aps_check_binding_resp_t

This data structure passed to callback passed to zb_aps_check_binding_request().

◆ zb_apsme_binding_req_t

APSME binding structure.

This data structure passed to zb_apsme_bind_request() and to zb_apsme_unbind_request().

Function Documentation

◆ zb_aps_check_binding_request()

void zb_aps_check_binding_request ( zb_bufid_t  param)

Checks if the binding with specified parameters exists

◆ zb_apsme_add_group_request()

void zb_apsme_add_group_request ( zb_uint8_t  param)

APSME-ADD-GROUP.request primitive.

Parameters
param- index of buffer with parameter. See zb_apsme_add_group_req_t.
Example
TRACE_MSG(TRACE_APP1, "> add_to_test_group buf %p", (FMT__P, buf));
ZB_BZERO(aps_req, sizeof(*aps_req));
aps_req->group_address = TEST_GROUP_ID;
aps_req->endpoint = HA_SWITCH_ENDPOINT;

◆ zb_apsme_bind_request()

void zb_apsme_bind_request ( zb_uint8_t  param)

APSME-BIND.request primitive.

Parameters
param- index of buffer containing request data (see zb_apsme_binding_req_t).
Example
void light_control_bind_bulb(zb_uint8_t param)
{
TRACE_MSG(TRACE_APP2, ">> light_control_bind_bulb param %hd", (FMT__H, param));
bind_on_off_cluster(param);
TRACE_MSG(TRACE_APP2, "<< light_control_bind_bulb", (FMT__0));
}

◆ zb_apsme_remove_all_groups_request()

void zb_apsme_remove_all_groups_request ( zb_uint8_t  param)

APSME-REMOVE-ALL-GROUPS.request primitive.

Parameters
param- index of buffer with parameter. See zb_apsme_remove_all_groups_req_t.
Example
void remove_groups(zb_uint8_t param)
{
zb_buf_t *buf = ZB_BUF_FROM_REF(param);
zb_apsme_remove_all_groups_req_t *req_remove_param = NULL;
TRACE_MSG(TRACE_APP1, "> remove_groups param %hd", (FMT__H, param));
req_remove_param = ZB_GET_BUF_PARAM(buf, zb_apsme_remove_all_groups_req_t);
req_remove_param->endpoint = ZB_TEST_PROFILE_EP;
zb_free_buf(buf);
TRACE_MSG(TRACE_APP1, "< remove_groups", (FMT__0));
}

◆ zb_apsme_remove_group_request()

void zb_apsme_remove_group_request ( zb_uint8_t  param)

APSME-REMOVE-GROUP.request primitive.

Parameters
param- index of buffer with parameter. See zb_apsme_remove_group_req_t.
Example
void remove_group(zb_uint8_t param)
{
zb_buf_t *buf = ZB_BUF_FROM_REF(param);
zb_apsme_remove_group_req_t *req_remove_param = NULL;
TRACE_MSG(TRACE_APP1, "> remove_group param %hd", (FMT__H, param));
req_remove_param = ZB_GET_BUF_PARAM(buf, zb_apsme_remove_group_req_t);
req_remove_param->endpoint = ZB_TEST_PROFILE_EP;
req_remove_param->group_address = 0x0001;
zb_free_buf(buf);
TRACE_MSG(TRACE_APP1, "< remove_group", (FMT__0));
}

◆ zb_apsme_unbind_all()

void zb_apsme_unbind_all ( zb_uint8_t  param)

Perform unbind all entries. This custom function and it is not described in Zigbee specification.

Parameters
param- not used.

◆ zb_apsme_unbind_request()

void zb_apsme_unbind_request ( zb_uint8_t  param)

APSME-UNBIND.request primitive.

Parameters
param- index of buffer containing request data (see zb_apsme_binding_req_t).
Example
TRACE_MSG(TRACE_APS1, "start APS unbind test", (FMT__0));
for (i = 1 ;(i < ZB_APS_SRC_BINDING_TABLE_SIZE || ret == RET_OK); ++i)
{
gen_64_bit_addr(ieee_addr, i+1, i+1);
ZB_MEMCPY(&req_b.src_addr, &ieee_addr, sizeof(zb_ieee_addr_t));
req_b.src_endpoint = i;
req_b.clusterid = 1;
gen_64_bit_addr(ieee_addr, i+2, i+2);
ZB_MEMCPY(&req_b.dst_addr.addr_long, &ieee_addr, sizeof(zb_ieee_addr_t));
req_b.dst_endpoint = i+1;
ZB_MEMCPY(
ZB_GET_BUF_TAIL(aps, sizeof(zb_apsme_binding_req_t)),
&req_b,
zb_apsme_unbind_request(ZB_REF_FROM_BUF(aps));
ret = aps->u.hdr.status;
}
if (ret)
{
if (ret == RET_INVALID_BINDING)
{
TRACE_MSG(TRACE_APS1, "invalid binding for i = %d ret %d", (FMT__D_D, i, ret));
if (ZG->aps.binding.src_n_elements == 1 && ZG->aps.binding.dst_n_elements == 1)
{
TRACE_MSG(TRACE_INFO2, "SUCCESS", (FMT__0));
}
else
{
TRACE_MSG(TRACE_APS1, "ERROR binding table is corrupted", (FMT__0));
}
}
else
{
TRACE_MSG(TRACE_APS1, "ERROR %d", (FMT__D, ret));
}
}
zb_apsme_add_group_req_s::endpoint
zb_uint8_t endpoint
Definition: zboss_api_aps.h:317
zb_apsme_add_group_req_s::group_address
zb_uint16_t group_address
Definition: zboss_api_aps.h:316
zb_uint8_t
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:153
zb_apsme_binding_req_s
APSME binding structure.
Definition: zboss_api_aps.h:267
TRACE_MSG
#define TRACE_MSG(lm, fmts, args)
Put trace output.
Definition: zb_trace.h:359
zb_apsme_remove_group_request
void zb_apsme_remove_group_request(zb_uint8_t param)
APSME-REMOVE-GROUP.request primitive.
zb_buf_reuse
#define zb_buf_reuse(buf)
Definition: zboss_api_buf.h:392
zb_apsme_remove_all_groups_req_s
APSME-REMOVE-ALL-GROUPS.request primitive parameters.
Definition: zboss_api_aps.h:336
ZB_BUF_GET_PARAM
#define ZB_BUF_GET_PARAM(buf, type)
Definition: zboss_api_buf.h:447
zb_apsme_remove_all_groups_request
void zb_apsme_remove_all_groups_request(zb_uint8_t param)
APSME-REMOVE-ALL-GROUPS.request primitive.
ZB_APS_ADDR_MODE_64_ENDP_PRESENT
#define ZB_APS_ADDR_MODE_64_ENDP_PRESENT
Definition: zboss_api_aps.h:108
zb_apsme_add_group_req_s
APSME-ADD-GROUP.request primitive parameters.
Definition: zboss_api_aps.h:314
zb_ieee_addr_t
zb_64bit_addr_t zb_ieee_addr_t
Long (64-bit) device address.
Definition: zb_types.h:554
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_apsme_unbind_request
void zb_apsme_unbind_request(zb_uint8_t param)
APSME-UNBIND.request primitive.
zb_apsme_remove_all_groups_req_s::endpoint
zb_uint8_t endpoint
Definition: zboss_api_aps.h:338
zb_apsme_add_group_request
void zb_apsme_add_group_request(zb_uint8_t param)
APSME-ADD-GROUP.request primitive.
ZB_APS_SRC_BINDING_TABLE_SIZE
#define ZB_APS_SRC_BINDING_TABLE_SIZE
Definition: zb_config.h:833