SampleUtils
SampleUtils
SampleUtils

Contains utilities/functions related to sampling

Variables
WIRELESS_SAMPLE_RATE_MAP
static const std::map<SampleRate, WirelessTypes::WirelessSampleRate> WIRELESS_SAMPLE_RATE_MAP

A static map of SampleRate objects to their WirelessTypes::WirelessSampleRate (eeprom value) equivalent

Functions
convertToSampleRate
static SampleRate convertToSampleRate(
WirelessTypes::WirelessSampleRate rate
)

Converts a WirelessTypes::WirelessSampleRate enum to its corresponding SampleRate

Parameters
rate

The WirelessTypes::WirelessSampleRate enum to find the SampleRate of

Returns

A SampleRate corresponding to the passed in rate enum

Exceptions
convertToSampleRate
static SampleRate convertToSampleRate(
uint16 eepromVal
)

Converts a value from eeprom to its corresponding SampleRate

Parameters
eepromVal
uint16

The value that represents the sample rate in eeprom to convert to a SampleRate

Returns

A SampleRate corresponding to the passed in rate eeprom value

Exceptions
convertFromSampleRate
static WirelessTypes::WirelessSampleRate convertFromSampleRate(
const SampleRate &rate
)

Converts a SampleRate object to its WirelessTypes::WirelessSampleRate (eeprom value) equivalent

Parameters
rate
const SampleRate&

The SampleRate to get the eeprom value for

Returns

The WirelessTypes::WirelessSampleRate that is associated with the given SampleRate

Exceptions