1.3.2.3.18 MAC_WRP_ScanRequest Function

C

void MAC_WRP_ScanRequest
(
    MAC_WRP_HANDLE handle,
    MAC_WRP_SCAN_REQUEST_PARAMS *scanParams
);

Summary

The MAC_WRP_ScanRequest primitive sets MAC layer(s) in Network Scan mode.

Description

Scan operation asks MAC layer(s) to send a Beacon Request frame and wait for incoming Beacon frames. During the Scan period, Beacons received will be notified by means of MAC_WRP_BeaconNotifyIndication callback. 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
scanParamsPointer to structure containing required parameters for request. See MAC_WRP_SCAN_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_SCAN_REQUEST_PARAMS params = {
    .scanDuration = 15
};

MAC_WRP_ScanRequest(handle, &params);

// Wait for Scan Confirm

Remarks

None.