Developing with ZBOSS
ZDO groups management

Data Structures

struct  zb_zdo_mgmt_permit_joining_resp_s
 Response from zb_zdo_mgmt_permit_joining_req. More...
 
struct  zb_zdo_not_supported_resp_s
 Not Supported Response. More...
 
struct  zb_zdo_mgmt_nwk_ieee_joining_list_param_s
 Parameters for Mgmt_NWK_IEEE_Joining_List_req. More...
 
struct  zb_zdo_mgmt_nwk_ieee_joining_list_req_s
 Request for Mgmt_NWK_IEEE_Joining_List_req. More...
 
struct  zb_zdo_mgmt_nwk_ieee_joining_list_rsp_s
 Response for Mgmt_NWK_IEEE_Joining_List_rsp. More...
 

Typedefs

typedef struct zb_zdo_mgmt_permit_joining_resp_s zb_zdo_mgmt_permit_joining_resp_t
 Response from zb_zdo_mgmt_permit_joining_req.
 
typedef struct zb_zdo_not_supported_resp_s zb_zdo_not_supported_resp_t
 Not Supported Response.
 
typedef struct zb_zdo_mgmt_nwk_ieee_joining_list_param_s zb_zdo_mgmt_nwk_ieee_joining_list_param_t
 Parameters for Mgmt_NWK_IEEE_Joining_List_req. More...
 
typedef struct zb_zdo_mgmt_nwk_ieee_joining_list_req_s zb_zdo_mgmt_nwk_ieee_joining_list_req_t
 Request for Mgmt_NWK_IEEE_Joining_List_req. More...
 
typedef struct zb_zdo_mgmt_nwk_ieee_joining_list_rsp_s zb_zdo_mgmt_nwk_ieee_joining_list_rsp_t
 Response for Mgmt_NWK_IEEE_Joining_List_rsp. More...
 

Functions

void zb_zdo_add_group_req (zb_uint8_t param)
 ! More...
 
void zb_zdo_remove_group_req (zb_uint8_t param)
 ZDO interface for REMOVE-GROUP.request. More...
 
void zb_zdo_remove_all_groups_req (zb_uint8_t param)
 ZDO interface for REMOVE-ALL-GROUPS.request. More...
 
void zb_zdo_get_group_membership_req (zb_uint8_t param)
 ZDO interface for ZCL Get Group Membership Command. More...
 

Detailed Description

Typedef Documentation

◆ zb_zdo_mgmt_nwk_ieee_joining_list_param_t

Parameters for Mgmt_NWK_IEEE_Joining_List_req.

See also
ZB r22 spec, subclause 2.4.3.3.11.

◆ zb_zdo_mgmt_nwk_ieee_joining_list_req_t

Request for Mgmt_NWK_IEEE_Joining_List_req.

See also
ZB r22 spec, subclause 2.4.3.3.11.

◆ zb_zdo_mgmt_nwk_ieee_joining_list_rsp_t

Response for Mgmt_NWK_IEEE_Joining_List_rsp.

See also
ZB spec, subclause 2.4.4.4.11.

Function Documentation

◆ zb_zdo_add_group_req()

void zb_zdo_add_group_req ( zb_uint8_t  param)

!

ZDO interface for ADD-GROUP.request.

Note
zb_apsme_add_group_request does not call confirm callback.
Parameters
param- (in/out) buffer with parameters

Example

void start_add_to_group(zb_uint8_t param)
{
zb_buf_t *buf = ZB_BUF_FROM_REF(param);
req = ZB_GET_BUF_PARAM(buf, zb_apsme_add_group_req_t);
req->group_address = TEST_GROUP_ADDRESS_1;
req->endpoint = ZB_TEST_PROFILE_EP;
ZDO_START_ROUTINE_WITH_CALLBACK(param, zb_zdo_add_group_req, group_add_conf1);
}

See tp_pro_bv-46 sample

◆ zb_zdo_get_group_membership_req()

void zb_zdo_get_group_membership_req ( zb_uint8_t  param)

ZDO interface for ZCL Get Group Membership Command.

