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