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