ZDP API functions

The ZDP API functions are divided into the following categories:

Common parameters

All the ZDP API functions, except ZPS_bAplZdpUnpackResponse(), are concerned with sending out a request and all use a similar set of parameters. These parameters are described below, but more specific information is provided as part of the function descriptions:

  • hAPdu: This is the unique handle of the APDU (Application Protocol Data Unit) instance for the request to be sent (see below).

  • uDstAddr: This is the IEEE address or network address of the node to which the request is sent (the parameter bExtAddrmust be set according to the type of address used). For a broadcast, uDstAddrmust be set to a special address, as described in Section 9.3.

  • bExtAddr: This is a Boolean indicating the type of address specified in the parameter uDstAddr as a 64-bit IEEE address (TRUE) or 16-bit network address (FALSE).

  • pu8SeqNumber: This is a pointer to the sequence number for the request - each request must have a unique sequence number to help determine the order in which requests were sent. On sending a request, the function automatically increments the sequence number for the next request.

  • u16ProfileId: This is the identifier of the ZigBee application profile being used.

  • psZdpNwkAddrReq: This is a pointer to a structure representing the request. The structure used is dependent on the specific function. The different request structures are detailed in Section 9.2.2.

APDUs for requests and responses

A request generated by this API is sent in an APDU (Application Protocol Data Unit). A local APDU instance for the request must first be allocated using the PDUM function PDUM_hAPduAllocateAPduInstance(). This function returns a handle for the APDU instance, which is subsequently used in the relevant ZDP API request function. Once the request is successfully sent, the APDU instance is automatically de-allocated by the stack (there is no need for the application to de-allocate it).

Note: If the request is not successfully sent (the send function does not return ZPS_E_SUCCESS), then the APDU instance is not de-allocated automatically. In such cases, the application should de-allocate it using the PDUM function PDUM_eAPduFreeAPduInstance().

When a response is subsequently received, the stack automatically allocates a local APDU instance and includes its handle in the notification event for the response. Once the response has been dealt with, the application must de-allocate the APDU instance using the function PDUM_eAPduFreeAPduInstance().

Address discovery functions

The ZDP Address Discovery functions are concerned with obtaining addresses of nodes in the network.

The functions are listed below:

  1. ZPS_eAplZdpNwkAddrRequest

  2. ZPS_eAplZdpIEEEAddrRequest

  3. ZPS_eAplZdpDeviceAnnceRequest

Note: Further addressing functions are provided in the ZDO API and are described in Section 7.1.3.

ZPS_eAplZdpNwkAddrRequest

ZPS\_teStatus ZPS\_eAplZdpNwkAddrRequest\(
        PDUM\_thAPduInstance hAPduInst,
        ZPS\_tuAddress uDstAddr,
        bool bExtAddr,
        uint8 *pu8SeqNumber,
        ZPS\_tsAplZdpNwkAddrReq *psZdpNwkAddrReq);

Description

This function requests the 16-bit network address of the node with a particular 64-bit IEEE (MAC) address. The function sends out an NWK_addr_req request, which can be either unicast or broadcast, as follows:

  • Unicast to another node, specified through uDstAddr, that will ‘know’ the required network address (this may be the parent of the node of interest or the Coordinator)

  • Broadcast to the network, in which case uDstAddrmust be set to the special network address 0xFFFF (see Section 9.3)

The IEEE address of the node of interest must be specified in the request, represented by the structure below (detailed further in Section 9.2.2.1).

typedef struct {
        uint64 u64IeeeAddr;
        uint8 u8RequestType;
        uint8 u8StartIndex;
} ZPS_tsAplZdpNwkAddrReq;

The required network address is received in an NWK_addr_resp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpNwkAddrRsp(detailed in Section 9.2.3.1). Note that this response can optionally contain the network addresses of the responding node’s neighbors (this option is selected as part of the request through u8RequestType).

Parent topic:ZPS_eAplZdpNwkAddrRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent

  • uDstAddr: Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpNwkAddrReq: Pointer to request (see above).

Parent topic:ZPS_eAplZdpNwkAddrRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpNwkAddrRequest

Parent topic:Address discovery functions

ZPS_eAplZdpIEEEAddrRequest

ZPS\_teStatus ZPS\_eAplZdpIeeeAddrRequest\(
     PDUM\_thAPduInstance hAPduInst,
     ZPS\_tuAddress uDstAddr,
     bool bExtAddr,
     uint8 *pu8SeqNumber,
     ZPS\_tsAplZdpIeeeAddrReq *psZdpIeeeAddrReq);

Description

This function requests the 64-bit IEEE (MAC) address of the node with a particular 16-bit network address. The function sends an IEEE_addr_req request to the relevant node, specified through uDstAddr.

The network address of the node of interest must also be specified in the request, represented by the structure below (detailed further in Section 9.2.2.2).

typedef struct {

uint16 u16NwkAddrOfInterest; uint8 u8RequestType;

uint8 u8StartIndex;

} ZPS_tsAplZdpIeeeAddrReq;

The required IEEE address is received in an IEEE_addr_resp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpIeeeAddrRsp(detailed in Section 9.2.3.2). Note that this response can optionally contain the IEEE addresses of the responding node’s neighbors (this option is selected as part of the request through u8RequestType).

Parent topic:ZPS_eAplZdpIEEEAddrRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent

  • uDstAddr Network address of destination node of request (bExtAddrmust be set to FALSE - see below)

  • bExtAddr Type of destination address: TRUE: 64-bit IEEE (MAC) address FALSE: 16-bit network address

    • * pu8SeqNumber Pointer to sequence number of request

    • * psZdpIeeeAddrReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpIEEEAddrRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpIEEEAddrRequest

Parent topic:Address discovery functions

ZPS_eAplZdpDeviceAnnceRequest

ZPS_teStatus ZPS_eAplZdpDeviceAnnceRequest(
    PDUM_thAPduInstance hAPduInst,
    uint8 *pu8SeqNumber,
    ZPS_tsAplZdpDeviceAnnceReq *psZdpDeviceAnnceReq);

Description

This function is used to notify other nodes that the local node has joined or rejoined the network. The function broadcasts a Device_annce announcement to the network and is normally automatically called by the ZDO when the local node joins or rejoins the network.

The IEEE (MAC) and allocated network addresses as well as the capabilities of the sending node must be specified in the announcement, represented by the structure below (detailed further in Section 9.2.2.3).

typedef struct {
    uint16 u16NwkAddr;
    uint64 u64IeeeAddr;
    uint8 u8Capability;
} ZPS_tsAplZdpDeviceAnnceReq;

On receiving this announcement, a network node updates any information it holds that relates to the supplied IEEE and network addresses:

  • If it already holds the supplied IEEE address, it updates the corresponding network address with the supplied one (if necessary).

  • If it already holds the supplied network address but with a different corresponding IEEE address, the latter is marked as not having a valid corresponding network address.

Parent topic:ZPS_eAplZdpDeviceAnnceRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent

  • * pu8SeqNumber Pointer to sequence number of announcement

  • * psZdpDeviceAnnceReq Pointer to announcement (see above)

Parent topic:ZPS_eAplZdpDeviceAnnceRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpDeviceAnnceRequest

Parent topic:Address discovery functions

Parent topic:ZDP API functions

Service Discovery functions

The ZDP Service Discovery functions are concerned with obtaining information about the nature and capabilities of a network node.

The functions are listed below.

  1. ZPS_eAplZdpNodeDescRequest

  2. ZPS_eAplZdpPowerDescRequest

  3. ZPS_eAplZdpSimpleDescRequest

  4. ZPS_eAplZdpExtendedSimpleDescRequest

  5. ZPS_eAplZdpComplexDescRequest

  6. ZPS_eAplZdpUserDescRequest

  7. ZPS_eAplZdpMatchDescRequest

  8. ZPS_eAplZdpActiveEpRequest

  9. ZPS_eAplZdpExtendedActiveEpRequest

  10. ZPS_eAplZdpUserDescSetRequest

  11. ZPS_eAplZdpSystemServerDiscoveryRequest

  12. ZPS_eAplZdpDiscoveryCacheRequest

  13. ZPS_eAplZdpDiscoveryStoreRequest

  14. ZPS_eAplZdpNodeDescStoreRequest

  15. ZPS_eAplZdpPowerDescStoreRequest

  16. ZPS_eAplZdpSimpleDescStoreRequest

  17. ZPS_eAplZdpActiveEpStoreRequest

  18. ZPS_eAplZdpFindNodeCacheRequest

  19. ZPS_eAplZdpRemoveNodeCacheRequest

ZPS_eAplZdpNodeDescRequest

ZPS\_teStatus ZPS\_eAplZdpNodeDescRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpNodeDescReq *psZdpNodeDescReq);

Description

This function requests the Node descriptor of the node with a particular network address. The function sends a Node_Desc_req request either to the relevant node or to another node that may hold the required information in its primary discovery cache.

