1.3.2.3.22 MAC_WRP_StartRequest Function

C

void MAC_WRP_StartRequest
(
    MAC_WRP_HANDLE handle,
    MAC_WRP_START_REQUEST_PARAMS *startParams
);

Summary

The MAC_WRP_StartRequest primitive starts a G3 Network and sets the device as the PAN Coordinator.

Description

Start operation asks MAC layer(s) to start a G3 Network, turning the device into the PAN Coordinator of such Network, and setting the PAN Identifier. Result is provided in the corresponding Confirm callback.

Precondition

A valid handle has to be obtained before calling this function, by means of MAC_WRP_Open function.

Parameters

ParamDescription
handleA valid handle which identifies the Mac Wrapper instance
startParamsPointer to structure containing required parameters for request. See MAC_WRP_START_REQUEST_PARAMS

Returns

None.

Example

// ...
MAC_WRP_HANDLE handle;
handle = MAC_WRP_Open(G3_MAC_WRP_INDEX_0, MAC_WRP_BAND_CENELEC_A);
// ...

MAC_WRP_START_REQUEST_PARAMS params = {
    .panId = 0x1234
};

MAC_WRP_StartRequest(handle, &params);

// Wait for Start Confirm

Remarks

This primitive is only used by the PAN Coordinator node, which is the one in charge of Starting the PAN.