Parameters
param- (in/out) buffer with parameters
ZB_BUF_REUSE(ZB_BUF_FROM_REF(param));
member_req = (zb_apsme_get_group_membership_req_t*)zb_buf_initial_alloc(ZB_BUF_FROM_REF(param), CHECK_GROUP_COUNT*sizeof(zb_uint16_t) + sizeof(zb_ushort_t));
member_req->n_groups = CHECK_GROUP_COUNT;
member_req->groups[0] = 0x0C; /* in table */
member_req->groups[1] = 0xEE;
member_req->groups[2] = 0x18; /* in table */
member_req->groups[3] = 0x1C; /* in table */
member_req->groups[4] = 0xFF;
ZDO_START_ROUTINE_WITH_CALLBACK(param, zb_zdo_get_group_membership_req, group_membership_conf);

See aps_group_management sample

◆ zb_zdo_remove_all_groups_req()

void zb_zdo_remove_all_groups_req ( zb_uint8_t  param)

ZDO interface for REMOVE-ALL-GROUPS.request.

Parameters
param- (in/out) buffer with parameters
void group_add_conf(zb_uint8_t param)
{
zb_apsme_add_group_req_t *add_req = NULL;
zb_apsme_remove_group_req_t *del_req = NULL;
zb_apsme_remove_all_groups_req_t *del_all_req = NULL;
TRACE_MSG(TRACE_APS3, "###group_add_conf: iteration %hd", (FMT__H, curr_iter));
if (++curr_iter == REPETITION_COUNT)
{
if (need_remove_all_groups)
{
TRACE_MSG(TRACE_APS3, "###group_add_conf: all done, start delete all groups", (FMT__0));
del_all_req = ZB_GET_BUF_PARAM(ZB_BUF_FROM_REF(param), zb_apsme_remove_all_groups_req_t);
del_all_req->endpoint = EP_START_ADDR + DDD; /* 2 and 3 entries in array */
ZDO_START_ROUTINE_WITH_CALLBACK(param, zb_zdo_remove_all_groups_req, group_remove_all_conf);
}
else
{
TRACE_MSG(TRACE_APS3, "###group_add_conf: all done, start delete groups", (FMT__0));
del_req = ZB_GET_BUF_PARAM(ZB_BUF_FROM_REF(param), zb_apsme_remove_group_req_t);
del_req->endpoint = EP_START_ADDR;
del_req->group_address = GROUP_START_ADDR;
ZDO_START_ROUTINE_WITH_CALLBACK(param, zb_zdo_remove_group_req, group_remove_conf);
}
return;
}
add_req = ZB_GET_BUF_PARAM(ZB_BUF_FROM_REF(param), zb_apsme_add_group_req_t);
add_req->group_address += DDD;
if (need_remove_all_groups)
{
if (curr_iter % 2)
{
add_req->endpoint += DDD;
}
}
else
{
add_req->endpoint += DDD;
}
ZDO_START_ROUTINE_WITH_CALLBACK(param, zb_zdo_add_group_req, group_add_conf);
}

See aps_group_management sample

◆ zb_zdo_remove_group_req()

void zb_zdo_remove_group_req ( zb_uint8_t  param)

ZDO interface for REMOVE-GROUP.request.

Parameters
param- (in/out) buffer with parameters
void group_remove_conf1(zb_uint8_t param)
{
zb_buf_t *buf = ZB_BUF_FROM_REF(param);
zb_apsme_remove_group_req_t *req = ZB_GET_BUF_PARAM(ZB_BUF_FROM_REF(param), zb_apsme_add_group_req_t);
zb_uint16_t grp_addr = req->group_address;
if (buf->u.hdr.status == RET_OK)
{
TRACE_MSG(TRACE_APS1, "[1] Remove from group %hd with endpoint %hd - confirm", (FMT__H_H, req->group_address, req->endpoint));
req = ZB_GET_BUF_PARAM(buf, zb_apsme_remove_group_req_t);
req->group_address = grp_addr;
req->endpoint = 0xEF;
ZDO_START_ROUTINE_WITH_CALLBACK(param, zb_zdo_remove_group_req, group_remove_conf2);
}
}
See tp_pro_bv-46 sample