2.5.1 WPAN_MLME_StartReq Function

C

bool WPAN_MLME_StartReq(uint16_t PANId, uint8_t LogicalChannel, uint8_t ChannelPage, uint8_t BeaconOrder, uint8_t SuperframeOrder, bool PANCoordinator, bool BatteryLifeExtension, bool CoordRealignment)

Summary

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

Description

This function is used by the PAN coordinator to initiate a new PAN. It initiates MLME-START service and have it placed in the MLME-SAP queue. The MLME-START.request primitive allows the PAN coordinator to initiate a new PAN or to begin using a new super frame configuration. This primitive may also be used by a device already associated with an existing PAN to begin using a new super frame configuration.

Precondition

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

Parameters

ParamDescription
PANIdPAN identifier to be used by device
LogicalChannelThe logical channel on which to start using the new super frame configuration
ChannelPageThe channel page on which to begin using the new super frame configuration
SuperframeOrderDuration of active portion of super frame
PANCoordinatorIndicates whether node is PAN coordinator of PAN
BatteryLifeExtensionBoolean true disables receiver of beaconing device
CoordRealignmentBoolean to transmit Coordinator Realignment command prior to changing to new super frame configuration

Returns

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

Example

bool retVal = false;
uint8_t current_channel = 13;
uint8_t current_channel_page = 0;
uint16_t panid = 0x1111;
uint8_t default_beacon_order = 15;
uint8_t default_superframe_order = 15;
retVal = WPAN_MLME_StartReq(panid,
          current_channel,
          current_channel_page,
          default_beacon_order,
          default_superframe_order,
          true, false, false);
if (true != retVal)
{
     printf("buffer not available or queue full");
}

Remarks

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