2.3.1 WPAN_MLME_SetReq Function

C

bool WPAN_MLME_SetReq(uint8_t PIBAttribute, void *PIBAttributeValue)

Summary

Initiate MLME-SET.request service and have it placed in MLME_SAP queue.

Description

This function is used to write the given value to the indicated PIB attribute Initiate MLME-SET.request service and have it placed in MLME_SAP queue. MLME-SAP set primitives define how PIB attributes may be written.

Precondition

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

Parameters

ParamDescription
PIBAttributePIB attribute to be set
PIBAttributeValuePointer to new PIB attribute value

Returns

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

Example

bool retVal = false;
uint8_t beacon_payload_len = 20;

retVal = WPAN_MLME_SetReq(macBeaconPayloadLength, &beacon_payload_len);
if (true != retVal)
{
     printf("buffer not available or queue full");
}

Remarks

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