The network address of the node of interest must be specified in the request, which is represented by the structure below (further detailed in Section 9.2.2.4).

typedef struct {
     uint16 u16NwkAddrOfInterest;
} ZPS_tsAplZdpNodeDescReq;

The required Node descriptor is received in a Node_Desc_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpNodeDescRsp(detailed in Section 9.2.3.3).

Parent topic:ZPS_eAplZdpNodeDescRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent

  • uDstAddr: Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpNodeDescReq: Pointer to request (see above).

Parent topic:ZPS_eAplZdpNodeDescRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpNodeDescRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpPowerDescRequest

ZPS\_teStatus ZPS\_eAplZdpPowerDescRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpPowerDescReq *psZdpPowerDescReq);

Description

This function requests the Power descriptor of the node with a particular network address. The function sends a Power_Desc_req request either to the relevant node or to another node that may hold the required information in its primary discovery cache.

The network address of the node of interest must be specified in the request, which is represented by the structure below (further detailed in Section 9.2.2.5).

typedef struct {

uint16 u16NwkAddrOfInterest;

} ZPS_tsAplZdpPowerDescReq;

The required Power descriptor is received in a Power_Desc_rsp response. The descriptor should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpPowerDescRsp(detailed in Section 9.2.3.4).

Parent topic:ZPS_eAplZdpPowerDescRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent

  • uDstAddr: Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpPowerDescReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpPowerDescRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpPowerDescRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpSimpleDescRequest

ZPS\_teStatus ZPS\_eAplZdpSimpleDescRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpSimpleDescReq *psZdpSimpleDescReq);

Description

This function requests the Simple descriptor for a specific endpoint on the node with a particular network address. The function sends a Simple_Desc_req request either to the relevant node or to another node that may hold the required information in its primary discovery cache.

The network address of the node of interest and the relevant endpoint on the node must be specified in the request, which is represented by the structure below (further detailed in Section 9.2.2.6).

typedef struct {

uint16 u16NwkAddrOfInterest; uint8 u8EndPoint;

} ZPS_tsAplZdpSimpleDescReq;

The required Simple descriptor is received in a Simple_Desc_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpSimpleDescRsp(detailed in Section 9.2.3.5).

Parent topic:ZPS_eAplZdpSimpleDescRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent

  • uDstAddr: Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpSimpleDescReq: Pointer to request (see above).

Parent topic:ZPS_eAplZdpSimpleDescRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpSimpleDescRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpExtendedSimpleDescRequest

ZPS\_teStatus ZPS\_eAplZdpExtendedSimpleDescRequest\(
  PDUM\_thAPduInstance hAPduInst,
  ZPS\_tuAddress uDstAddr,
  bool bExtAddr,
  uint8 *pu8SeqNumber,
  ZPS\_tsAplZdpExtendedSimpleDescReq
        *psZdpExtendedSimpleDescReq);

Description

This function requests a cluster list for a specific endpoint on the node with a particular network address. The function should be called if the endpoint has more input or output clusters than could be included in the response to ZPS_eAplZdpSimpleDescRequest(). The function sends an Extended_Simple_Desc_req request either to the relevant node or to another node that may hold the required information in its primary discovery cache.

The network address of the node of interest and the relevant endpoint on the node must be specified in the request, which is represented by the structure below (further detailed in Section 9.2.2.7).

typedef struct { uint16 u16NwkAddr; uint8 u8EndPoint;

uint8 u8StartIndex;

} ZPS_tsAplZdpExtendedSimpleDescReq;

This structure allows you to specify the first input/output cluster of interest in the endpoint’s input and output cluster lists. Thus, this should normally be the cluster after the last one reported following a call to ZPS_eAplZdpSimpleDescRequest().

The required cluster information is received in a Extended_Simple_Desc_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpExtendedSimpleDescRsp(detailed in Section 9.2.3.6).

Parent topic:ZPS_eAplZdpExtendedSimpleDescRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent

  • uDstAddr: Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpExtendedSimpleDescReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpExtendedSimpleDescRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpExtendedSimpleDescRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpComplexDescRequest

ZPS\_teStatus ZPS\_eAplZdpComplexDescRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
ZPS\_tsAplZdpComplexDescReq *psZdpComplexDescReq);

Description

This function requests the Complex descriptor of the node with a particular network address. The function sends a Complex_Desc_req request either to the relevant node or to another node that may hold the required information in its primary discovery cache.

The network address of the node of interest must be specified in the request, which is represented by the structure below (further detailed in Section 9.2.2.8).

typedef struct {

uint16 u16NwkAddrOfInterest;

} ZPS_tsAplZdpComplexDescReq;

The required Complex descriptor will be received in a Complex_Desc_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpComplexDescRsp(detailed in Section 9.2.3.7).

Parent topic:ZPS_eAplZdpComplexDescRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent

  • uDstAddr: Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpComplexDescReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpComplexDescRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpComplexDescRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpUserDescRequest

ZPS_teStatus ZPS_eAplZdpUserDescRequest(
    PDUM_thAPduInstance hAPduInst,
    ZPS_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
ZPS_tsAplZdpUserDescReq *psZdpUserDescReq);

Description

This function requests the User descriptor of the node with a particular network address. The function sends a User_Desc_req request either to the relevant node or to another node that may hold the required information in its primary discovery cache.

Note: This function can only be used to access the User descriptor of a non-NXP device (which supports this descriptor), since the storage of a User descriptor on an NXP remove device is not supported.

The network address of the node of interest must be specified in the request, which is represented by the structure below (further detailed in Section 9.2.2.9).

typedef struct {

uint16 u16NwkAddrOfInterest;

} ZPS_tsAplZdpUserDescReq;

The required User descriptor will be received in a User_Desc_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpUserDescRsp(detailed in Section 9.2.3.8).

Parent topic:ZPS_eAplZdpUserDescRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent

  • uDstAddr: Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpUserDescReq: Pointer to request (see above).

Parent topic:ZPS_eAplZdpUserDescRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpUserDescRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpMatchDescRequest

ZPS\_teStatus ZPS\_eAplZdpMatchDescRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpMatchDescReq *psZdpMatchDescReq);

Description

This function requests responses from network nodes with endpoints that match specified criteria in their Simple descriptors. More specifically, these criteria include: application profile, number of input clusters, number of output clusters, list of input clusters, and list of output clusters. The function sends out a Match_Desc_req command, as a broadcast to all network nodes. It might also be sent as a unicast to either a specific node of interest or to another node that may hold the required information in its primary discovery cache. The wildcard profile (0xFFFF) can be used to match any profile ID.

The request is represented by the structure below (further detailed in Section 9.2.2.10).

typedef struct {
    uint16 u16NwkAddrOfInterest;
    uint16 u16ProfileId;
    /* rest of message is variable length */
    uint8 u8NumInClusters;
    uint16* pu16InClusterList;
    uint8 u8NumOutClusters;
    uint16* pu16OutClusterList;
} ZPS_tsAplZdpMatchDescReq;

A node with matching endpoint criteria responds with a Match_Desc_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMatchDescRsp(detailed in Section9.2.3.9).

Parent topic:ZPS_eAplZdpMatchDescRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent

  • uDstAddr: Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpMatchDescReq: Pointer to request (see above).

Parent topic:ZPS_eAplZdpMatchDescRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMatchDescRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpActiveEpRequest

ZPS\_teStatus ZPS\_eAplZdpActiveEpRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpActiveEpReq *psZdpActiveEpReq);

Description

This function requests a list of the active endpoints on a remote node. The function sends an Active_EP_req request either to the relevant node or to another node that may hold the required information in its primary discovery cache.

The network address of the node of interest must be specified in the request, which is represented by the structure below (further detailed in Section 9.2.2.11).

typedef struct {

uint16 u16NwkAddrOfInterest;

} ZPS_tsAplZdpActiveEpReq;

The endpoint list is received in an Active_EP_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpActiveEpRsp(detailed in Section 9.2.3.10).

Parent topic:ZPS_eAplZdpActiveEpRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent

  • uDstAddr: Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpActiveEpReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpActiveEpRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpActiveEpRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpExtendedActiveEpRequest

ZPS_teStatus ZPS_eAplZdpExtendedActiveEpRequest(
    PDUM_thAPduInstance hAPduInst,
    ZPS_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS_tsAplZdpExtendedActiveEpReq
    *psZdpExtendedActiveEpReq);

Description

This function requests a list of the active endpoints on a remote node. The function should be called if the node has more active endpoints than could be included in a response to ZPS_eAplZdpActiveEpRequest(). The function sends an Extended_Active_EP_req request either to the relevant node or to another node that may hold the required information in its primary discovery cache.

The network address of the node of interest must be specified in the request, which is represented by the structure below (further detailed in Section 9.2.2.12).

typedef struct { uint16 u16NwkAddr;

uint8 u8StartIndex;

} ZPS_tsAplZdpExtendedActiveEpReq;

