1.2.3.7 WDRV_WINC_AssocRSSIGet Function

C

WDRV_WINC_STATUS WDRV_WINC_AssocRSSIGet
(
DRV_HANDLE handle,
int8_t *const pRSSI,
WDRV_WINC_ASSOC_RSSI_CALLBACK const pfAssociationRSSICB
)

Summary

Retrieve the current association RSSI.

Description

Attempts to retrieve the RSSI of the current association.

Precondition

WDRV_WINC_Initialize should have been called. WDRV_WINC_Open should have been called to obtain a valid handle. A peer device needs to be connected and associated.

Parameters

ParamDescription
assocHandleAssociation handle.
pRSSIPointer to variable to receive RSSI if available.
pfAssociationRSSICBPointer to callback function to be used when RSSI value is available.

Returns

WDRV_WINC_STATUS_OK - pRSSI will contain the RSSI.

WDRV_WINC_STATUS_NOT_OPEN - The driver instance is not open.

WDRV_WINC_STATUS_INVALID_ARG - The parameters were incorrect.

WDRV_WINC_STATUS_REQUEST_ERROR - The request to the WINC was rejected or there is no current association. WDRV_WINC_STATUS_RETRY_REQUEST - The RSSI is not available but it will be requested from the WINC.

Remarks

If the RSSI is not currently known to the driver (stored within the WINC) a request will be sent to the WINC and the return status will be WDRV_WINC_STATUS_RETRY_REQUEST. The callback function pfAssociationRSSICB can be provided which will be called when the WINC provides the RSSI information to the driver. Alternatively the caller may poll this function until the return status is WDRV_WINC_STATUS_OK to obtain the RSSI in pRSSI.