Addressing functions

The ZDO Addressing functions allow node addresses to be stored and obtained. They include the group address functions that allow a group of nodes/endpoints, with an assigned group address, to be created and modified (this group can be used as the destinations for a multicast message).

The functions are listed below.

Function page

  1. ZPS_u16AplZdoGetNwkAddr

  2. ZPS_u64AplZdoGetIeeeAddr

  3. ZPS_eAplZdoAddAddrMapEntry

  4. ZPS_u16AplZdoLookupAddr

  5. ZPS_u64AplZdoLookupIeeeAddr

  6. ZPS_u64NwkNibGetMappedIeeeAddr

  7. ZPS_u64GetFlashMappedIeeeAddress

  8. ZPS_bNwkFindAddIeeeAddr

  9. ZPS_vSetOverrideLocalIeeeAddr

  10. ZPS_eAplZdoGroupEndpointAdd

  11. ZPS_eAplZdoGroupEndpointRemove

  12. ZPS_eAplZdoGroupAllEndpointRemove

Note: Further addressing functions are provided in the ZDP API and are described in Section 9.1.1, “Address Discovery functions”.

Parent topic:Addressing functions

ZPS_u16AplZdoGetNwkAddr

uint16 ZPS_u16AplZdoGetNwkAddr(void);

Description

This function obtains the 16-bit network address of the local node.

Parameters

None

Parent topic:ZPS_u16AplZdoGetNwkAddr

Returns

16-bit network address obtained.

Parent topic:ZPS_u16AplZdoGetNwkAddr

Parent topic:Addressing functions

ZPS_u64AplZdoGetIeeeAddr

uint64 ZPS_u64AplZdoGetIeeeAddr(void);

Description

This function obtains the 64-bit IEEE (MAC) address of the local node.

Parent topic:ZPS_u64AplZdoGetIeeeAddr

Parameters

None

Parent topic:ZPS_u64AplZdoGetIeeeAddr

Returns

64-bit IEEE/MAC address obtained

Parent topic:ZPS_u64AplZdoGetIeeeAddr

Parent topic:Addressing functions

ZPS_eAplZdoAddAddrMapEntry

ZPS_teStatus ZPS_eAplZdoAddAddrMapEntry(
                                 uint16 u16NwkAddr,
                                 uint64 u64ExtAddr);

Description

This function can be used to add the addresses of a remote node to the local Address Map table. Each entry in this table stores a remote node’s 16-bit network address and an index to its 64-bit IEEE (MAC) address in the MAC Address table (see Section3.2.4). Thus, the function adds the IEEE address to the MAC Address table and then the index of this entry to the Address Map table.

Note: You should only modify the Address Map table using the supplied API functions and never write to it directly.

Parent topic:ZPS_eAplZdoAddAddrMapEntry

Parameters

  • u16NwkAddr: 16-bit network address of node to be added

  • u64ExtAddr: 64-bit IEEE/MAC address of node to be added

Parent topic:ZPS_eAplZdoAddAddrMapEntry

Returns

  • ZPS_E_SUCCESS (addresses successfully added to tables)

  • APS return codes, listed and described in Section 11.2.2

  • NWK return codes, listed and described in Section 11.2.3

  • MAC return codes, listed and described in Section 11.2.4.

Parent topic:ZPS_eAplZdoAddAddrMapEntry

Parent topic:Addressing functions

ZPS_vPurgeAddressMap

void ZPS_vPurgeAddressMap(void);

Description

This function removes all entries from the Address Map table on the local node.

Note: You should modify the Address Map table only using the supplied API functions and never write to it directly.

Parent topic:ZPS_vPurgeAddressMap

Parameters

None.

Parent topic:ZPS_vPurgeAddressMap

Returns

None.

Parent topic:ZPS_vPurgeAddressMap

Parent topic:Addressing functions

ZPS_u16AplZdoLookupAddr

uint16 ZPS_u16AplZdoLookupAddr(uint64 u64ExtAddr);

Description

This function can be used to search the local Address Map table for the 16-bit network address of the node with a given 64-bit IEEE (MAC) address.

Parent topic:ZPS_u16AplZdoLookupAddr

