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