This structure allows you to specify the first endpoint of interest for the request.

The endpoint list is received in an Extended_Active_EP_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpExtendedActiveEpRsp(detailed in Section9.2.3.11).

Parent topic:ZPS_eAplZdpExtendedActiveEpRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpActiveEpReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpExtendedActiveEpRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpExtendedActiveEpRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpUserDescSetRequest

ZPS_teStatus ZPS_eAplZdpUserDescSetRequest(
    PDUM_thAPduInstance hAPduInst,
    ZPS_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS_tsAplZdpUserDescSet *psZdpUserDescSetReq);

Description

This function can be used to configure the User descriptor on a remote node. The function sends a User_Desc_set request either to the remote node or to another node that may hold the relevant User descriptor in its primary discovery cache.

Note: This function can only be used to access the User descriptor of a non-NXP device (which supports this descriptor), since the storage of a User descriptor on an NXP device is not supported.

The network address of the node of interest as well as the required modifications must be specified in the request, which is represented by the structure below (further detailed in Section 9.2.2.13).

typedef struct {

uint16 u16NwkAddrOfInterest; uint8 u8Length;

char szUserDescriptor[ZPS_ZDP_LENGTH_OF_USER_DESC];

} ZPS_tsAplZdpUserDescSet;

If the specified User descriptor was successfully modified, a User_Desc_conf response is received. This response should be collected by the application task using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpUserDescConf(detailed in Section 9.2.3.12).

Parent topic:ZPS_eAplZdpUserDescSetRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpUserDescSetReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpUserDescSetRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpUserDescSetRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpSystemServerDiscoveryRequest

ZPS\_teStatus ZPS\_eAplZdpSystemServerDiscoveryRequest\(
    PDUM\_thAPduInstance hAPduInst,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpSystemServerDiscoveryReq
                     *psZdpSystemServerDiscoveryReq);

Description

This function can be used to request information on the available servers hosted by remote nodes (Primary or Backup Trust Centre, Primary or Backup Binding Table Cache, Primary or Backup Discovery Cache, Network Manager). The function broadcasts a System_Server_Discovery_req request to all network nodes.

The required servers must be specified by means of a bitmask in the request, which is represented by the structure below (further detailed in Section 9.2.2.14).

typedef struct {

uint16 u16ServerMask;

} ZPS_tsAplZdpSystemServerDiscoveryReq;

A remote node replies with a System_Server_Discovery_rsp response, indicating which of the requested servers are implemented. This response should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpSystemServerDiscoveryRsp(detailed in Section 9.2.3.13).

Parent topic:ZPS_eAplZdpSystemServerDiscoveryRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • *pu8SeqNumber Pointer to sequence number of request

  • *psZdpSystemServerDiscoveryReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpSystemServerDiscoveryRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpSystemServerDiscoveryRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpDiscoveryCacheRequest

ZPS\_teStatus ZPS\_eAplZdpDiscoveryCacheRequest\(
    PDUM\_thAPduInstance hAPduInst,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpDiscoveryCacheReq
                    *psZdpDiscoveryCacheReq);

Description

This function is used to discover which nodes in the network have a primary discovery cache - that is, a bank of information about other nodes in the network. The function broadcasts a Discovery_Cache_req request to the network.

The request includes the network and IEEE addresses of the sending device, and is represented by the structure below (further detailed in Section 9.2.2.15).

typedef struct {

uint16 u16NwkAddr;

uint64 u64IeeeAddr;

} ZPS_tsAplZdpDiscoveryCacheReq;

A node with a primary discovery cache replies with a Discovery_Cache_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpDiscoveryCacheRsp(detailed in Section 9.2.3.14).

Parent topic:ZPS_eAplZdpDiscoveryCacheRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent.

  • *pu8SeqNumber: Pointer to sequence number of request.

  • *psZdpDiscoveryCacheReq: Pointer to request (see above).

Parent topic:ZPS_eAplZdpDiscoveryCacheRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpDiscoveryCacheRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpDiscoveryStoreRequest

ZPS\_teStatus ZPS\_eAplZdpDiscoveryStoreRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpDiscoveryStoreReq
                  *psZdpDiscoveryStoreReq);

Description

This function can be called on an End Device to request a remote node to reserve memory space to store the local node’s ‘discovery information’. To do this, the remote node must contain a primary discovery cache. The ‘discovery information’ includes the local node’s IEEE address, network address, Node descriptor, Power descriptor, Simple descriptor and number of active endpoints. The function sends a Discovery_store_req request to the remote node.

This request includes the network and IEEE addresses of the sending node as well as the amount of storage space (in bytes) needed to store the information. The request is represented by the structure below (further detailed in Section 9.2.2.16).

typedef struct {
        uint16 u16NwkAddr;
        uint64 u64IeeeAddr;
        uint8 u8NodeDescSize;
        uint8 u8PowerDescSize;
        uint8 u8ActiveEpSize;
        uint8 u8SimpleDescCount;
        /* Rest of message is variable length */
        uint8* pu8SimpleDescSizeList;
} ZPS_tsAplZdpDiscoveryStoreReq;

On receiving this request, the remote node first checks whether it has a primary discovery cache. If this is the case, it checks whether it has storage space in the cache for the new discovery information. If the space is available, it is reserved until the information is later uploaded from the local node.

The node replies with a Discovery_store_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpDiscoveryStoreRsp(detailed in Section 9.2.3.15).

Parent topic:ZPS_eAplZdpDiscoveryStoreRequest

Parameters

  • hAPduInst:**** Handle of APDU instance in which request is sent.

  • uDstAddr: Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpDiscoveryStoreReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpDiscoveryStoreRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpDiscoveryStoreRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpNodeDescStoreRequest

ZPS\_teStatus ZPS\_eAplZdpNodeDescStoreRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpNodeDescStoreReq
    *psZdpNodeDescStoreReq);

Description

This function can be called on an End Device to upload the local node’s Node descriptor for storage in the primary discovery cache on a remote node. The function sends a Node_Desc_store_req command to the remote node.

This request includes the network and IEEE addresses of the sending node as well as the Node descriptor to store. The request is represented by the structure below (further detailed in Section 9.2.2.17).

typedef struct { uint16 u16NwkAddr; uint64 u64IeeeAddr;

/* Rest of message is variable length */ ZPS_tsAplZdpNodeDescriptor sNodeDescriptor;

} ZPS_tsAplZdpNodeDescStoreReq;

On receiving the request, the remote node will first check whether it has a primary discovery cache. If this is the case, it will check whether it has previously reserved storage space in its cache for the local node. If it has, it will store the Node descriptor in its cache.

The node replies with a Node_Desc_store_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpNodeDescStoreRsp(detailed in Section 9.2.3.16).

Note: This function should only be called if storage space for the local node’s ‘discovery information’ has previously been reserved on the remote node following a call to ZPS_eAplZdpDiscoveryStoreRequest().

Parent topic:ZPS_eAplZdpNodeDescStoreRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent.

  • uDstAddr: Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpNodeDescStoreReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpNodeDescStoreRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpNodeDescStoreRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpPowerDescStoreRequest

ZPS\_teStatus ZPS\_eAplZdpPowerDescStoreRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpPowerDescStoreReq
    *psZdpPowerDescStoreReq);

Description

This function can be called on an End Device to upload the local node’s Power descriptor for storage in the primary discovery cache on a remote node. The function sends a Power_Desc_store_req request to the remote node.

This request includes the network and IEEE addresses of the sending node as well as the Power descriptor to store. The request is represented by the structure below (further detailed in Section 9.2.2.18).

typedef struct {
    uint16 u16NwkAddr;
    uint64 u64IeeeAddr;
    /* Rest of message is variable length */
    ZPS_tsAplZdpNodePowerDescriptor sPowerDescriptor;
} ZPS_tsAplZdpPowerDescStoreReq;

On receiving the request, the remote node first checks whether it has a primary discovery cache. If this is the case, it checks whether it has previously reserved storage space in its cache for the local node. If it has, it stores the Power descriptor in its cache.

The node replies with a Power_Desc_store_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpPowerDescStoreRsp(detailed in Section 9.2.3.17).

Note: This function should only be called if storage space for the local node’s ‘discovery information’ has previously been reserved on the remote node following a call to ZPS_eAplZdpDiscoveryStoreRequest().

Parent topic:ZPS_eAplZdpPowerDescStoreRequest

Parameters

  • hAPduInst:**** Handle of APDU instance in which request is sent.

  • uDstAddr: Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpPowerDescStoreReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpPowerDescStoreRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpPowerDescStoreRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpSimpleDescStoreRequest

ZPS\_teStatus ZPS\_eAplZdpSimpleDescStoreRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpSimpleDescStoreReq
                *psZdpSimpleDescStoreReq);

Description

