Interface class for the Virtual SDR Frontend. More...
#include <VirtualSDRFrontEnd.hxx>
Public Member Functions | |
int32_t | transmitSignals (const std::vector< const void * > &signals, int64_t bufferLength, double postfixDuration) override |
Simulates signal transmission (no actual operation). | |
ExtraInfo | buildExtraInfo () override |
Builds extra information for the frontend (currently empty). | |
void | printStatus () override |
Prints the status information of the virtual SDR to the log. | |
std::tuple< double, double, double > | getChannelAndBandwidth () override |
Gets the channel, bandwidth, and center frequency (returns an empty tuple). | |
int | setChannelAndBandwidth (double center, double bw, double control) override |
Sets the channel, bandwidth, and center frequency (no actual operation). | |
int | setChannelAndBandwidth (std::optional< double > control, std::optional< double > bw, std::optional< double > center) override |
Optionally sets the channel, bandwidth, and center frequency (no actual operation). | |
bool | isHardwareSupportedPreset (const std::string &presetName) override |
Checks if the hardware supports the specified preset mode. | |
void | applyPreset (const std::string &presetName, bool skipChangeRate) override |
Applies the specified preset mode to the virtual SDR. | |
void | setTxCarrierFrequencies (std::vector< double > carrierFreqsV) override |
Sets the transmit carrier frequencies for the virtual SDR (only sets the first channel). | |
void | setRxCarrierFrequencies (std::vector< double > carrierFreqsV) override |
Sets the receive carrier frequencies for the virtual SDR (only sets the first channel). | |
std::vector< double > | getTxCarrierFrequencies () override |
Gets the transmit carrier frequencies for the virtual SDR (returns a single frequency). | |
std::vector< double > | getRxCarrierFrequencies () override |
Gets the receive carrier frequencies for the virtual SDR (returns a single frequency). | |
double | getTxSamplingRate () override |
Gets the transmit sampling rate for the virtual SDR. | |
double | getRxSamplingRate () override |
Gets the receive sampling rate for the virtual SDR. | |
void | setTxSamplingRate (double txRate) override |
Sets the transmit sampling rate for the virtual SDR. | |
void | setRxSamplingRate (double rxRate) override |
Sets the receive sampling rate for the virtual SDR. | |
double | getControlChannelFrequency () override |
Gets the control channel frequency for the virtual SDR. | |
void | setControlChannelFrequency (const double controlFrequencyV) override |
Sets the control channel frequency for the virtual SDR. | |
double | getTxpower () override |
Gets the transmit power for the virtual SDR. | |
void | setTxpower (const double txpowerV) override |
Sets the transmit power for the virtual SDR. | |
double | getRxGain () override |
Gets the receive gain for the virtual SDR. | |
void | setRxGain (const double rxGainV) override |
Sets the receive gain for the virtual SDR. | |
void | setRxGain (const double rxGainV, uint8_t channel) override |
Sets the receive gain for a specific channel of the virtual SDR (only sets the global gain). | |
bool | supportAGC () override |
Checks if the virtual SDR supports Automatic Gain Control (AGC). | |
void | setAGC (bool enableAGC) override |
Sets the Automatic Gain Control (AGC) for the virtual SDR (no actual operation). | |
uint16_t | getChannelFlags () override |
Gets the channel flags for the virtual SDR. | |
std::string | getClockSource () override |
Gets the clock source for the virtual SDR. | |
void | setClockSource (const std::string &clockSourceV) override |
Sets the clock source for the virtual SDR. | |
std::string | getTimeSource () override |
Gets the time source for the virtual SDR. | |
void | setTimeSource (const std::string &timeSourceV) override |
Sets the time source for the virtual SDR. | |
double | getMasterClockRate () override |
Gets the master clock rate for the virtual SDR. | |
void | setMasterClockRate (const double masterClockRateV) override |
Sets the master clock rate for the virtual SDR. | |
double | getSDRFrontEndTime () override |
Gets the current time of the virtual SDR (uses system clock). | |
std::vector< std::string > | getTxAntennas () override |
Gets the transmit antenna names for the virtual SDR. | |
void | setTxAntennas (const std::vector< std::string > &txAnts) override |
Sets the transmit antenna names for the virtual SDR. | |
std::vector< std::string > | getRxAntennas () override |
Gets the receive antenna names for the virtual SDR. | |
void | setRxAntennas (const std::vector< std::string > &rxAnts) override |
Sets the receive antenna names for the virtual SDR. | |
double | getFilterBandwidth () override |
Gets the filter bandwidth for the virtual SDR. | |
void | setFilterBandwidth (const double bw) override |
Sets the filter bandwidth for the virtual SDR. | |
![]() | |
AbstractSDRFrontEnd (const std::string &referredInterfaceName) | |
Create AbstractSDRFrontEnd object according to the user-specified frontend name referredInterfaceName . | |
virtual CS16Vector | generateSignal (const ModularPicoScenesTxFrame &frame, uint8_t numTxAntenna)=0 |
Generate the baseband signal for ModularPicoScenesTxFrame frame with an optional numTxAntenna specifying the number of Tx antennas (or channels) | |
virtual std::vector< CS16Vector > | generateMultiChannelSignals (const ModularPicoScenesTxFrame &frame, const uint8_t numTxAntenna) |
Generate the baseband signal via AbstractSDRFrontEnd::generateSignal, convert to SignalType type, and return in multi-channel format. | |
virtual void | prebuildSignals (ModularPicoScenesTxFrame &frame, const uint8_t numTxAntenna) |
Generate the baseband signal via AbstractSDRFrontEnd::generateSignal and save the data into the prebuilt signals buffer of the Tx frame. | |
virtual int | transmitSignalsFromFile (const std::string &signalSourceFile, uint64_t repeat)=0 |
Transmits baseband signals from a .bbsignals file. | |
virtual int | transmitSignalsContinuously (const std::vector< const void * > &multiChannelHeaders, int64_t numSignalsPerAntenna, bool burstStart, bool burstEnd)=0 |
int | transmit (const ModularPicoScenesTxFrame &frame) override |
Transmit a ModularPicoScenesTxFrame frame via current frontend hardware. | |
virtual size_t | transmitSignal (const CS16Vector &signals, const uint8_t numTxChannels, const double postfixDuration) |
virtual size_t | transmitSignal (const std::vector< CS16Vector > &multiChannelSignals, const double postfixDuration) |
virtual int32_t | transmitSignalInBatchedSingleBurst (const std::vector< std::vector< const void * > > &multipleSignals, const std::vector< int64_t > &signalLength, const std::vector< double > &postfixDurations, uint32_t repeat)=0 |
int | transmitFramesInBatch (const std::vector< const ModularPicoScenesTxFrame * > &frames, const uint32_t repeat) override |
Transmit frames in batch with precise inter-frame timing. | |
template<int repeat = 1, typename... Frames, typename = std::enable_if_t<(std::is_same_v<std::remove_cvref_t<Frames>, ModularPicoScenesTxFrame*> && ...) || (std::is_same_v<std::remove_cvref_t<Frames>, ModularPicoScenesTxFrame> && ...) || ((std::is_same_v<std::remove_cvref_t<Frames>, std::shared_ptr<ModularPicoScenesTxFrame>> || std::is_same_v<std::remove_cvref_t<Frames>, std::unique_ptr<ModularPicoScenesTxFrame>>) && ...)>> | |
int | transmitFramesInBatch (Frames &&... frames) |
virtual std::optional< double > | getCurrentNoiseFloor ()=0 |
virtual SDRFrontEndTxStatus | getLastTxStatus () const =0 |
virtual void | clearTxStatus ()=0 |
void | setTxSignalDumpFilePath (const std::string &txSignalDumpFilePathV) |
void | setRxSignalDumpFilePath (const std::string &rxSignalDumpFilePathV) |
void | setRxSignalDumpDelayedStartDuration (const double delayedStartDuration) |
void | setSignalReplayFilePath (const std::string &signalReplayFilePath) |
void | setTxSignalReplayDelayMs (const std::optional< uint32_t > &txSignalReplayDelayMs) |
ChannelBandwidthEnum | getRxChannelBandwidthMode () override |
Get the current channel bandwidth mode for Rx. | |
void | setRxChannelBandwidthMode (ChannelBandwidthEnum rxCbw) override |
Set the channel bandwidth mode for Rx. | |
void | setTxIQMismatch (double iq_ratio_db, double iq_crosstalk_degree) override |
Set I/Q mismatch parameters for Tx. | |
void | setRxIQMismatch (double iq_ratio_db, double iq_crosstalk_degree) override |
Set I/Q mismatch parameters for Rx. | |
double | getTxIqRatioDB () override |
Get the I/Q ratio for Tx in dB. | |
double | getTxIqCrossTalkDegree () override |
Get the I/Q crosstalk angle for Tx. | |
double | getRxIqRatioDB () override |
Get the I/Q ratio for Rx in dB. | |
double | getRxIqCrossTalkDegree () override |
Get the I/Q crosstalk angle for Rx. | |
double | getRxSensitivity () override |
Get the receiver sensitivity. | |
void | setRxSensitivity (const double rxSensitivityV) override |
Set the receiver sensitivity. | |
void | setCarrierFrequencyOffset4TxEncoding (double carrierFrequencyOffset) override |
Set the carrier frequency offset for Tx encoding. | |
std::optional< double > | getCarrierFrequencyOffset4TxEncoding () override |
Get the carrier frequency offset for Tx encoding. | |
void | setSamplingFrequencyOffset4TxEncoding (double samplingFrequencyOffset) override |
Set the sampling frequency offset for Tx encoding. | |
std::optional< double > | getSamplingFrequencyOffset4TxEncoding () override |
Get the sampling frequency offset for Tx encoding. | |
void | setCarrierFrequencyOffset4RxDecoding (double rxCarrierFrequencyOffsetV) override |
Set the carrier frequency offset for Rx decoding. | |
std::optional< double > | getCarrierFrequencyOffset4RxDecoding () override |
Get the carrier frequency offset for Rx decoding. | |
void | setSamplingFrequencyOffset4RxDecoding (double samplingFrequencyOffset) override |
Set the sampling frequency offset for Rx decoding. | |
std::optional< double > | getSamplingFrequencyOffset4RxDecoding () override |
Get the sampling frequency offset for Rx decoding. | |
double | getSamplingRate () override |
Get the baseband sampling rate. | |
void | setSamplingRate (double samplingRate) override |
set sampling rate (in Hz) | |
double | getTxResampleRatio () override |
Get the Tx resampling ratio. | |
void | setTxResampleRatio (double txResampleRatioV) override |
Set the Tx resampling ratio. | |
double | getRxResampleRatio () override |
Get the Rx resampling ratio. | |
bool | isRxResampleBypassFIR () override |
Check if FIR filter is bypassed in Rx resampling. | |
void | setRxResampleBypassFIR (const bool bypass) override |
Set whether to bypass FIR filter in Rx resampling. | |
bool | isTxSplitHighLow () override |
Check if high/low split is enabled for Tx. | |
void | setTxSplitHighLow (const bool split) override |
Set whether to split high/low for Tx. | |
bool | isRxMergeHighLow () override |
Check if high/low merge is enabled for Rx. | |
void | setRxMergeHighLow (const bool merge) override |
Set whether to merge high/low for Rx. | |
void | setRxResampleRatio (double rxResampleRatioV) override |
Set the Rx resampling ratio. | |
double | getRxOfdmSymbolOffset () override |
Get the Rx OFDM symbol offset. | |
void | setRxOfdmSymbolOffset (const double rxOfdmSymbolOffset) override |
Set the Rx OFDM symbol offset. | |
double | getNumSamplesSavedBeforeStart () override |
Get the number of samples saved before start. | |
void | getNumSamplesSavedBeforeStart (const double numSamplesSavedBeforeStartV) override |
Set the number of samples saved before start. | |
uint8_t | getTxChainMask () override |
Get the Tx chain mask. | |
void | setTxChainMask (const uint8_t txChainMask) override |
Set Tx chain mask. Setting Tx chain mask means to use only the selected Tx chain for signal transmission. | |
uint8_t | getRxChainMask () override |
Get Rx chain mask. | |
void | setRxChainMask (const uint8_t rxChainMask) override |
Set Rx chain mask. Setting Rx chain mask means to use only the selected Rx chains for signal reception. | |
const std::vector< size_t > & | userSpecifiedTxChannels () const override |
Get the list of user-specified Tx channels. | |
std::vector< size_t > | getTxChannels () override |
Get the numbers of the active Tx channels, starting from 0. | |
void | setTxChannels (const std::vector< size_t > &txChannelsN) override |
This methods is fundamentally. | |
const std::vector< size_t > & | userSpecifiedRxChannels () const override |
Get the list of user-specified Rx channels. | |
std::vector< size_t > | getRxChannels () override |
Get the number of the active Rx channels, starting from 0. | |
void | setRxChannels (const std::vector< size_t > &rxChannelsN) override |
Set the number of the active Rx channels, starting from 0. | |
bool | isFullDuplexEnabled () override |
Check if full duplex mode is enabled. | |
void | setFullDuplex (const bool enableFullDuplex) override |
Set full duplex mode. | |
SDRFrontEndTransferType | getTransferType () const override |
Get the current transfer type. | |
void | setTransferType (const SDRFrontEndTransferType transferTypeV) override |
Set the transfer type. | |
void | setNumThreads4RxDecoding (const uint8_t numThreads) override |
Set the number of threads for Rx decoding. | |
double | getCarrierFrequency () override |
Get the RF carrier frequency. | |
void | setCarrierFrequency (double carrierFrequency) override |
Get the RF carrier frequency. | |
double | getRxChannelBandwidth () override |
Get the 802.11 Channel Bandwidth parameter (20e6/40e6/80e6/160e6/320e6) of the Rx path. | |
void | setRxChannelBandwidth (double rxcbw) override |
Set the Rx channel bandwidth parameter of the <contorlfreq-bandwidth-centerfreq> channel parameters. | |
void | setClockSources (const std::vector< std::string > &clockSources) override |
Set clock sources for multiple motherboards. | |
std::vector< std::string > | getClockSources () override |
Get list of current clock sources. | |
void | setTimeSources (const std::vector< std::string > &timeSources) override |
Set time sources for multiple motherboards. | |
std::vector< std::string > | getTimeSources () override |
Get list of current time sources. | |
std::string | getTxAntenna () override |
Get the current Tx antenna. | |
void | setTxAntenna (const std::string &txAnt) override |
Set the Tx antenna. | |
std::string | getRxAntenna () override |
Get the current Rx antenna. | |
void | setRxAntenna (const std::string &rxAnt) override |
Set the Rx antenna. | |
void | setRxPipelineChannels (std::vector< std::vector< size_t > > PipelineChannels) override |
std::vector< std::vector< size_t > > | getRxPipelineChannels () override |
void | setPinelineConfig (std::vector< PipelineConfig > cfgs) override |
std::vector< PipelineConfig > | getPinelineConfig () override |
![]() | |
AbstractFrontEnd (const std::string &referredInterfaceName) | |
Create AbstractFrontEnd object according to the user-specified frontend name referredInterfaceName . | |
virtual int | startTx () |
Activate internal Tx service loop. | |
virtual int | stopTx () |
De-activate Tx service loop. | |
virtual bool | isTxServiceStarted () const |
Returns whether Tx service is started. | |
virtual int | pauseTx () |
Pause Tx service loop. | |
virtual int | resumeTx () |
Resume Tx service loop. | |
virtual int | transmitFramesInBatch (const std::vector< ModularPicoScenesTxFrame > &frames, const uint32_t repeat) |
template<int repeat = 1, typename ... Frames, typename = std::enable_if_t<(std::is_same_v<std::remove_cvref_t<Frames>, ModularPicoScenesTxFrame *> &&...) || (std::is_same_v<std::remove_cvref_t<Frames>, ModularPicoScenesTxFrame> &&...) || ((std::is_same_v<std::remove_cvref_t<Frames>, std::shared_ptr<ModularPicoScenesTxFrame>> || std::is_same_v<std::remove_cvref_t<Frames>, std::unique_ptr<ModularPicoScenesTxFrame>>) &&...)>> | |
int | transmitFramesInBatch (Frames &&... frames) |
virtual int | startRx ()=0 |
Activiate the Rx service loop. | |
virtual int | stopRx ()=0 |
De-activate the Rx service loop, set rxServiceStarted to false. | |
virtual int | pauseRx () |
Pause the Rx service loop, set rxPaused to true. | |
virtual int | resumeRx () |
Resuase the paused Rx service loop, set rxPaused to false. | |
void | registerRxHandle (const std::function< void(const ModularPicoScenesRxFrame &)> &rxHandle) |
Register a handler for the received ModularPicoScenesRxFrame frames. | |
const std::string & | getReferredInterfaceName () const |
Get the user-specified frontend name. | |
void | setReferredInterfaceName (const std::string &name) |
Set the user-specified frontend name. | |
const std::string & | getPhyId () const |
Return the PhyId for NIC frontend. This is a undefined behavior for SDR frontend. | |
PicoScenesDeviceType | getFrontEndType () const |
Return the PicoScenesDeviceType of this frontend. | |
PicoScenesDeviceSubtype | getFrontEndSubtype () const |
Return the PicoScenesDeviceType subtype of this frontend. | |
const std::array< uint8_t, 6 > & | getMacAddressPhy () const |
Return the MAC address of this frontend. For SDR frontend, this method should generate a pseudo-MAC address. | |
PicoScenesFrameTxParameters & | getUserSpecifiedTxParameters () |
ModularPicoScenesTxFrame | initializeTxFrame () override |
virtual | ~AbstractFrontEnd ()=default |
![]() | |
virtual | ~FrontEndConfigurations ()=default |
void | setNumTxChannels (const uint8_t numTxChannels) |
Set the number of Tx channels, the active channels start from 0. | |
void | setNumRxChannels (const uint8_t numRxChannels) |
Set the number of Rx channels, the active channels start from 0. | |
std::vector< size_t > | getAllChannels () |
virtual void | setSourceMACAddressFilter (const std::vector< std::array< uint8_t, 6 > > &addresses) |
Set the SOURCE addresses that will be blocked by the frontend. | |
virtual void | setDestinationMACAddressFilter (const std::vector< std::array< uint8_t, 6 > > &addresses) |
Set the DESTINATION addresses that will be blocked by the frontend. | |
virtual uint16_t | getAndIncreasePerFrontEndTxFrameSequenceNumber () |
![]() | |
virtual void | initializeSDR ()=0 |
Initialize the SDR hardware. | |
virtual double | getRxBufferDuration () const =0 |
Get the Rx buffer duration. | |
virtual void | skipMPDUDecoding4HESUHighDopplerFrame (bool skipDataDecoding)=0 |
Set whether to skip MPDU decoding for HE-SU high Doppler frames. | |
![]() | |
virtual | ~SDRFrontEndBasebandConfigurations ()=default |
virtual bool | isReturnBasebandSignals () const =0 |
Check if baseband signals should be returned. | |
virtual bool | useConventionalPacketDetector () const =0 |
Check if conventional packet detector should be used. | |
![]() | |
virtual std::vector< SDRMainBoardInfo > | getAllHardwareBoards (bool refresh=false) |
Get all hardware boards information. | |
virtual const SDRMainBoardInfo & | getHardwareBoardByIndex (size_t boardIndex, bool refresh=false) |
Get information for a specific board. | |
virtual size_t | getHardwareBoardCount (bool refresh=false) |
Get total number of hardware boards. | |
virtual const SDRMainBoardInfo & | getHardwareBoardInfo (bool refresh=false) |
Get main hardware board information. | |
virtual const std::vector< uint8_t > & | getHardwareSupportedTxChannels (bool refresh=false) |
Get supported Tx channels. | |
virtual const std::vector< uint8_t > & | getHardwareSupportedRxChannels (bool refresh=false) |
Get supported Rx channels. | |
virtual const std::vector< std::string > & | getHardwareSupportedTxAntennas (uint8_t channel, bool refresh=false) |
Get supported Tx antennas for a specific channel. | |
virtual const std::vector< std::string > & | getHardwareSupportedRxAntennas (uint8_t channel, bool refresh=false) |
Get supported Rx antennas for a specific channel. | |
virtual const std::vector< std::vector< std::string > > & | getHardwareSupportedTxAntennas (bool refresh=false) |
Get all supported Tx antennas. | |
virtual const std::vector< std::vector< std::string > > & | getHardwareSupportedRxAntennas (bool refresh=false) |
Get all supported Rx antennas. | |
virtual const std::pair< double, double > & | getHardwareTxGainRange (uint8_t channel, bool refresh=false) |
Get Tx gain range for a specific channel. | |
virtual const std::pair< double, double > & | getHardwareRxGainRange (uint8_t channel, bool refresh=false) |
Get Rx gain range for a specific channel. | |
virtual const std::vector< std::pair< double, double > > & | getHardwareTxGainRanges (bool refresh=false) |
Get all Tx gain ranges. | |
virtual const std::vector< std::pair< double, double > > & | getHardwareRxGainRanges (bool refresh=false) |
Get all Rx gain ranges. | |
virtual const std::pair< double, double > & | getHardwareTxFrequencyRange (uint8_t channel, bool refresh=false) |
Get Tx frequency range for a specific channel. | |
virtual const std::pair< double, double > & | getHardwareRxFrequencyRange (uint8_t channel, bool refresh=false) |
Get Rx frequency range for a specific channel. | |
virtual const std::vector< std::pair< double, double > > & | getHardwareTxFrequencyRanges (bool refresh=false) |
Get all Tx frequency ranges. | |
virtual const std::vector< std::pair< double, double > > & | getHardwareRxFrequencyRanges (bool refresh=false) |
Get all Rx frequency ranges. | |
virtual const std::pair< double, double > & | getHardwareTxSamplingRateRange (uint8_t channel, bool refresh=false) |
Get Tx sampling rate range for a specific channel. | |
virtual const std::pair< double, double > & | getHardwareRxSamplingRateRange (uint8_t channel, bool refresh=false) |
Get Rx sampling rate range for a specific channel. | |
virtual const std::vector< std::pair< double, double > > & | getHardwareTxSamplingRateRanges (bool refresh=false) |
Get all Tx sampling rate ranges. | |
virtual const std::vector< std::pair< double, double > > & | getHardwareRxSamplingRateRanges (bool refresh=false) |
Get all Rx sampling rate ranges. | |
virtual const std::vector< double > & | getHardwareSupportedMasterClockRates (bool refresh=false) |
Get supported master clock rates. | |
virtual const std::vector< std::string > & | getHardwareSupportedClockAndTimeSources (bool refresh=false) |
Get supported clock and time sources. | |
virtual const std::vector< std::string > & | getHardwareSupportedSensors (uint8_t channel, bool refresh=false) |
Get supported sensors for a specific channel. | |
virtual const std::vector< std::vector< std::string > > & | getAllHardwareSupportedSensors (bool refresh=false) |
Get all supported sensors. | |
virtual const std::vector< double > & | getHardwareTemperatures (bool refresh=false) |
Get temperature readings. | |
virtual bool | getHardwareAGCSupport (uint8_t channel, bool refresh=false) |
Get AGC support for a specific channel. | |
virtual const std::vector< bool > & | getHardwareAGCSupport (bool refresh=false) |
Get AGC support for all channels. | |
virtual const std::shared_ptr< SDRFrontEndProfile > & | getHardwareFrontEndProfile (uint8_t channel, bool refresh=false) |
Get frontend profile for a specific channel. | |
virtual const std::vector< std::shared_ptr< SDRFrontEndProfile > > & | getHardwareFrontEndProfiles (bool refresh=false) |
Get all frontend profiles. | |
virtual const SDRDaughterboardProfile & | getHardwareDaughterboardProfile (size_t index, bool refresh=false) |
Get daughterboard profile at specific index. | |
virtual const std::vector< SDRDaughterboardProfile > & | getHardwareDaughterboardProfiles (bool refresh=false) |
Get all daughterboard profiles. | |
virtual void | refreshAllHardwareInfo () |
Refresh all hardware information. | |
std::string | hardwareInformationSheet () |
Generate a formatted information sheet about the hardware. | |
virtual | ~SDRDeviceHardwareInformation ()=default |
Static Public Member Functions | |
static std::shared_ptr< VirtualSDRFrontEnd > | getInstance (const std::string &referredInterfaceName) |
Gets the instance of VirtualSDRFrontEnd. | |
Protected Member Functions | |
VirtualSDRFrontEnd (const std::string &referredInterfaceName) | |
Constructor (protected, get instance via getInstance). | |
![]() | |
void | refreshHardwareInfoForSupportedChannels () override |
Refresh supported channels information. | |
void | refreshHardwareInfoForBoards () override |
Refresh boards information. | |
void | refreshHardwareInfoForSupportedAntennas () override |
Refresh supported antennas information. | |
void | refreshHardwareInfoForGainRanges () override |
Refresh gain ranges information. | |
void | refreshHardwareInfoForFrequencyRanges () override |
Refresh frequency ranges information. | |
void | refreshHardwareInfoForSamplingRateRanges () override |
Refresh sampling rate ranges information. | |
void | refreshHardwareInfoForMasterClockRates () override |
Refresh master clock rates information. | |
void | refreshHardwareInfoForClockAndTimeSources () override |
Refresh clock and time sources information. | |
void | refreshHardwareInfoForSensors () override |
Refresh sensors information. | |
void | refreshHardwareInfoForTemperatures () override |
Refresh temperature readings. | |
void | refreshHardwareInfoForAGCSupport () override |
Refresh AGC support information. | |
void | refreshHardwareInfoForFrontEndProfiles () override |
Refresh frontend profiles information. | |
![]() | |
virtual void | refreshHardwareInfoForConnectionProfile () |
Refresh connection profile information. | |
Protected Attributes | |
double | carrierFrequency = 2412e6 |
Carrier frequency (Hz). | |
double | txSamplingRate = 20e6 |
Transmit sampling rate (Hz). | |
double | rxSamplingRate = 20e6 |
Receive sampling rate (Hz). | |
double | controlFrequency = 2412e6 |
Control channel frequency (Hz). | |
double | txpower = 10 |
Transmit power (dBm or linear unit, context-dependent). | |
double | rxGain = 30 |
Receive gain (dB). | |
uint16_t | channelFlags {} |
Channel flags (define channel mode, etc.). | |
std::string | clockSource |
Clock source ("internal", "external", etc.). | |
std::string | timeSource |
Time source ("internal", "gpsdo", etc.). | |
std::optional< double > | rxCarrierFrequencyOffset = std::nullopt |
Receive carrier frequency offset (Hz). | |
ChannelBandwidthEnum | rxCBW = ChannelBandwidthEnum::CBW_20 |
Receive channel bandwidth mode. | |
double | masterClockRate = 100e6 |
Master clock rate (Hz). | |
std::vector< std::string > | txAntennas {"TX/RX"} |
List of transmit antenna names. | |
std::vector< std::string > | rxAntennas {"RX2"} |
List of receive antenna names. | |
double | filterBandwidth = 40e6 |
Hardware filter bandwidth (Hz). | |
![]() | |
std::optional< uint32_t > | txSignalReplayDelay_ms |
std::optional< std::string > | txSignalDumpFilePath |
std::optional< std::string > | rxSignalDumpFilePath |
std::optional< double > | rxSignalDumpDelayedStartDuration |
std::optional< std::string > | rxSignalReplayFilePath |
bool | fullDuplex {false} |
uint8_t | numDecodingThreads {1} |
SDRFrontEndTransferType | transferType {SDRFrontEndTransferType::CS16} |
std::vector< size_t > | txChannels {} |
std::vector< size_t > | rxChannels {} |
std::vector< std::vector< size_t > > | rxPipelineChannels {} |
std::vector< PipelineConfig > | rxPipelineConfigs {} |
ChannelBandwidthEnum | rxCBW {ChannelBandwidthEnum::CBW_20} |
double | rxResampleRatio {1.0} |
bool | rxResampleBypassFIR {false} |
bool | mergeHighLow {false} |
double | rxOFDMSymbolOffset {0.75} |
double | numSamplesSavedBeforeStart {5} |
double | rxSensitivity {10} |
double | rxIQMismatchRatioDb {0} |
double | rxIQMismatchRatioDegree {0} |
std::optional< double > | rxCarrierFrequencyOffset {} |
std::optional< double > | rxSamplingFrequencyOffset {} |
![]() | |
std::string | referredInterfaceName |
the user specified frontend name | |
std::string | phyId |
phyId | |
std::array< uint8_t, 6 > | macAddress_PHY {0, 0, 0, 0, 0, 0} |
macAddress of the frontend | |
PicoScenesDeviceType | frontEndType = PicoScenesDeviceType::Unknown |
frontend type | |
PicoScenesDeviceSubtype | frontEndSubtype = PicoScenesDeviceSubtype::Unknown |
frontend subtype | |
bool | txServiceStarted = false |
indicate whether Tx service is running | |
PicoScenesFrameTxParameters | userSpecifiedTxParameters |
user-specified Tx parameters | |
std::mutex | txPauseMutex |
std::condition_variable | txPauseCV |
bool | txPaused = false |
indicate whether Tx serivce is paused | |
std::function< void(const ModularPicoScenesRxFrame &)> | rxHandle = nullptr |
The Rx frame handler. | |
bool | rxPaused = false |
indicate whether Rx service loop is paused | |
bool | rxServiceStarted = false |
indicate whether Rx service loop is running | |
![]() | |
std::vector< std::array< uint8_t, 6 > > | sourceAddressFilterList |
the source addresses to be filtered | |
std::vector< std::array< uint8_t, 6 > > | destinationAddressFilterList |
the destination addressed to be filtered | |
uint16_t | currentTxSequenceNumber {0} |
current Tx sequence number | |
![]() | |
SDRMainBoardInfo | boardInfo |
bool | boardInfoChanged {true} |
std::vector< uint8_t > | supportedTxChannels {} |
std::vector< uint8_t > | supportedRxChannels {} |
bool | supportedChannelsChanged {true} |
std::vector< SDRDaughterboardProfile > | daughterboardProfiles {} |
std::vector< std::shared_ptr< SDRFrontEndProfile > > | frontendProfiles {} |
bool | frontendProfilesChanged {true} |
std::vector< std::vector< std::string > > | supportedTxAntennas {} |
std::vector< std::vector< std::string > > | supportedRxAntennas {} |
bool | supportedAntennasChanged {true} |
bool | supportedAntennasMapChanged {true} |
std::vector< std::pair< double, double > > | txGainRanges {} |
std::vector< std::pair< double, double > > | rxGainRanges {} |
bool | gainRangesChanged {true} |
bool | gainRangesMapChanged {true} |
std::vector< std::pair< double, double > > | txFrequencyRanges {} |
std::vector< std::pair< double, double > > | rxFrequencyRanges {} |
bool | frequencyRangesChanged {true} |
bool | frequencyRangesMapChanged {true} |
std::vector< std::pair< double, double > > | txSamplingRateRanges {} |
std::vector< std::pair< double, double > > | rxSamplingRateRanges {} |
bool | samplingRateRangesChanged {true} |
bool | samplingRateRangesMapChanged {true} |
std::vector< double > | supportedMasterClockRates {} |
bool | masterClockRatesChanged {true} |
std::vector< std::string > | supportedClockAndTimeSources {} |
bool | clockAndTimeSourcesChanged {true} |
std::vector< std::vector< std::string > > | supportedSensors {} |
bool | sensorsChanged {true} |
bool | sensorsMapChanged {true} |
std::vector< double > | temperatureReadings {} |
bool | temperaturesChanged {true} |
std::vector< bool > | agcSupport {} |
bool | agcSupportChanged {true} |
bool | agcSupportMapChanged {true} |
Interface class for the Virtual SDR Frontend.
The VirtualSDRFrontEnd class provides an interface for a simulated SDR hardware. It inherits from AbstractSDRFrontEnd and provides default, no-op, or simulated implementations for many SDR operations. It is primarily used for testing and development purposes, or for running PicoScenes without physical SDR hardware.
Definition at line 20 of file VirtualSDRFrontEnd.hxx.
|
inlineexplicitprotected |
Constructor (protected, get instance via getInstance).
referredInterfaceName | User-specified interface name. |
Definition at line 405 of file VirtualSDRFrontEnd.hxx.
|
inlineoverridevirtual |
Applies the specified preset mode to the virtual SDR.
presetName | The name of the preset mode to apply. |
skipChangeRate | If true, skips changing the sampling rate. |
std::invalid_argument | If the preset name is invalid (although this won't happen in this implementation). |
Implements FrontEndConfigurations.
Definition at line 103 of file VirtualSDRFrontEnd.hxx.
References isHardwareSupportedPreset(), AbstractSDRFrontEnd::setRxChannelBandwidthMode(), AbstractSDRFrontEnd::setRxResampleRatio(), setRxSamplingRate(), AbstractSDRFrontEnd::setTxResampleRatio(), setTxSamplingRate(), and AbstractFrontEnd::userSpecifiedTxParameters.
|
inlineoverridevirtual |
Builds extra information for the frontend (currently empty).
Reimplemented from AbstractSDRFrontEnd.
Definition at line 45 of file VirtualSDRFrontEnd.hxx.
|
inlineoverridevirtual |
Gets the channel, bandwidth, and center frequency (returns an empty tuple).
Reimplemented from AbstractSDRFrontEnd.
Definition at line 62 of file VirtualSDRFrontEnd.hxx.
|
inlineoverridevirtual |
Gets the channel flags for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 275 of file VirtualSDRFrontEnd.hxx.
References channelFlags.
Referenced by printStatus().
|
inlineoverridevirtual |
Gets the clock source for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 283 of file VirtualSDRFrontEnd.hxx.
References clockSource.
|
inlineoverridevirtual |
Gets the control channel frequency for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 202 of file VirtualSDRFrontEnd.hxx.
References controlFrequency.
|
inlineoverridevirtual |
Gets the filter bandwidth for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 372 of file VirtualSDRFrontEnd.hxx.
References filterBandwidth.
|
static |
Gets the instance of VirtualSDRFrontEnd.
referredInterfaceName | User-specified interface name, must start with "virtualsdr". |
|
inlineoverridevirtual |
Gets the master clock rate for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 315 of file VirtualSDRFrontEnd.hxx.
References masterClockRate.
|
inlineoverridevirtual |
Gets the receive antenna names for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 356 of file VirtualSDRFrontEnd.hxx.
References rxAntennas.
|
inlineoverridevirtual |
Gets the receive carrier frequencies for the virtual SDR (returns a single frequency).
Implements SDRFrontEndConfigurations.
Definition at line 162 of file VirtualSDRFrontEnd.hxx.
References carrierFrequency.
Referenced by printStatus().
|
inlineoverridevirtual |
Gets the receive gain for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 234 of file VirtualSDRFrontEnd.hxx.
References rxGain.
|
inlineoverridevirtual |
Gets the receive sampling rate for the virtual SDR.
Implements SDRFrontEndConfigurations.
Definition at line 178 of file VirtualSDRFrontEnd.hxx.
References rxSamplingRate.
|
inlineoverridevirtual |
Gets the current time of the virtual SDR (uses system clock).
Reimplemented from AbstractSDRFrontEnd.
Definition at line 331 of file VirtualSDRFrontEnd.hxx.
|
inlineoverridevirtual |
Gets the time source for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 299 of file VirtualSDRFrontEnd.hxx.
References timeSource.
|
inlineoverridevirtual |
Gets the transmit antenna names for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 340 of file VirtualSDRFrontEnd.hxx.
References txAntennas.
|
inlineoverridevirtual |
Gets the transmit carrier frequencies for the virtual SDR (returns a single frequency).
Implements SDRFrontEndConfigurations.
Definition at line 154 of file VirtualSDRFrontEnd.hxx.
References carrierFrequency.
|
inlineoverridevirtual |
Gets the transmit power for the virtual SDR.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 218 of file VirtualSDRFrontEnd.hxx.
References txpower.
Referenced by printStatus().
|
inlineoverridevirtual |
Gets the transmit sampling rate for the virtual SDR.
Implements SDRFrontEndConfigurations.
Definition at line 170 of file VirtualSDRFrontEnd.hxx.
References txSamplingRate.
|
inlineoverridevirtual |
Checks if the hardware supports the specified preset mode.
presetName | The name of the preset mode. |
Implements FrontEndConfigurations.
Definition at line 92 of file VirtualSDRFrontEnd.hxx.
Referenced by applyPreset().
|
inlineoverridevirtual |
Prints the status information of the virtual SDR to the log.
Reimplemented from AbstractSDRFrontEnd.
Definition at line 53 of file VirtualSDRFrontEnd.hxx.
References getChannelFlags(), AbstractFrontEnd::getReferredInterfaceName(), getRxCarrierFrequencies(), AbstractSDRFrontEnd::getRxChainMask(), AbstractSDRFrontEnd::getSamplingRate(), AbstractSDRFrontEnd::getTxChainMask(), getTxpower(), and LoggingService_Frontend_info_printf.
|
inlineoverridevirtual |
Sets the Automatic Gain Control (AGC) for the virtual SDR (no actual operation).
enableAGC | Whether to enable AGC. |
Implements SDRFrontEndConfigurations.
Definition at line 267 of file VirtualSDRFrontEnd.hxx.
|
inlineoverridevirtual |
Sets the channel, bandwidth, and center frequency (no actual operation).
center | Center frequency. |
bw | Bandwidth. |
control | Control frequency. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 74 of file VirtualSDRFrontEnd.hxx.
|
inlineoverridevirtual |
Optionally sets the channel, bandwidth, and center frequency (no actual operation).
control | Optional control frequency. |
bw | Optional bandwidth. |
center | Optional center frequency. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 83 of file VirtualSDRFrontEnd.hxx.
|
inlineoverridevirtual |
Sets the clock source for the virtual SDR.
clockSourceV | The new clock source string. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 291 of file VirtualSDRFrontEnd.hxx.
References clockSource.
|
inlineoverridevirtual |
Sets the control channel frequency for the virtual SDR.
controlFrequencyV | The new control channel frequency. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 210 of file VirtualSDRFrontEnd.hxx.
References controlFrequency.
|
inlineoverridevirtual |
Sets the filter bandwidth for the virtual SDR.
bw | The new filter bandwidth. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 380 of file VirtualSDRFrontEnd.hxx.
References filterBandwidth.
|
inlineoverridevirtual |
Sets the master clock rate for the virtual SDR.
masterClockRateV | The new master clock rate. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 323 of file VirtualSDRFrontEnd.hxx.
References masterClockRate.
|
inlineoverridevirtual |
Sets the receive antenna names for the virtual SDR.
rxAnts | Vector containing the receive antenna names. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 364 of file VirtualSDRFrontEnd.hxx.
References rxAntennas.
|
inlineoverridevirtual |
Sets the receive carrier frequencies for the virtual SDR (only sets the first channel).
carrierFreqsV | Vector containing carrier frequencies for each channel. |
Implements SDRFrontEndConfigurations.
Definition at line 144 of file VirtualSDRFrontEnd.hxx.
References carrierFrequency.
|
inlineoverridevirtual |
Sets the receive gain for the virtual SDR.
rxGainV | The new receive gain. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 242 of file VirtualSDRFrontEnd.hxx.
References rxGain.
|
inlineoverridevirtual |
Sets the receive gain for a specific channel of the virtual SDR (only sets the global gain).
rxGainV | The new receive gain. |
channel | Channel index (ignored). |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 251 of file VirtualSDRFrontEnd.hxx.
References rxGain.
|
inlineoverridevirtual |
Sets the receive sampling rate for the virtual SDR.
rxRate | The new receive sampling rate. |
Implements SDRFrontEndConfigurations.
Definition at line 194 of file VirtualSDRFrontEnd.hxx.
References rxSamplingRate.
Referenced by applyPreset().
|
inlineoverridevirtual |
Sets the time source for the virtual SDR.
timeSourceV | The new time source string. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 307 of file VirtualSDRFrontEnd.hxx.
References timeSource.
|
inlineoverridevirtual |
Sets the transmit antenna names for the virtual SDR.
txAnts | Vector containing the transmit antenna names. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 348 of file VirtualSDRFrontEnd.hxx.
References txAntennas.
|
inlineoverridevirtual |
Sets the transmit carrier frequencies for the virtual SDR (only sets the first channel).
carrierFreqsV | Vector containing carrier frequencies for each channel. |
Implements SDRFrontEndConfigurations.
Definition at line 134 of file VirtualSDRFrontEnd.hxx.
References carrierFrequency.
|
inlineoverridevirtual |
Sets the transmit power for the virtual SDR.
txpowerV | The new transmit power. |
Reimplemented from AbstractSDRFrontEnd.
Definition at line 226 of file VirtualSDRFrontEnd.hxx.
References txpower.
|
inlineoverridevirtual |
Sets the transmit sampling rate for the virtual SDR.
txRate | The new transmit sampling rate. |
Implements SDRFrontEndConfigurations.
Definition at line 186 of file VirtualSDRFrontEnd.hxx.
References txSamplingRate.
Referenced by applyPreset().
|
inlineoverridevirtual |
Checks if the virtual SDR supports Automatic Gain Control (AGC).
Implements SDRFrontEndConfigurations.
Definition at line 259 of file VirtualSDRFrontEnd.hxx.
|
inlineoverridevirtual |
Simulates signal transmission (no actual operation).
signals | Vector of pointers to signal buffers for each channel. |
bufferLength | Number of signal samples per channel. |
postfixDuration | Additional time to wait after transmission (in seconds). |
Implements AbstractSDRFrontEnd.
Definition at line 36 of file VirtualSDRFrontEnd.hxx.
|
protected |
Carrier frequency (Hz).
Definition at line 385 of file VirtualSDRFrontEnd.hxx.
Referenced by getRxCarrierFrequencies(), getTxCarrierFrequencies(), setRxCarrierFrequencies(), and setTxCarrierFrequencies().
|
protected |
Channel flags (define channel mode, etc.).
Definition at line 391 of file VirtualSDRFrontEnd.hxx.
Referenced by getChannelFlags().
|
protected |
Clock source ("internal", "external", etc.).
Definition at line 392 of file VirtualSDRFrontEnd.hxx.
Referenced by getClockSource(), and setClockSource().
|
protected |
Control channel frequency (Hz).
Definition at line 388 of file VirtualSDRFrontEnd.hxx.
Referenced by getControlChannelFrequency(), and setControlChannelFrequency().
|
protected |
Hardware filter bandwidth (Hz).
Definition at line 399 of file VirtualSDRFrontEnd.hxx.
Referenced by getFilterBandwidth(), and setFilterBandwidth().
|
protected |
Master clock rate (Hz).
Definition at line 396 of file VirtualSDRFrontEnd.hxx.
Referenced by getMasterClockRate(), and setMasterClockRate().
|
protected |
List of receive antenna names.
Definition at line 398 of file VirtualSDRFrontEnd.hxx.
Referenced by getRxAntennas(), and setRxAntennas().
|
protected |
Receive carrier frequency offset (Hz).
Definition at line 394 of file VirtualSDRFrontEnd.hxx.
|
protected |
Receive channel bandwidth mode.
Definition at line 395 of file VirtualSDRFrontEnd.hxx.
|
protected |
Receive gain (dB).
Definition at line 390 of file VirtualSDRFrontEnd.hxx.
Referenced by getRxGain(), setRxGain(), and setRxGain().
|
protected |
Receive sampling rate (Hz).
Definition at line 387 of file VirtualSDRFrontEnd.hxx.
Referenced by getRxSamplingRate(), and setRxSamplingRate().
|
protected |
Time source ("internal", "gpsdo", etc.).
Definition at line 393 of file VirtualSDRFrontEnd.hxx.
Referenced by getTimeSource(), and setTimeSource().
|
protected |
List of transmit antenna names.
Definition at line 397 of file VirtualSDRFrontEnd.hxx.
Referenced by getTxAntennas(), and setTxAntennas().
|
protected |
Transmit power (dBm or linear unit, context-dependent).
Definition at line 389 of file VirtualSDRFrontEnd.hxx.
Referenced by getTxpower(), and setTxpower().
|
protected |
Transmit sampling rate (Hz).
Definition at line 386 of file VirtualSDRFrontEnd.hxx.
Referenced by getTxSamplingRate(), and setTxSamplingRate().