ZDO_GetChildrenAddr Function

C

void ZDO_GetChildrenAddr(ZDO_GetChildrenAddr_t *childrenAddr);

Description

Retrieves children's short and extended addresses

The function gets the address information of all node's children including unauthenticated children. The information is retrieved from the neighbor table and is written to the dedicated static variable given in the argument. The following code example demonstrates a typical usage of the function:

static NodeAddr_t childAddrTable[CS_MAX_CHILDREN_AMOUNT - CS_MAX_CHILDREN_ROUTER_AMOUNT];
static ZDO_GetChildrenAddr_t children =
{
.childrenCount = CS_MAX_CHILDREN_AMOUNT - CS_MAX_CHILDREN_ROUTER_AMOUNT,
.childrenTable = childAddrTable,
};
...
ZDO_GetChildrenAddr(&children);
int actualNumberOfChildren = children.childrenCount;

While initializing the structure for storing information about children, set the childrenCount field to the maximum number of entries in the table. After the ZDO_GetChildrenAddr() function is executed, the value of this field will equal the actual number of children.

Parameters

ParamDescription
childrenAddrDetermines the parameters of the request.

Returns

None