This function can be called on an End Device to upload a Simple descriptor from the local node for storage in the primary discovery cache on the specified remote node. The Simple descriptor for each endpoint on the local node must be uploaded separately using this function. The function sends a Simple_Desc_store_req request to the remote node.

This request includes the network and IEEE addresses of the sending node as well as the Simple descriptor to store. The request is represented by the structure below (further detailed in Section 9.2.2.19).

typedef struct {
    uint16 u16NwkAddr;
    uint64 u64IeeeAddr;
    uint8 u8Length;
    /* Rest of message is variable length */
    ZPS_tsAplZdpSimpleDescType sSimpleDescriptor;
} ZPS_tsAplZdpSimpleDescStoreReq;

On receiving the request, the remote node first checks whether it has a primary discovery cache. If this is the case, it checks whether it has previously reserved storage space in its cache for the local node. If it has, it stores the Simple descriptor in its cache.

The node replies with a Simple_Desc_store_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpSimpleDescStoreRsp(detailed in Section 9.2.3.18).

Note: This function should only be called if storage space for the local node’s ‘discovery information’ has previously been reserved on the remote node following a call to ZPS_eAplZdpDiscoveryStoreRequest().

Parent topic:ZPS_eAplZdpSimpleDescStoreRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent.

  • uDstAddr: Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpSimpleDescStoreReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpSimpleDescStoreRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpSimpleDescStoreRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpActiveEpStoreRequest

ZPS\_teStatus ZPS\_eAplZdpActiveEpStoreRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpActiveEpStoreReq
                *psZdpActiveEpStoreReq);

Description

This function can be called on an End Device to upload a list of its active endpoints for storage in the primary discovery cache on a remote node. The function sends an Active_EP_store_req command to the remote node.

This request includes the network and IEEE addresses of the sending node as well as the list of active endpoints to store. The request is represented by the structure below (further detailed in Section 9.2.2.20).

typedef struct {
    uint16 u16NwkAddr;
    uint64 u64IeeeAddr;
    uint8 u8ActiveEPCount;
    /* Rest of message is variable length */
    uint8* pu8ActiveEpList;
} ZPS_tsAplZdpActiveEpStoreReq;

On receiving the request, the remote node first checks whether it has a primary discovery cache. If this is the case, it checks whether it has previously reserved storage space in its cache for the local node. If it has, it stores the list of active endpoints in its cache.

The node replies with an Active_EP_store_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpActiveEpStoreRsp(detailed in Section 9.2.3.19).

Note: This function should only be called if storage space for the local node’s ‘discovery information’ has previously been reserved on the remote node following a call to ZPS_eAplZdpDiscoveryStoreRequest().

Parent topic:ZPS_eAplZdpActiveEpStoreRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent.

  • uDstAddr: Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpActiveEpStoreReq: Pointer to request (see above).

Parent topic:ZPS_eAplZdpActiveEpStoreRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpActiveEpStoreRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpFindNodeCacheRequest

ZPS\_teStatus ZPS\_eAplZdpFindNodeCacheRequest\(
  PDUM\_thAPduInstance hAPduInst,
  uint8 *pu8SeqNumber,
  ZPS\_tsAplZdpFindNodeCacheReq
            *psZdpFindNodeCacheReq);

Description

This function can be used to search for nodes in the network that hold ‘discovery information’ about a particular node. The function broadcasts a Find_node_cache_reqrequest to the network.

This request includes the network and IEEE addresses of the node of interest. The request is represented by the structure below (further detailed in Section 8.2.2.21).

typedef struct {
    uint16 u16NwkAddr;
    uint64 u64IeeeAddr;
} ZPS_tsAplZdpFindNodeCacheReq;

On receiving the request, a remote node first checks whether it has a primary discovery cache, or is the specified node itself. If either is the case, it checks whether it holds the required information and, if this is the case, replies with a Find_node_cache_rspresponse. This response should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpFindNodeCacheRsp(detailed in Section 8.2.3.20).

Only nodes that hold the required information respond to the request.

Parent topic:ZPS_eAplZdpFindNodeCacheRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent.

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpFindNodeCacheReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpFindNodeCacheRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpFindNodeCacheRequest

Parent topic:Service Discovery functions

ZPS_eAplZdpRemoveNodeCacheRequest

ZPS\_teStatus ZPS\_eAplZdpRemoveNodeCacheRequest\(
    PDUM\_thAPduInstance hAPduInst,
    ZPS\_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS\_tsAplZdpRemoveNodeCacheReq
                    *psZdpRemoveNodeCacheReq);

Description

This function requests a Primary Discovery Cache node to remove from its cache all ‘discovery information’ relating to a particular End Device. The function sends a Remove_node_cache_req request to the Primary Discovery Cache node.

The effect of a successful request is to remove the relevant ‘discovery information’ and free the corresponding storage space in the cache previously reserved by ZPS_eAplZdpDiscoveryStoreRequest()\ (which may have been called from another node in the network).

This request includes the network and IEEE addresses of the End Device whose ‘discovery information’ is to be removed. The request is represented by the structure below (further detailed in Section 9.2.2.22).

typedef struct {
    uint16 u16NwkAddr;
    uint64 u64IeeeAddr;
} ZPS_tsAplZdpRemoveNodeCacheReq;

On receiving the request, the remote node first checks whether it has a primary discovery cache. If this is the case, it checks whether it has previously received and implemented a Discovery_store_reqrequest for the specified End Device, resulting from a call to ZPS_eAplZdpDiscoveryStoreRequest(). If it has, it deletes the relevant data and unreserve the corresponding part of the cache.

The node replies with a Remove_node_cache_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpRemoveNodeCacheRsp(detailed in Section 9.2.3.21).

