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