1.3.6.7 WDRV_PIC32MZW_AssocRSSIGet Function

C

WDRV_PIC32MZW_STATUS WDRV_PIC32MZW_AssocRSSIGet
(
WDRV_PIC32MZW_ASSOC_HANDLE assocHandle,
int8_t *const pRSSI,
WDRV_PIC32MZW_ASSOC_RSSI_CALLBACK const pfAssociationRSSICB
)

Summary

Retrieve the current association RSSI.

Description

Attempts to retrieve the RSSI of the current association.

Precondition

WDRV_PIC32MZW_Initialize should have been called. WDRV_PIC32MZW_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_PIC32MZW_STATUS_OK - pRSSI will contain the RSSI.

WDRV_PIC32MZW_STATUS_NOT_OPEN - The driver instance is not open.

WDRV_PIC32MZW_STATUS_INVALID_ARG - The parameters were incorrect.

WDRV_PIC32MZW_STATUS_REQUEST_ERROR - The request to the PIC32MZW was rejected or there is no current association. WDRV_PIC32MZW_STATUS_RETRY_REQUEST - The RSSI is not available but it will be requested from the PIC32MZW. WDRV_PIC32MZW_STATUS_NOT_CONNECTED - Not currently connected.

Remarks

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