Parent topic:ZPS_eAplZdpRemoveNodeCacheRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent.

  • uDstAddr: Address of destination node of request(can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr: Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpRemoveNodeCacheReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpRemoveNodeCacheRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpRemoveNodeCacheRequest

Parent topic:Service Discovery functions

Parent topic:ZDP API functions

Binding functions

The ZDP Binding functions are concerned with binding nodes together, to aid communication between them, and managing binding tables.

  1. ZPS_eAplZdpEndDeviceBindRequest

  2. ZPS_eAplZdpBindUnbindRequest

  3. ZPS_eAplZdpBindRegisterRequest

  4. ZPS_eAplZdpReplaceDeviceRequest

  5. ZPS_eAplZdpStoreBkupBindEntryRequest

  6. ZPS_eAplZdpRemoveBkupBindEntryRequest

  7. ZPS_eAplZdpBackupBindTableRequest

  8. ZPS_eAplZdpRecoverBindTableRequest

  9. ZPS_eAplZdpBackupSourceBindRequest

  10. ZPS_eAplZdpRecoverSourceBindRequest

  11. ZPS_eAplAibRemoveBindTableEntryForMacAddress

Note:

  1. Some of the above binding functions cannot be used to send requests to nodes that run the NXP ZigBee PRO stack. They are supplied in the NXP ZDP API in order to facilitate interoperability with nodes based on non-NXP software, which supports the corresponding requests. If applicable, this restriction is noted in the function description.

  2. Further binding functions are provided in the ZDO API and are described in Section 7.1.1, “Network Deployment Functions”.

ZPS_eAplZdpEndDeviceBindRequest

ZPS\_teStatus ZPS\_eAplZdpEndDeviceBindRequest\(
        PDUM\_thAPduInstance hAPduInst,
        uint8 *pu8SeqNumber,
        ZPS\_tsAplZdpEndDeviceBindReq
                    *psZdpEndDeviceBindReq);

Description

This function sends a binding request to the Coordinator in order to bind an endpoint on the local node to an endpoint on a remote node (these nodes can be End Devices or Routers). The function should normally be invoked as the result of a user action on the local node, such as pressing a button. The function sends an End_Device_Bind_req request to the Coordinator.

This request includes details of the source node, endpoint and clusters. The request is represented by the structure below (further detailed in Section 9.2.2.23).

typedef struct {
  uint16 u16BindingTarget;
  uint64 u64SrcIeeeAddress;
  uint8 u8SrcEndpoint;
  uint16 u16ProfileId;
  /* Rest of message is variable length */
  uint8 u8NumInClusters;
  uint16 *pu16InClusterList;
  uint8 u8NumOutClusters;
  uint16 *pu16OutClusterList;
} ZPS_tsAplZdpEndDeviceBindReq;

On receiving the request, the Coordinator waits (for a pre-defined timeout period) for another binding request, from a different node, so that it can pair the requests and bind the endpoints. In order to bind the endpoints, their application profile IDs must match, and they must have compatible clusters in their input and output cluster lists.

The Coordinator replies to a binding request with an End_Device_Bind_rsp response, which should be collected on the requesting node using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpEndDeviceBindRsp(detailed in Section 9.2.3.22).

The stack will automatically update the Binding tables on the two End Devices (following further bind requests from the Coordinator) and an ZPS_EVENT_ZDO_BIND event will be generated on the End Devices to signal these updates.

Description

This function sends a binding request to the Coordinator in order to bind an endpoint on the local node to an endpoint on a remote node (these nodes can be End Devices or Routers). The function should normally be invoked as the result of a user action on the local node, such as pressing a button. The function sends an End_Device_Bind_req request to the Coordinator.

This request includes details of the source node, endpoint and clusters. The request is represented by the structure below (further detailed in Section 9.2.2.23).

typedef struct {
  uint16 u16BindingTarget;
  uint64 u64SrcIeeeAddress;
  uint8 u8SrcEndpoint;
  uint16 u16ProfileId;
  /* Rest of message is variable length */
  uint8 u8NumInClusters;
  uint16 *pu16InClusterList;
  uint8 u8NumOutClusters;
  uint16 *pu16OutClusterList;
} ZPS_tsAplZdpEndDeviceBindReq;

On receiving the request, the Coordinator waits (for a pre-defined timeout period) for another binding request, from a different node, so that it can pair the requests and bind the endpoints. In order to bind the endpoints, their application profile IDs must match, and they must have compatible clusters in their input and output cluster lists.

The Coordinator replies to a binding request with an End_Device_Bind_rsp response, which should be collected on the requesting node using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpEndDeviceBindRsp(detailed in Section 9.2.3.22).

The stack automatically updates the Binding tables on the two End Devices (following further bind requests from the Coordinator) and an ZPS_EVENT_ZDO_BIND event is generated on the End Devices to signal these updates.

Parent topic:ZPS_eAplZdpEndDeviceBindRequest

Parameters

  • hAPduInst: Handle of APDU instance in which request is sent.

  • *pu8SeqNumber: Pointer to sequence number of request

  • *psZdpEndDeviceBindReq: Pointer to request (see above)

Parent topic:ZPS_eAplZdpEndDeviceBindRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpEndDeviceBindRequest

Parent topic:Binding functions

ZPS_eAplZdpBindUnbindRequest

ZPS\_teStatus ZPS\_eAplZdpBindUnbindRequest\(
            PDUM\_thAPduInstance hAPduInst,
            ZPS\_tuAddress uDstAddr,
            bool bExtAddr,
            uint8 *pu8SeqNumber,
            bool bBindReq,
            ZPS\_tsAplZdpBindUnbindReq *psZdpBindReq);

Description

This function sends a binding or unbinding request (as specified) to a remote node which hosts a binding table. The function requests a modification of the binding table in order to bind or unbind two endpoints of nodes in the network. The nodes to be bound/unbound may be different from the node sending the request and the node receiving the request. The latter must be either a node with a primary binding table cache or the source node for the binding. This function could typically be used in a commissioning application to configure bindings between nodes during system set- up.

The function sends a Bind_req or Unbind_req request to the remote node which hosts the binding table to be modified. This request includes details of the source node and endpoint, and the target node and endpoint for the binding. The request is represented by the structure below (further detailed in Section 9.2.2.24).

typedef struct {
        uint64 u64SrcAddress;
        uint8 u8SrcEndpoint;
        uint16 u16ClusterId;
        uint8 u8DstAddrMode;
        union {
            struct {
                uint16 u16DstAddress;
            } sShort;
            struct {
                uint64 u64DstAddress;
                uint8 u8DstEndPoint;
            } sExtended;
    } uAddressField;
} ZPS_tsAplZdpBindUnbindReq;

On receiving the request, the remote node adds or removes the relevant entry in its binding table and locally generates the event ZPS_EVENT_ZDO_BIND or ZPS_EVENT_ZDO_UNBIND, as appropriate, to signal the relevant update.

If the remote node holds a primary binding table cache, it checks whether the source node for the binding holds a table of its own source bindings (see the description of ZPS_eAplZdpBindRegisterRequest()). If it is so, it automatically requests an update of this table. A node with a primary binding table cache also requests an update of the back-up cache, if one exists.

The remote node replies with a Bind_rsp or Unbind_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpBindRsp(detailed in Section 9.2.3.23) or ZPS_tsAplZdpUnbindRsp(detailed in Section 9.2.3.24).

Parent topic:ZPS_eAplZdpBindUnbindRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • bBindReq Bind or unbind request:

    • TRUE: bind

    • FALSE: unbind

  • * psZdpBindReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpBindUnbindRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpBindUnbindRequest

Parent topic:Binding functions

ZPS_eAplZdpBindRegisterRequest

ZPS_teStatus ZPS_eAplZdpBindRegisterRequest(
     PDUM_thAPduInstance hAPduInst,
     ZPS_tuAddress uDstAddr,
     bool bExtAddr,
     uint8 *pu8SeqNumber,
     ZPS_tsAplZdpBindRegisterReq *psZdpBindRegisterReq);

Description

This function informs a remote node with a primary binding table cache that the local node will hold its own binding table entries (and therefore the remote node does not need to hold these entries). The function sends a Bind_Register_req request to the remote node.

The IEEE address of the local node must be specified in the request, which is represented by the structure below (further detailed in Section 8.2.2.25).

typedef struct {

uint64 u64NodeAddress;

} ZPS_tsAplZdpBindRegisterReq;

The remote node replies with a Bind_Register_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpBindRegisterRsp(detailed in Section 9.2.3.25). This response contains any information stored about the binding on the remote.

Parent topic:ZPS_eAplZdpBindRegisterRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpPowerDescReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpBindRegisterRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpBindRegisterRequest

Parent topic:Binding functions

ZPS_eAplZdpReplaceDeviceRequest

ZPS_teStatus ZPS_eAplZdpReplaceDeviceRequest(
            PDUM_thAPduInstance hAPduInst,
            ZPS_tuAddress uDstAddr,
            bool bExtAddr,
            uint8 *pu8SeqNumber,
    ZPS_tsAplZdpReplaceDeviceReq *psZdpReplaceDeviceReq);

Description

This function requests a remote node with a primary binding table cache to modify binding table entries with new data - more specifically, binding table entries can be modified by replacing an IEEE address and/or associated endpoint number. This function could typically be used in a commissioning application to modify bindings between nodes. The function sends a Replace_Device_req request to the remote node.

This request must include the old IEEE address and its replacement, as well as the corresponding endpoint number and its replacement (if any). The request is represented by the structure below (further detailed in Section 9.2.2.26).

typedef struct {

uint64 u64OldAddress;

uint8 u8OldEndPoint;

uint64 u64NewAddress;

uint8 u8NewEndPoint;

} ZPS_tsAplZdpReplaceDeviceReq;

On receiving this request, the remote node will search its binding table for entries containing the old IEEE address and old endpoint number from the request - this pair of values may make up the source or destination data of the binding table entry.

These values will be replaced by the new IEEE address and endpoint number from the request. Note that if the endpoint number in the request is zero, only the address will be included in the ‘search and replace’ (the endpoint number in the modified binding table entries will be left unchanged).

The remote node will check whether a node affected by a binding table change holds a table of its own source bindings (see ZPS_eAplZdpBindRegisterRequest()) and, if so, automatically requests an update of this table. The remote node will also request an update of the back-up of the primary binding table cache, if one exists.

The remote node will reply with a Replace_Device_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpReplaceDeviceRsp(detailed in Section 9.2.3.26).

Parent topic:ZPS_eAplZdpReplaceDeviceRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpReplaceDeviceReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpReplaceDeviceRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpReplaceDeviceRequest

Parent topic:Binding functions

ZPS_eAplZdpStoreBkupBindEntryRequest

ZPS_teStatus ZPS_eAplZdpStoreBkupBindEntryRequest(
            PDUM_thAPdu hAPdu,
            ZPS_tuAddress uDstAddr,
            bool bExtAddr,
            uint8 *pu8SeqNumber,
            uint16 u16ProfileId,
            ZPS_tsAplZdpStoreBkupBindEntryReq
                      *psZdpStoreBkupBindEntryReq);

Description

This function requests that a back-up of an entry in the local primary binding table cache is performed on a remote node. The destination node of the request must hold the corresponding back-up binding table cache. The back-up operation is normally required when a new entry has been added to the primary binding table cache.

Note: This function is provided in the NXP ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

This request must include the binding table entry to be backed up. The request is represented by the structure below (further detailed in Section 9.2.2.27).

typedef struct {
        uint64 u64SrcAddress;
        uint8 u8SrcEndPoint;
        uint16 u16ClusterId;
        uint8 u8DstAddrMode;
        union {
           struct {
                uint16 u16DstAddress;
                  } sShort;
        struct {
        uint64 u64DstAddress;
        uint8 u8DstEndPoint;
        } sExtended;
      };
} ZPS_tsAplZdpStoreBkupBindEntryReq;

On receiving the request, the remote node adds the specified binding table entry to its back-up binding table cache, if possible.

The remote node replies with a Store_Bkup_Bind_Entry_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpStoreBkupBindEntryRsp(detailed in Section 9.2.3.27).

Parent topic:ZPS_eAplZdpStoreBkupBindEntryRequest

Parameters

  • hAPdu Handle of APDU in which request is sent.

  • uDstAddr Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • u16ProfileId Application profile ID

  • * psZdpStoreBkupBindEntryReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpStoreBkupBindEntryRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpStoreBkupBindEntryRequest

Parent topic:Binding functions

ZPS_eAplZdpRemoveBkupBindEntryRequest

ZPS_teStatus ZPS_eAplZdpRemoveBkupBindEntryRequest(
    PDUM_thAPduInstance hAPduInst,
    ZPS_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS_tsAplZdpRemoveBkupBindEntryReq
            *psZdpRemoveBkupBindEntryReq);

Description

This function requests the removal of an entry in the back-up binding table cache on a remote node. The function must be called from the node with the corresponding primary binding table cache. The removal of a back-up entry is normally required when an entry in the primary binding table cache has been removed.

Note: This function is provided in the NXP ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

This request must include the binding table entry to be removed. The request is represented by the structure below (further detailed in Section 9.2.2.28).

typedef struct {

uint64 u64SrcAddress; uint8 u8SrcEndPoint; uint16 u16ClusterId; uint8 u8DstAddrMode; union {

struct {

uint16 u16DstAddress;

} sShort; struct {

uint64 u64DstAddress; uint8 u8DstEndPoint;

} sExtended;

};

} ZPS_tsAplZdpRemoveBkupBindEntryReq;

On receiving the request, the remote node removes the specified binding table entry from its back-up binding table cache, if possible.

The remote node replies with a Remove_Bkup_Bind_Entry_rsp response, which should be collected using the function **ZQ_bZQueueReceive()**and stored in a structure of type ZPS_tsAplZdpRemoveBkupBindEntryRsp(detailed in Section9.2.3.28).

Parent topic:ZPS_eAplZdpRemoveBkupBindEntryRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpRemoveBkupBindEntryReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpRemoveBkupBindEntryRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpRemoveBkupBindEntryRequest

Parent topic:Binding functions

ZPS_eAplZdpBackupBindTableRequest

ZPS_teStatus ZPS_eAplZdpBackupBindTableRequest(
  PDUM_thAPduInstance hAPduInst,
  ZPS_tuAddress uDstAddr,
  bool bExtAddr,
  uint8 *pu8SeqNumber,
  ZPS_tsAplZdpBackupBindTableReq
                     *psZdpBackupBindTableReq);

Description

This function requests that a back-up of the locally held primary binding table cache is performed on a remote node - the whole or part of the table can be backed up. The destination node of the request must hold the corresponding back-up binding table cache. The latter must already exist and be associated with the cache on the local node through a previous discovery.

Note: This function is provided in the NXP ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

This request must include the binding table entries to be backed up. The request is represented by the structure below (further detailed in Section 9.2.2.29).

typedef struct {

uint16 u16BindingTableEntries; uint16 u16StartIndex;

uint16 u16BindingTableListCount;

/* Rest of message is variable length */ ZPS_tsAplZdpBindingTable sBindingTable;

} ZPS_tsAplZdpBackupBindTableReq;

On receiving the request, the remote node saves the new binding table, if possible, overwriting existing entries. If the new table is longer than the previous one, as many extra entries as possible will be saved.

The remote node replies with a Backup_Bind_Table_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpBackupBindTableRsp(detailed in Section 9.2.3.29).

Parent topic:ZPS_eAplZdpBackupBindTableRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpBackupBindTableReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpBackupBindTableRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpBackupBindTableRequest

Parent topic:Binding functions

ZPS_eAplZdpRecoverBindTableRequest

ZPS_teStatus ZPS_eAplZdpRecoverBindTableRequest(
    PDUM_thAPduInstance hAPduInst,
    ZPS_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS_tsAplZdpRecoverBindTableReq
                    *psZdpRecoverBindTableReq);

Description

This function requests that a back-up of the locally held primary binding table cache is recovered from a remote node. The destination node of the request must hold the back-up binding table cache which is associated with the primary cache on the local node.

Note: This function is provided in the NXP ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

This request must indicate the starting index in the binding table for the recovery. The request is represented by the structure below (further detailed in Section 9.2.2.30).

typedef struct {

uint16 u16StartIndex;

} ZPS_tsAplZdpRecoverBindTableReq;

The remote node replies with a Recover_Bind_Table_rsp response containing the required binding table entries, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpRecoverBindTableRsp(detailed in Section 9.2.3.30). As many binding entries as possible are included in this response. If the returned binding table is incomplete, this is indicated in the response and this function must be called again, with the appropriate starting index, to recover the rest of the table.

Parent topic:ZPS_eAplZdpRecoverBindTableRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpRecoverBindTableReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpRecoverBindTableRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpRecoverBindTableRequest

Parent topic:Binding functions

ZPS_eAplZdpBackupSourceBindRequest

ZPS_teStatus ZPS_eAplZdpBackupSourceBindRequest(
 PDUM_thAPduInstance hAPduInst,
 ZPS_tuAddress uDstAddr,
 bool bExtAddr,
 uint8 *pu8SeqNumber,
 ZPS_tsAplZdpBackupSourceBindReq
                 *psZdpBackupSourceBindReq);

Description

This function requests that a back-up of the locally held source binding table is performed on a remote node. This source binding table contains entries only relevant to the local node. The function must be called from a node with a primary binding table cache and the destination node of the request must hold the corresponding back-up binding table cache.

Note: This function is provided in the NXP ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

This request must include the source binding table entries to be backed up. The request is represented by the structure below (further detailed in Section 9.2.2.31).

typedef struct {

uint16 u16SourceTableEntries; uint16 u16StartIndex;

uint16 u16SourceTableListCount;

/* Rest of message is variable length */ uint64* pu64SourceAddress;

} ZPS_tsAplZdpBackupSourceBindReq;

On receiving the request, the remote node saves the new source binding table, if possible, overwriting existing entries. If the new table is longer than the previous one, as many extra entries as possible will be saved.

The remote node replies with a Backup_Source_Bind_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpBackupSourceBindRsp(detailed in Section 9.2.3.31).

Parent topic:ZPS_eAplZdpBackupSourceBindRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpBackupSourceBindReqPointer to request (see above)

Parent topic:ZPS_eAplZdpBackupSourceBindRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpBackupSourceBindRequest

Parent topic:Binding functions

ZPS_eAplZdpRecoverSourceBindRequest

ZPS_teStatus ZPS_eAplZdpBackupSourceBindRequest(
    PDUM_thAPduInstance hAPduInst,
    ZPS_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS_tsAplZdpBackupSourceBindReq
                    *psZdpBackupSourceBindReq);

Description

This function requests that a back-up of the locally held source binding table is recovered from a remote node. The function must be called from a node with a primary binding table cache and the destination node of the request must hold the corresponding back-up binding table cache.

Note: This function is provided in the NXP ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

This request must indicate the starting index in the binding table for the recovery. The request is represented by the structure below (further detailed in Section 9.2.2.32).

typedef struct {

uint16 u16StartIndex;

} ZPS_tsAplZdpRecoverSourceBindReq;

The remote node replies with a Recover_Source_Bind_rsp response containing the required binding table entries, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpRecoverSourceBindRsp(detailed in Section 9.2.3.32). As many binding entries as possible are included in this response. If the returned binding table is incomplete, this is indicated in the response and this function must be called again, with the appropriate starting index, to recover the rest of the table.

Parent topic:ZPS_eAplZdpRecoverSourceBindRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpRecoverSourceBindReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpRecoverSourceBindRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpRecoverSourceBindRequest

Parent topic:Binding functions

ZPS_eAplAibRemoveBindTableEntryForMacAddress

ZPS_teStatus
    ZPS_eAplAibRemoveBindTableEntryForMacAddress(
                            uint64 u64MacAddress);

Description

This function requests the removal of the entry corresponding to the specified IEEE/ MAC address from the local binding table.

Parent topic:ZPS_eAplAibRemoveBindTableEntryForMacAddress

Parameters

u64MacAddress IEEE/MAC address contained in the binding table entry to be removed

Parent topic:ZPS_eAplAibRemoveBindTableEntryForMacAddress

Returns

ZPS_E_SUCCESS

Parent topic:ZPS_eAplAibRemoveBindTableEntryForMacAddress

Parent topic:Binding functions

Parent topic:ZDP API functions

Network Management Services functions

The ZDP Network Management Services functions are concerned with requests for network operations to be implemented remotely.

The functions are listed below.

  1. ZPS_eAplZdpMgmtNwkDiscRequest

  2. ZPS_eAplZdpMgmtLqiRequest

  3. ZPS_eAplZdpMgmtRtgRequest

  4. ZPS_eAplZdpMgmtBindRequest

  5. ZPS_eAplZdpMgmtLeaveRequest

  6. ZPS_eAplZdpMgmtDirectJoinRequest

  7. ZPS_eAplZdpMgmtPermitJoiningRequest

  8. ZPS_eAplZdpMgmtCacheRequest

  9. ZPS_eAplZdpMgmtNwkUpdateRequest

  10. ZPS_eAplZdpParentAnnceReq

Note: Some of these functions cannot be used to send requests to nodes that run the NXP ZigBee PRO stack. They are supplied in the ZDP API in order to facilitate interoperability with nodes based on non-NXP software which supports the corresponding requests.

ZPS_eAplZdpMgmtNwkDiscRequest

ZPS_teStatus ZPS_eAplZdpMgmtNwkDiscRequest(
            PDUM_thAPduInstance hAPduInst,
            ZPS_tuAddress uDstAddr,
            bool bExtAddr,
            uint8 *pu8SeqNumber,
            ZPS_tsAplZdpMgmtNwkDiscReq
                        *psZdpMgmtNwkDiscReq);

Description

This function requests a remote node to perform a channel scan in order to discover any other wireless networks that are operating in the neighborhood.

Note: This function is provided in the ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

This request must specify the requirements for the scan: channels to scan, duration of scan, starting channel. The request is represented by the structure below (further detailed in Section 8.2.2.33).

typedef struct {

uint32 u32ScanChannels;

uint8 u8ScanDuration;

uint8 u8StartIndex;

} ZPS_tsAplZdpMgmtNwkDiscReq;

The remote node replies with a Mgmt_NWK_Disc_rsp response containing the scan results, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMgmtNwkDiscRsp(detailed in Section 8.2.3.33).

Parent topic:ZPS_eAplZdpMgmtNwkDiscRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpMgmtNwkDiscReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpMgmtNwkDiscRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMgmtNwkDiscRequest

Parent topic:Network Management Services functions

ZPS_eAplZdpMgmtLqiRequest

ZPS_teStatus ZPS_eAplZdpMgmtLqiRequest(
            PDUM_thAPduInstance hAPduInst,
            ZPS_tuAddress uDstAddr,
            bool bExtAddr,
            uint8 *pu8SeqNumber,
            ZPS_tsAplZdpMgmtLqiReq *psZdpMgmtLqiReq);

Description

This function requests a remote node to provide a list of neighboring nodes, from its Neighbor table, including LQI (link quality) values for radio transmissions from each of these nodes. The destination node of this request must be a Router or the Co- ordinator.

This request must specify the index of the first node in the Neighbor table to report. The request is represented by the structure below (further detailed in Section 8.2.2.34).

typedef struct {

uint8 u8StartIndex;

} ZPS_tsAplZdpMgmtLqiReq;

The remote node replies with a Mgmt_Lqi_rsp response containing the required information, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMgmtLqiRsp(detailed in Section 8.2.3.34).

Parent topic:ZPS_eAplZdpMgmtLqiRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpMgmtLqiReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpMgmtLqiRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMgmtLqiRequest

Parent topic:Network Management Services functions

ZPS_eAplZdpMgmtRtgRequest

ZPS_teStatus ZPS_eAplZdpMgmtRtgRequest(
        PDUM_thAPduInstance hAPduInst,
        ZPS_tuAddress uDstAddr,
        bool bExtAddr,
        uint8 *pu8SeqNumber,
        ZPS_tsAplZdpMgmtRtgReq *psZdpMgmtRtgReq);

Description

This function requests a remote node to provide the contents of its Routing table. The destination node of this request must be a Router or the Coordinator.

This request must specify the index of the first entry in the Routing table to report. The request is represented by the structure below (further detailed in Section 8.2.2.35).

typedef struct {

uint8 u8StartIndex;

} ZPS_tsAplZdpMgmtRtgReq;

The remote node replies with a Mgmt_Rtg_rsp response containing the required information, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMgmtRtgRsp(detailed in Section 8.2.3.35).

Parent topic:ZPS_eAplZdpMgmtRtgRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpMgmtRtgReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpMgmtRtgRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMgmtRtgRequest

Parent topic:ZPS_eAplZdpMgmtBindRequest

Parent topic:Network Management Services functions

ZPS_eAplZdpMgmtBindRequest

ZPS_teStatus ZPS_eAplZdpMgmtBindRequest(
        PDUM_thAPduInstance hAPduInst,
        ZPS_tuAddress uDstAddr,
        bool bExtAddr,
        uint8 *pu8SeqNumber,
        ZPS_tsAplZdpMgmtBindReq *psZdpMgmtBindReq);

Description

This function requests a remote node to provide the contents of its Binding table. The destination node of this request must be a Router or the Coordinator.

This request must specify the index of the first entry in the Binding table to report. The request is represented by the structure below (further detailed in Section8.2.2.36).

typedef struct {

uint8 u8StartIndex;

} ZPS_tsAplZdpMgmtBindReq;

The remote node replies with a Mgmt_Bind_rsp response containing the required information, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMgmtBindRsp(detailed in Section8.2.3.36).

Parent topic:ZPS_eAplZdpMgmtBindRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpMgmtBindReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpMgmtBindRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMgmtRtgRequest

Parent topic:ZPS_eAplZdpMgmtBindRequest

Parent topic:Network Management Services functions

ZPS_eAplZdpMgmtLeaveRequest

ZPS_teStatus ZPS_eAplZdpMgmtLeaveRequest(
            PDUM_thAPduInstance hAPduInst,
            ZPS_tuAddress uDstAddr,
            bool bExtAddr,
            uint8 *pu8SeqNumber,
            ZPS_tsAplZdpMgmtLeaveReq *psZdpMgmtLeaveReq);

Description

This function requests a remote node to leave the network. The request also indicates whether the children of the leaving node should also be requested to leave and whether the leaving node(s) should subsequently attempt to rejoin the network.

Note: This function is provided in the ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

The IEEE address of the node to leave the network must be included in the request, as well as flags indicating the children and rejoin choices (see above). The request is represented by the structure below (further detailed in Section 8.2.2.37).

typedef struct {

uint64 u64DeviceAddress;

uint8 u8Flags;

} ZPS_tsAplZdpMgmtLeaveReq;

The remote node replies with a Mgmt_Leave_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMgmtLeaveRsp(detailed in Section 8.2.3.37).

Parent topic:ZPS_eAplZdpMgmtLeaveRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpMgmtLeaveReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpMgmtLeaveRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMgmtLeaveRequest

Parent topic:ZPS_eAplZdpMgmtDirectJoinRequest

Parent topic:ZPS_eAplZdpMgmtPermitJoiningRequest

Parent topic:ZPS_eAplZdpMgmtCacheRequest

Parent topic:Network Management Services functions

ZPS_eAplZdpMgmtDirectJoinRequest

ZPS_teStatus ZPS_eAplZdpMgmtDirectJoinRequest(
            PDUM_thAPduInstance hAPduInst,
            ZPS_tuAddress uDstAddr,
            bool bExtAddr,
            uint8 *pu8SeqNumber,
            ZPS_tsAplZdpMgmtDirectJoinReq
            *psZdpMgmtDirectJoinReq);

Description

This function requests a remote node to allow a particular device (identified through its IEEE address) to join the network as a child of the node. Thus, joining should be enabled on the remote node just for the nominated device. The destination node of this request must be a Router or the Coordinator.

Note: This function is provided in the ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

The IEEE address of the nominated device as well as its capabilities must be included in the request. The request is represented by the structure below (further detailed in Section 8.2.2.38).

typedef struct {

uint64 u64DeviceAddress; uint8 u8Capability;

} ZPS_tsAplZdpMgmtDirectJoinReq;

The remote node replies with a Mgmt_Direct_Join_req response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMgmtDirectJoinRsp(detailed in Section 8.2.3.38).

Parent topic:ZPS_eAplZdpMgmtDirectJoinRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpMgmtDirectJoinReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpMgmtDirectJoinRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMgmtLeaveRequest

Parent topic:ZPS_eAplZdpMgmtDirectJoinRequest

Parent topic:ZPS_eAplZdpMgmtPermitJoiningRequest

Parent topic:ZPS_eAplZdpMgmtCacheRequest

Parent topic:Network Management Services functions

ZPS_eAplZdpMgmtPermitJoiningRequest

ZPS_teStatus ZPS_eAplZdpMgmtPermitJoiningRequest(
            PDUM_thAPduInstance hAPduInst,
            ZPS_tuAddress uDstAddr,
            bool bExtAddr,
            uint8 *pu8SeqNumber,
            ZPS_tsAplZdpMgmtPermitJoiningReq
            *psZdpMgmtPermitJoiningReq);

Description

This function requests a remote node to enable or disable joining for a specified amount of time. The destination node of this request must be a Router or the Co- ordinator. The request can be unicast to a particular node or broadcast to all routing nodes (for which the destination address must be set to the 16-bit network address 0xFFFC).

Note: This function is provided in the ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

The duration of the enable or disable joining state must be specified in the request. The request is represented by the structure below (further detailed in Section8.2.2.39).

typedef struct {

uint8 u8PermitDuration; bool_t bTcSignificance;

} ZPS_tsAplZdpMgmtPermitJoiningReq;

If the request was unicast, the remote node replies with a Mgmt_Permit_Joining_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMgmtPermitJoiningRsp(detailed in Section 8.2.3.39).

Parent topic:ZPS_eAplZdpMgmtPermitJoiningRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpMgmtPermitJoiningReqPointer to request (see above)

Parent topic:ZPS_eAplZdpMgmtPermitJoiningRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMgmtLeaveRequest

Parent topic:ZPS_eAplZdpMgmtDirectJoinRequest

Parent topic:ZPS_eAplZdpMgmtPermitJoiningRequest

Parent topic:ZPS_eAplZdpMgmtCacheRequest

Parent topic:Network Management Services functions

ZPS_eAplZdpMgmtCacheRequest

ZPS_teStatus ZPS_eAplZdpMgmtCacheRequest(
    PDUM_thAPduInstance hAPduInst,
    ZPS_tuAddress uDstAddr,
    bool bExtAddr,
    uint8 *pu8SeqNumber,
    ZPS_tsAplZdpMgmtCacheReq *psZdpMgmtCacheReq);

Description

This function requests a remote node to provide a list of the End Devices registered in its primary discovery cache. Therefore, the destination node must contain a primary discovery cache.

Note: This function is provided in the ZDP API for the reason of interoperability with nodes running non-NXP ZigBee PRO stacks that support the generated request. On receiving a request from this function, the NXP ZigBee PRO stack will return the status ZPS_ZDP_NOT_SUPPORTED.

The request is represented by the structure below (further detailed in Section9.2.2.40).

typedef struct {

uint8 u8StartIndex;

} ZPS_tsAplZdpMgmtCacheReq;

The remote node replies with a Mgmt_Cache_rsp response, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMgmtCacheRsp(detailed in Section 9.2.3.40).

Parent topic:ZPS_eAplZdpMgmtCacheRequest

Parameters

  • hAPduInst Handle of APDU in which request is sent.

  • uDstAddr Address of destination node of request

  • (can be 16- or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpMgmtCacheReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpMgmtCacheRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMgmtLeaveRequest

Parent topic:ZPS_eAplZdpMgmtDirectJoinRequest

Parent topic:ZPS_eAplZdpMgmtPermitJoiningRequest

Parent topic:ZPS_eAplZdpMgmtCacheRequest

Parent topic:Network Management Services functions

ZPS_eAplZdpMgmtNwkUpdateRequest

ZPS_teStatus ZPS_eAplZdpMgmtNwkUpdateRequest(
        PDUM_thAPduInstance hAPduInst,
        ZPS_tuAddress uDstAddr,
        bool bExtAddr,
        uint8 *pu8SeqNumber,
        ZPS_tsAplZdpMgmtNwkUpdateReq
                        *psZdpMgmtNwkUpdateReq);

Description

This function requests an update of network parameters related to radio communication. The request can specify any of the following:

  • update the radio channel mask (for scans) and the 16-bit network address of the network manager (node nominated to manage radio-band operation of network)

  • change the radio channel used

  • scan radio channels and report the results

The request can be broadcast or unicast to nodes with radio receivers that are configured to remain on during idle periods.

The request is represented by the structure below (further detailed in Section9.2.2.41).

typedef struct {

uint32 u32ScanChannels;

uint8 u8ScanDuration;

uint8 u8ScanCount;

uint8 u8NwkUpdateId;

uint16 u16NwkManagerAddr;

} ZPS_tsAplZdpMgmtNwkUpdateReq;

The specific action to be taken as a result of this request is indicated through the element u8ScanDuration, as described in the table below.

**u8ScanDuration**

Action

0x00-0x05

Perform radio channel scan on the set of channels specified through u32ScanChannels. The time, in seconds, spent scanning each channel is determined by the value of u8ScanDurationand the number of scans is equal to the value of u8ScanCount. Valid for unicasts only.

0x06-0xFD

Reserved

0xFE

Change radio channel to single channel specified through u32ScanChannelsand set the network man- ager address to that specified through u16NwkManag- erAddr. Valid for broadcasts only.

0xFF

Update the stored radio channel mask with that specified through u32ScanChannels(but do not scan).
Valid for broadcasts only.

The remote node replies with a Mgmt_NWK_Update_notify notification, which should be collected using the function ZQ_bZQueueReceive() and stored in a structure of type ZPS_tsAplZdpMgmtNwkUpdateNotify(detailed in Section 9.2.3.41).

Parent topic:ZPS_eAplZdpMgmtNwkUpdateRequest

Parameters

  • hAPduInst Handle of APDU instance in which request is sent.

  • uDstAddr Address of destination node of request (can be 16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address:

    • TRUE: 64-bit IEEE (MAC) address

    • FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of request

  • * psZdpMgmtNwkUpdateReq Pointer to request (see above)

Parent topic:ZPS_eAplZdpMgmtNwkUpdateRequest

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpMgmtNwkUpdateRequest

Parent topic:Network Management Services functions

ZPS_eAplZdpParentAnnceReq

ZPS_teStatus ZPS_eAplZdpParentAnnceReq(
        PDUM_thAPduInstance hAPduInst,
        ZPS_tuAddress uDstAddr,
        bool bExtAddr,
        uint8 *pu8SeqNumber,
        ZPS_tsAplZdpParentAnnceReq *psZdpParentAnnceReq);

Description

This function is used on a Router or the Coordinator to send a Parent Announcement message to one or more other nodes. In this announcement, the originating node declares which nodes it has as children. These child nodes are specified using their IEEE/MAC addresses.

The message contains the above data in following structure (further detailed in Section 8.2.2.42):

typedef struct {

uint8 u8NumberOfChildren;

uint64* pu64ChildList;

} ZPS_tsAplZdpParentAnnceReq;

If a node which receives this message also has one of the specified nodes as its child (so there is a conflict), the receiving node broadcasts a response to indicate this. The response data is contained in the structure below (further detailed in Section 8.2.3.42):

typedef struct {

uint64* pu64ChildList; uint8 u8NumberOfChildren; uint8 u8Status;

} ZPS_tsAplZdpParentAnnceRsp;

Parent topic:ZPS_eAplZdpParentAnnceReq

Parameters

  • hAPduInst Handle of APDU instance in which message is sent.

  • uDstAddr Address of destination node of message (16-bit or 64-bit, as specified by bExtAddr)

  • bExtAddr Type of destination address: TRUE: 64-bit IEEE (MAC) address FALSE: 16-bit network address

  • * pu8SeqNumber Pointer to sequence number of message

  • * psZdpParentAnnceReq Pointer to message (see above)

Parent topic:ZPS_eAplZdpParentAnnceReq

Returns

  • ZPS_E_SUCCESS (request successfully sent)

  • 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_eAplZdpParentAnnceReq

Parent topic:Network Management Services functions

Parent topic:ZDP API functions

Response Data Extraction Function

The ZDP Response Data Extraction function is concerned with obtaining the data from a received response packet which is destined for the ZDO. The function should be called when a ZPS_EVENT_APS_DATA_INDICATION event is generated for destination endpoint 0.

Note: This function and the related structure ZPS_tsAfZdpEvent are defined in the header file

appZdpExtraction.h.

The function is listed below:

ZPS_bAplZdpUnpackResponse ZPS_bAplZdpUnpackResponse

Function Page

Parent topic:Response Data Extraction Function

ZPS_bAplZdpUnpackResponse

bool ZPS_bAplZdpUnpackResponse(
            ZPS_tsAfEvent *psZdoServerEvent,
            ZPS_tsAfZdpEvent *psReturnStruct);

Description

This function can be used to extract data received in a response packet which is destined for the ZDO (at endpoint 0). When such a packet is received, the event ZPS_EVENT_APS_DATA_INDICATION is generated. The application must then check whether the destination endpoint number is 0 in the event and, if this is the case, call this function to extract the response data from the event.

A pointer to a ZPS_tsAfZdpEventstructure must be provided, which the function will populate with the extracted data.

Parent topic:ZPS_bAplZdpUnpackResponse

Parameters

  • * psZdoServerEvent Pointer to structure containing the event (see Section 7.2.2.1)

  • * psReturnStruct Pointer to structure to receive extracted data (see Section 7.2.2.25)

Parent topic:ZPS_bAplZdpUnpackResponse

Returns

  • TRUE if data successfully extracted

  • FALSE if data not successfully extracted

Parent topic:ZPS_bAplZdpUnpackResponse

Parent topic:Response Data Extraction Function

Parent topic:ZDP API functions

Parent topic:ZigBee Device Profile (ZDP) API