Parameters

u64ExtAddr 64-bit IEEE/MAC address of node to be searched for.

Parent topic:ZPS_u16AplZdoLookupAddr

Returns

16-bit network address obtained.

Parent topic:ZPS_u16AplZdoLookupAddr

Parent topic:Addressing functions

ZPS_u64AplZdoLookupIeeeAddr

uint64 ZPS_u64AplZdoLookupIeeeAddr(
                    uint16 u16NwkAddr);

Description

This function can be used to search the local Address Map table for the 64-bit IEEE (MAC) address of the node with a given 16-bit network address.

Parent topic:ZPS_u64AplZdoLookupIeeeAddr

Parameters

u16NwkAddr 16-bit network address of node to be searched for.

Parent topic:ZPS_u64AplZdoLookupIeeeAddr

Returns

64-bit IEEE/MAC address obtained.

Parent topic:ZPS_u64AplZdoLookupIeeeAddr

Parent topic:Addressing functions

ZPS_u64NwkNibGetMappedIeeeAddr

uint64 ZPS_u64NwkNibGetMappedIeeeAddr(
                            void *pvNwk,
                            uint16 u16Location);

Description

This function can be used to obtain the 64-bit IEEE (MAC) address that is stored in a particular entry in the local MAC Address table. The number of the entry must be specified as well as the handle of the relevant network.

Parent topic:ZPS_u64NwkNibGetMappedIeeeAddr

Parameters

  • pvNwk: Pointer to relevant NWK layer instance

  • u16Location: Number of entry to access in MAC Address table

Parent topic:ZPS_u64NwkNibGetMappedIeeeAddr

Returns

64-bit IEEE/MAC address obtained.

Parent topic:ZPS_u64NwkNibGetMappedIeeeAddr

Parent topic:Addressing functions

ZPS_u64GetFlashMappedIeeeAddress

uint64 ZPS_u64GetFlashMappedIeeeAddress(
                    uint16 u16Location);

Description

This function can be used on the Trust Centre to obtain the 64-bit IEEE (MAC) address of the node for which a link key has been persistently stored in the specified location in devices Flash memory. The location is specified as the number of the array element for the node - see the description of ZPS_vTcInitFlash.

Parent topic:ZPS_u64GetFlashMappedIeeeAddress

Parameters

u16Location: Number of the array element for the node

Parent topic:ZPS_u64GetFlashMappedIeeeAddress

Returns

64-bit IEEE/MAC address obtained.

Parent topic:ZPS_u64GetFlashMappedIeeeAddress

Parent topic:Addressing functions

ZPS_bNwkFindAddIeeeAddr

bool_t ZPS_bNwkFindAddIeeeAddr(
                void *pvNwk,
                uint64 u64IeeeAddr,
                uint16 *pu16Location,
                bool_t bNeighborTable);

Description

This function can be used to add the 64-bit IEEE (MAC) address of a node to the local MAC Address table. The function first searches the table to determine whether the address already exists in the table. If there is no entry for this address, a new entry for it is added to the table. The number of the entry where the address was found or added is returned in a specified location.

Note: You should modify the MAC Address table only using the supplied API functions and never write to it directly.

Parent topic:ZPS_bNwkFindAddIeeeAddr

Parameters

  • pvNwk: Pointer to relevant NWK layer instance

  • u64IeeeAddr: 64-bit IEEE/MAC address to be added

  • pu16Location: Pointer to location to receive number of entry in MAC Address table where specified address was found or added

  • bNeighborTable: Always set to FALSE

Parent topic:ZPS_bNwkFindAddIeeeAddr

Returns

Boolean indicating the outcome of the operation:

  • TRUE - address successfully added to the table

  • FALSE - address found to already exist in the table

Parent topic:ZPS_bNwkFindAddIeeeAddr

Parent topic:Addressing functions

ZPS_vSetOverrideLocalIeeeAddr

void ZPS_vSetOverrideLocalIeeeAddr(
                    uint64 *pu64Address);

Description

This function can be used to over-ride the 64-bit IEEE (MAC) address of the device where this address is stored locally in the index sector of Flash memory.

Note: If required, this function must be called before the ZigBee PRO stack is initialized.

