2.10.1 WPAN_MCPS_PurgeReq Function

C

bool WPAN_MCPS_PurgeReq(const uint8_t msduHandle)

Summary

Initiates MCPS-PURGE.request service and have it placed in the MCPS-SAP queue.

Description

This function is used to purge(remove) the data packets from MAC?s internal queue. It initiates MCPS-PURGE.request service and have it placed in the MCPS-SAP queue. The MCPS-PURGE.request primitive allows the next higher layer to purge an MSDU from the transaction queue.

Precondition

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

Parameters

ParamDescription
msduHandleHandle of MSDU to be purged

Returns

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

Example

uint8_t msduHandle = 0;
bool retVal = false;

retVal = WPAN_MCPS_PurgeReq(msduHandle);
if (true != retVal)
{
   printf("buffer not available or queue full");
}

Remarks

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