5.1.2.4 ZDO_GetChildrenAddr Function
Syntax
void ZDO_GetChildrenAddr(ZDO_GetChildrenAddr_t *childrenAddr);
Description
The function retrieves the short and extended addresses of children nodes. It gathers address information for all of a node’s children, including those that are unauthenticated. This information is sourced from the neighbor table and written to the dedicated static variable provided in the argument.
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 executing the ZDO_GetChildrenAddr()
function, the value of this field equals the actual number of children.
Initialize the structure designated for storing information about child nodes by setting the childrenCount
field to the maximum number of entries in the table. After the ZDO_GetChildrenAddr()
function executes, the childrenCount
field reflects the actual number of children.
Parameter Name | Description |
---|---|
childrenAddr | Determines the parameters of the request |
- None