2.8.1 WPAN_MLME_PollReq Function

C

bool WPAN_MLME_PollReq(WPAN_AddrSpec_t *CoordAddrSpec)

Summary

Initiate MLME-POLL.request service and have it placed in the MLME-SAP queue.

Description

This function is used by device to request data from coordinator. It initiates MLME-POLL.request service and have it placed in the MLME-SAP queue. The MLME-POLL.request primitive prompts the device to request data from the coordinator.

Precondition

WPAN_Init() should have been called before calling this function.

Parameters

ParamDescription
CoordAddrSpecPointer to WPAN_AddrSpec_t structure for the coordinator

Returns

true - success; false - buffer not available or queue full.

Example

WPAN_AddrSpec_t coordAddrSpec;
coordAddrSpec.AddrMode = WPAN_ADDRMODE_SHORT;
coordAddrSpec.PANId = DEFAULT_PAN_ID;
coordAddrSpec.Addr.shortAddress = 0x0000U;

bool retVal = false;
retVal = WPAN_MLME_PollReq(&coordAddrSpec);
if (true != retVal)
{
    printf("buffer not available or queue full");
}

Remarks

On the receipt of WPAN_MLME_PollReq, MAC layer will perform respective operation and asynchronously invokes USR_MLME_PollConf with proper status.