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