Jump to main content

# 1.2.7.4.5 SRV_RSNIFFER_ParseConfigCommand Function

## C

    void SRV_RSNIFFER_ParseConfigCommand (
        uint8_t* pDataSrc,
        uint16_t* pBandOpMode,
        uint16_t* pChannel
    );

## Summary

Parses a RF configuration command coming from the Microchip Hybrid Sniffer tool.

## Description

This function takes a RF configuration command with the format coming from the Microchip Hybrid Sniffer tool and extracts the Band, Operating mode and Channel parameters to be configured in the RF PHY layer.

If misconfigured, no RF frames will be seen.

## Precondition

None.

## Parameters

Param | Description
--- | ---
pDataSrc | Pointer to the data where the command is stored (USI).
pBandOpMode | Pointer to store the parsed Band and Operating mode parameter (RF215_PIB_PHY_BAND_OPERATING_MODE).
pChannel | Pointer to store the parsed Channel parameter (RF215_PIB_PHY_CHANNEL_NUM).

## Returns

None.

## Example

      Copied to clipboardswitch (command)
    {
        case SRV_RSNIFFER_CMD_SET_RF_BAND_OPM_CHANNEL:
        {
            uint16_t rfBandOpMode, rfChannel;
            SRV_RSNIFFER_ParseConfigCommand(pData, &rfBandOpMode, &rfChannel);

            DRV_RF215_SetPib(appData.drvRf215Handle, RF215_PIB_PHY_BAND_OPERATING_MODE, &rfBandOpMode);
            DRV_RF215_SetPib(appData.drvRf215Handle, RF215_PIB_PHY_CHANNEL_NUM, &rfChannel);
            break;
        }
    }

## Remarks

None.

Rev: G