Parent topic:ZPS_vSetOverrideLocalIeeeAddr

Parameters

pu64Address Pointer to the 64-bit IEEE MAC address

Note: The stack stores a pointer to pu64Addressand does not take a copy of the address. The memory pointed to by pu64Address must therefore be static or constant, and must not be on the CPU stack.

Parent topic:ZPS_vSetOverrideLocalIeeeAddr

Parent topic:Addressing functions

ZPS_eAplZdoGroupEndpointAdd

ZPS_teStatus ZPS_eAplZdoGroupEndpointAdd(
                        uint16 u16GroupAddr,
                        uint8 u8DstEndpoint);

Description

This function requests that the specified endpoint (on the local node) is added to the group with the specified group address. This means that this endpoint will become one of the destinations for messages sent to the given group address.

To form a group comprising endpoints from different nodes, it is necessary to call this function for each endpoint individually, on the endpoint’s local node.

An endpoint can belong to more than one group.

Information on the endpoints in a group can be obtained from the Group Address table in the AIB (which can be accessed using the function ZPS_psAplAibGetAib()).

Note: In order to add an endpoint to a group using this function, a Group Address table must exist on the local node. This table is created using the ZPS Configuration Editor.

Parent topic:ZPS_eAplZdoGroupEndpointAdd

Parameters

  • u16GroupAddr: 16-bit group address

  • u8DstEndpoint: Number of destination endpoint (1-240) on local node

Parent topic:ZPS_eAplZdoGroupEndpointAdd

Returns

  • ZPS_E_SUCCESS (endpoint successfully added to group)

  • APS return codes, listed and described in Section 11.2.2

  • NWK return codes, listed and described in Section 11.2.3

  • MAC return codes, listed and described in Section 11.2.4

Parent topic:ZPS_eAplZdoGroupEndpointAdd

Parent topic:Addressing functions

ZPS_eAplZdoGroupEndpointRemove

ZPS_teStatus ZPS_eAplZdoGroupEndpointRemove(
                            uint16 u16GroupAddr,
                            uint8 u8DstEndpoint);

Description

This function requests that the specified endpoint (on the local node) is removed from the group with the specified group address.

If you wish to remove an endpoint from all groups to which it belongs, use the functionZPS_eAplZdoGroupAllEndpointRemove().

Information on the endpoints in a group can be obtained from the Group Address table in the AIB (which can be accessed using the function ZPS_psAplAibGetAib()).

Parent topic:ZPS_eAplZdoGroupEndpointRemove

Parameters

  • u16GroupAddr: 16-bit group address

  • u8DstEndpoint: Number of destination endpoint (1-240) on local node

Parent topic:ZPS_eAplZdoGroupEndpointRemove

Returns

  • ZPS_E_SUCCESS (endpoint successfully removed from group)

  • APS return codes, listed and described in Section 111.2.2

  • NWK return codes, listed and described in Section 11.2.3

  • MAC return codes, listed and described in Section 11.2.4

Parent topic:ZPS_eAplZdoGroupEndpointRemove

Parent topic:Addressing functions

ZPS_eAplZdoGroupAllEndpointRemove

ZPS_teStatus ZPS_eAplZdoGroupAllEndpointRemove(
                            uint8 u8DstEndpoint);

Description

This function requests that the specified endpoint (on the local node) is removed from all groups to which it currently belongs.

Information on the endpoints in a group can be obtained from the Group Address table in the AIB (which can be accessed using the function ZPS_psAplAibGetAib()).

Parent topic:ZPS_eAplZdoGroupAllEndpointRemove

Parameters

u8DstEndpoint Number of destination endpoint (1-240) on local node

Parent topic:ZPS_eAplZdoGroupAllEndpointRemove

Returns

  • ZPS_E_SUCCESS (endpoint successfully removed from all groups)

  • APS return codes, listed and described in Section 11.2.2

  • NWK return codes, listed and described in Section 11.2.3

  • MAC return codes, listed and described in Section 11.2.4

Parent topic:ZPS_eAplZdoGroupAllEndpointRemove

Parent topic:Addressing functions

Parent topic:ZDO API functions