5.1.3 Network (NWK) APIs

The network layer APIs serve as an interface to ensure the correct operation of the IEEE® 802.15.4 MAC sub-layer and to provide a suitable service interface to the application layer.

The following table provides details about the functions to access NWK-related parameters and features, which can be useful in user application code.
Table 5-4. Network (NWK) APIs
Function PrototypeDescription
bool NWK_AddGroup(const NWK_GroupAddr_t addr, const NWK_GroupData_t data)Add new entry to the group table
DeviceType_t NWK_GetDeviceType(void)Getting a device type parameter value
const ExtAddr_t NWK_GetExtByShortAddress(const ShortAddr_t shortAddr)Searching an extended address by the short address
ExtPanId_t ExtPanId_t NWK_GetExtPanId(void)This function returns an extended PANID of the network
Channel_t Channel_t NWK_GetLogicalChannel(void)Current RF channel
Lqi_t NWK_GetNeighborsLqi(NwkNeighbor_t const *const neighbor)Link quality indication for given neighbor
PanId_t NWK_GetPanId(void)This function returns a short PANID of the network
ShortAddr_t NWK_GetParentShortAddr(void)This function returns a short address of parent
ShortAddr_t NWK_GetShortAddr(void)This function returns a short address that is allocated by parent
NWK_GroupTableSize_t NWK_GroupCapacity(void)Get remaining groupsʼ capacity
bool NWK_IsGroupMember(const NWK_GroupAddr_t addr, const NWK_GroupData_t data)Check group address and data in the group table
NWK_GroupTableEntry_t* NWK_NextGroup(NWK_GroupTableEntry_t *entry)Get first or next non-free entry from the groupsʼ table
bool NWK_RemoveAllGroups(const NWK_GroupData_t data)Remove all group entries with given group data
bool NWK_RemoveGroup(const NWK_GroupAddr_t addr, const NWK_GroupData_t data)Remove group entries from the group table