5#ifndef PICOSCENES_PLATFORM_ABSTRACTSDRFRONTEND_HXX
6#define PICOSCENES_PLATFORM_ABSTRACTSDRFRONTEND_HXX
14#include "BBSignalsFileWriter.hxx"
42 virtual CS16Vector
generateSignal(
const ModularPicoScenesTxFrame& frame, uint8_t numTxAntenna) = 0;
50 auto numSamples =
static_cast<int64_t
>(signals.size()) / numTxAntenna;
52 std::vector multiChannelSignals(numTxAntenna, CS16Vector(numSamples));
53 for (
auto channelIndex = 0; channelIndex < numTxAntenna; channelIndex++) {
54 Intrinsics::fastCopyN(signals.cbegin() + numSamples * channelIndex, numSamples, multiChannelSignals[channelIndex].begin());
57 return multiChannelSignals;
69 virtual void prebuildSignals(ModularPicoScenesTxFrame& frame,
const uint8_t numTxAntenna) {
82 virtual int32_t
transmitSignals(
const std::vector<const void*>& signals, int64_t bufferLength,
double postfixDuration) = 0;
84 virtual int transmitSignalsContinuously(
const std::vector<const void*>& multiChannelHeaders, int64_t numSignalsPerAntenna,
bool burstStart,
bool burstEnd) = 0;
95 int transmit(
const ModularPicoScenesTxFrame& frame)
override {
96 static std::shared_ptr<BBSignalsFileWriter<std::complex<int16_t>>> signalWriter;
102 signalWriter = std::make_shared<BBSignalsFileWriter<std::complex<int16_t>>>(*txSignalDumpFilePath);
107 std::vector<CS16Vector> inplaceGeneratedSignals{};
108 if (frame.prebuiltSignals.empty()) {
110 txResult =
transmitSignal(inplaceGeneratedSignals, frame.txParameters.postfixPaddingTime);
112 txResult =
transmitSignal(frame.prebuiltSignals, frame.txParameters.postfixPaddingTime);
114 const auto& ref2Signals = !frame.prebuiltSignals.empty() ? frame.prebuiltSignals : inplaceGeneratedSignals;
129 virtual size_t transmitSignal(
const CS16Vector& signals,
const uint8_t numTxChannels,
const double postfixDuration) {
130 int64_t numSignalsPerAntenna = signals.size() / numTxChannels;
132 auto signalHeaders = std::vector<const void*>(numTxChannels);
133 for (
auto channelIndex = 0; channelIndex < numTxChannels; channelIndex++) {
134 signalHeaders[channelIndex] = signals.data() + channelIndex * numSignalsPerAntenna;
137 return transmitSignals(signalHeaders, numSignalsPerAntenna, postfixDuration);
140 virtual size_t transmitSignal(
const std::vector<CS16Vector>& multiChannelSignals,
const double postfixDuration) {
141 int64_t numSignalsPerAntenna = multiChannelSignals[0].size();
142 uint8_t numTxChannels = multiChannelSignals.size();
144 auto signalHeaders = std::vector<const void*>(numTxChannels);
145 for (
auto channelIndex = 0; channelIndex < numTxChannels; channelIndex++) {
146 signalHeaders[channelIndex] = multiChannelSignals[channelIndex].data();
149 return transmitSignals(signalHeaders, numSignalsPerAntenna, postfixDuration);
152 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;
154 int transmitFramesInBatch(
const std::vector<const ModularPicoScenesTxFrame*>& frames,
const uint32_t repeat)
override {
155 static std::shared_ptr<BBSignalsFileWriter<std::complex<int16_t>>> signalWriter;
161 signalWriter = std::make_shared<BBSignalsFileWriter<std::complex<int16_t>>>(*txSignalDumpFilePath);
164 std::vector<std::vector<CS16Vector>> frameSignals;
165 std::vector<std::vector<const void*>> frameSignalHeads;
166 std::vector<int64_t> framePPDULengths;
167 std::vector<double> framePostfixDurations;
168 for (
const auto* frame: frames) {
169 if (!frame->prebuiltSignals.empty()) {
170 std::vector<const void*> signalHeaders;
171 signalHeaders.reserve(frame->prebuiltSignals.size());
172 for (
const auto& column: frame->prebuiltSignals)
173 signalHeaders.emplace_back(column.data());
174 frameSignalHeads.emplace_back(signalHeaders);
175 framePPDULengths.emplace_back(frame->prebuiltSignals.at(0).size());
176 framePostfixDurations.emplace_back(frame->txParameters.postfixPaddingTime);
179 std::vector<const void*> signalHeaders;
180 for (
const auto& column: frameSignals.back())
181 signalHeaders.emplace_back(column.data());
182 frameSignalHeads.emplace_back(signalHeaders);
183 framePPDULengths.emplace_back(frameSignals.back().at(0).size());
184 framePostfixDurations.emplace_back(frame->txParameters.postfixPaddingTime);
190 auto totalTransmitSamples = [&] {
192 for (
auto i = 0; i < framePPDULengths.size(); i++) {
193 total += framePPDULengths[i] +
static_cast<int64_t
>(std::round(framePostfixDurations[i] *
getTxSamplingRate()));
223 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>>) && ...)>>
225 return AbstractFrontEnd::transmitFramesInBatch<repeat>(std::forward<Frames>(frames)...);
352 if (txRate == rxRate)
429 std::bitset<8> txcmBits;
431 txcmBits.set(txch,
true);
433 return txcmBits.to_ulong();
437 std::bitset<8> txcmBits{txChainMask};
438 std::vector<size_t> newTxChannels;
439 for (
size_t i = 0; i < txcmBits.size(); i++) {
441 newTxChannels.emplace_back(i);
447 std::bitset<8> rxcmBits;
449 rxcmBits.set(rxch,
true);
451 return rxcmBits.to_ulong();
455 std::bitset<8> rxcmBits{rxChainMask};
456 std::vector<size_t> newRxChannels;
457 for (
size_t i = 0; i < rxcmBits.size(); i++) {
459 newRxChannels.emplace_back(i);
468 [[deprecated(
"Use 'const std::vector<size_t>& userSpecifiedTxChannels() const' instead")]]
475 std::stringstream ss;
477 if (!txChannelsN.empty()) {
488 [[deprecated(
"Use 'const std::vector<size_t>& userSpecifiedRxChannels() const' instead")]]
495 std::stringstream ss;
497 if (!rxChannelsN.empty()) {
526 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
530 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
534 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
538 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
541 int setChannelAndBandwidth(std::optional<double> control, std::optional<double> bw, std::optional<double> center)
override {
542 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
545 [[deprecated(
"Use 'getTxCarrierFrequencies' or 'getRxCarrierFrequencies' instead")]]
566 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
570 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
574 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
578 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
582 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
586 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
590 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
594 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
597 void setRxGain(
double rxGain, uint8_t channel)
override {
598 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
602 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
606 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
610 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
614 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
618 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
622 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
626 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
630 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
634 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
638 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
642 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
646 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
666 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
670 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
674 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
678 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
682 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
686 throw std::runtime_error(fmt::format(
"<{}> does not support operation: {}.",
getReferredInterfaceName(), std::string(BOOST_CURRENT_FUNCTION)));
719 ChannelBandwidthEnum
rxCBW{ChannelBandwidthEnum::CBW_20};
#define LoggingService_SDR_warning_printf(...)
#define LoggingService_SDR_debug_printf(...)
#define LoggingService_SDR_info_print(...)
#define LoggingService_SDR_warning_print(...)
SDRFrontEndTransferType
Enumeration for SDR frontend data transfer type.
The shared abstract frontend interface for both SDR and NIC.
PicoScenesDeviceSubtype getFrontEndSubtype() const
Return the PicoScenesDeviceType subtype of this frontend.
std::string referredInterfaceName
the user specified frontend name
virtual int startTx()
Activate internal Tx service loop.
PicoScenesFrameTxParameters & getUserSpecifiedTxParameters()
bool txServiceStarted
indicate whether Tx service is running
PicoScenesFrameTxParameters userSpecifiedTxParameters
user-specified Tx parameters
PicoScenesDeviceType getFrontEndType() const
Return the PicoScenesDeviceType of this frontend.
const std::string & getReferredInterfaceName() const
Get the user-specified frontend name.
The shared abstract frontend for SDR devices only.
double getRxGain() override
Get the total Rx gain. However, currently only QCA9300 and SDR frontend support this method.
void setTxpower(double txpower) override
Set the Tx power (in dB)
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 receptio...
void refreshHardwareInfoForAGCSupport() override
Refresh AGC support information.
std::string getRxAntenna() override
Get the current Rx antenna.
virtual std::optional< double > getCurrentNoiseFloor()=0
double getTxpower() override
get the transmission power (Tx power)
virtual void prebuildSignals(ModularPicoScenesTxFrame &frame, const uint8_t numTxAntenna)
Generate the baseband signal via AbstractSDRFrontEnd::generateSignal and save the data into the prebu...
void setCarrierFrequencyOffset4TxEncoding(double carrierFrequencyOffset) override
Set the carrier frequency offset for Tx encoding.
std::optional< uint32_t > txSignalReplayDelay_ms
int transmitFramesInBatch(const std::vector< const ModularPicoScenesTxFrame * > &frames, const uint32_t repeat) override
Transmit frames in batch with precise inter-frame timing.
std::string getTxAntenna() override
Get the current Tx antenna.
virtual void clearTxStatus()=0
void setMasterClockRate(double masterClockRate) override
Set the master clock rate.
double getRxIqCrossTalkDegree() override
Get the I/Q crosstalk angle for Rx.
const std::vector< size_t > & userSpecifiedRxChannels() const override
Get the list of user-specified Rx channels.
std::optional< double > rxSamplingFrequencyOffset
void setSamplingFrequencyOffset4RxDecoding(double samplingFrequencyOffset) override
Set the sampling frequency offset for Rx decoding.
void setCarrierFrequency(double carrierFrequency) override
Get the RF carrier frequency.
std::optional< double > getCarrierFrequencyOffset4TxEncoding() override
Get the carrier frequency offset for Tx encoding.
void setCarrierFrequencyOffset4RxDecoding(double rxCarrierFrequencyOffsetV) override
Set the carrier frequency offset for Rx decoding.
void refreshHardwareInfoForClockAndTimeSources() override
Refresh clock and time sources information.
void setTxSplitHighLow(const bool split) override
Set whether to split high/low for Tx.
double getTxIqCrossTalkDegree() override
Get the I/Q crosstalk angle for Tx.
virtual SDRFrontEndTxStatus getLastTxStatus() const =0
void refreshHardwareInfoForSamplingRateRanges() override
Refresh sampling rate ranges information.
void setRxAntennas(const std::vector< std::string > &rxAnts) override
Set antennas for all Rx chains.
void setRxChannelBandwidthMode(ChannelBandwidthEnum rxCbw) override
Set the channel bandwidth mode for Rx.
void setTransferType(const SDRFrontEndTransferType transferTypeV) override
Set the transfer type.
void setTxSignalReplayDelayMs(const std::optional< uint32_t > &txSignalReplayDelayMs)
void setTxResampleRatio(double txResampleRatioV) override
Set the Tx resampling ratio.
void setRxResampleBypassFIR(const bool bypass) override
Set whether to bypass FIR filter in Rx resampling.
void setRxSignalDumpDelayedStartDuration(const double delayedStartDuration)
std::string getClockSource() override
Get the current clock source.
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
void setRxChannels(const std::vector< size_t > &rxChannelsN) override
Set the number of the active Rx channels, starting from 0.
std::vector< std::string > getTxAntennas() override
Get list of available Tx antennas.
void setRxOfdmSymbolOffset(const double rxOfdmSymbolOffset) override
Set the Rx OFDM symbol offset.
int setChannelAndBandwidth(double control, double bw, double center) override
Set the <contorlfreq-bandwidth-centerfreq> channel parameter.
double getTxResampleRatio() override
Get the Tx resampling ratio.
double getSDRFrontEndTime() override
Get the current SDR hardware time.
double rxIQMismatchRatioDb
virtual int transmitSignalsContinuously(const std::vector< const void * > &multiChannelHeaders, int64_t numSignalsPerAntenna, bool burstStart, bool burstEnd)=0
std::vector< size_t > rxChannels
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 transmiss...
int transmitFramesInBatch(Frames &&... frames)
AbstractSDRFrontEnd(const std::string &referredInterfaceName)
Create AbstractSDRFrontEnd object according to the user-specified frontend name referredInterfaceName...
void setRxGain(double rxGain) override
Set the total Rx gain. However, currently only QCA9300 and SDR frontend support this method.
std::optional< std::string > rxSignalReplayFilePath
int setChannelAndBandwidth(std::optional< double > control, std::optional< double > bw, std::optional< double > center) override
Set the <contorlfreq-bandwidth-centerfreq> channel parameter, but with optional.
std::vector< size_t > getTxChannels() override
Get the numbers of the active Tx channels, starting from 0.
void setFilterBandwidth(double bw) override
Set the filter bandwidth.
ExtraInfo buildExtraInfo() override
Build an ExtraInfo object describing the current frontend status.
double getTxIqRatioDB() override
Get the I/Q ratio for Tx in dB.
void refreshHardwareInfoForSupportedAntennas() override
Refresh supported antennas information.
SDRFrontEndTransferType transferType
double getCarrierFrequency() override
Get the RF carrier frequency.
void setRxAntenna(const std::string &rxAnt) override
Set the Rx antenna.
double rxIQMismatchRatioDegree
void setTxAntenna(const std::string &txAnt) override
Set the Tx antenna.
std::vector< std::vector< size_t > > getRxPipelineChannels() override
double rxOFDMSymbolOffset
double getSamplingRate() override
Get the baseband sampling rate.
std::optional< std::string > txSignalDumpFilePath
void setRxSensitivity(const double rxSensitivityV) override
Set the receiver sensitivity.
void setRxResampleRatio(double rxResampleRatioV) override
Set the Rx resampling ratio.
void setFullDuplex(const bool enableFullDuplex) override
Set full duplex mode.
virtual size_t transmitSignal(const CS16Vector &signals, const uint8_t numTxChannels, const double postfixDuration)
void refreshHardwareInfoForFrequencyRanges() override
Refresh frequency ranges information.
void setRxSignalDumpFilePath(const std::string &rxSignalDumpFilePathV)
double getRxOfdmSymbolOffset() override
Get the Rx OFDM symbol offset.
std::tuple< double, double, double > getChannelAndBandwidth() override
Get the <contorlfreq-bandwidth-centerfreq> channel parameter.
std::vector< std::string > getClockSources() override
Get list of current clock sources.
std::optional< double > rxCarrierFrequencyOffset
double getRxResampleRatio() override
Get the Rx resampling ratio.
std::vector< size_t > getRxChannels() override
Get the number of the active Rx channels, starting from 0.
void setTxSignalDumpFilePath(const std::string &txSignalDumpFilePathV)
void refreshHardwareInfoForFrontEndProfiles() override
Refresh frontend profiles information.
void refreshHardwareInfoForSensors() override
Refresh sensors information.
void setClockSources(const std::vector< std::string > &clockSources) override
Set clock sources for multiple motherboards.
uint8_t getRxChainMask() override
Get Rx chain mask.
std::optional< std::string > rxSignalDumpFilePath
std::optional< double > getSamplingFrequencyOffset4TxEncoding() override
Get the sampling frequency offset for Tx encoding.
void refreshHardwareInfoForMasterClockRates() override
Refresh master clock rates information.
const std::vector< size_t > & userSpecifiedTxChannels() const override
Get the list of user-specified Tx channels.
void setSamplingFrequencyOffset4TxEncoding(double samplingFrequencyOffset) override
Set the sampling frequency offset for Tx encoding.
void setRxMergeHighLow(const bool merge) override
Set whether to merge high/low for Rx.
void refreshHardwareInfoForGainRanges() override
Refresh gain ranges information.
uint8_t numDecodingThreads
ChannelBandwidthEnum rxCBW
void setTxIQMismatch(double iq_ratio_db, double iq_crosstalk_degree) override
Set I/Q mismatch parameters for Tx.
ChannelBandwidthEnum getRxChannelBandwidthMode() override
Get the current channel bandwidth mode for Rx.
uint8_t getTxChainMask() override
Get the Tx chain mask.
void setSignalReplayFilePath(const std::string &signalReplayFilePath)
bool isFullDuplexEnabled() override
Check if full duplex mode is enabled.
void setRxIQMismatch(double iq_ratio_db, double iq_crosstalk_degree) override
Set I/Q mismatch parameters for Rx.
void setTimeSources(const std::vector< std::string > &timeSources) override
Set time sources for multiple motherboards.
void setRxGain(double rxGain, uint8_t channel) override
Set the Rx gain for the specified channel. However, currently only QCA9300 and SDR frontend support t...
virtual int32_t transmitSignals(const std::vector< const void * > &signals, int64_t bufferLength, double postfixDuration)=0
void setPinelineConfig(std::vector< PipelineConfig > cfgs) override
void printStatus() override
Print a status string to command line.
void setRxPipelineChannels(std::vector< std::vector< size_t > > PipelineChannels) override
void refreshHardwareInfoForSupportedChannels() override
Refresh supported channels information.
std::string getTimeSource() override
Get the current time source.
double getFilterBandwidth() override
Get the current filter bandwidth.
double getNumSamplesSavedBeforeStart() override
Get the number of samples saved before start.
std::optional< double > getCarrierFrequencyOffset4RxDecoding() override
Get the carrier frequency offset for Rx decoding.
void setControlChannelFrequency(double controlFrequency) override
Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter.
std::vector< std::vector< size_t > > rxPipelineChannels
void refreshHardwareInfoForTemperatures() override
Refresh temperature readings.
virtual CS16Vector generateSignal(const ModularPicoScenesTxFrame &frame, uint8_t numTxAntenna)=0
Generate the baseband signal for ModularPicoScenesTxFrame frame with an optional numTxAntenna specify...
void setTxAntennas(const std::vector< std::string > &txAnts) override
Set antennas for all Tx chains.
void setNumThreads4RxDecoding(const uint8_t numThreads) override
Set the number of threads for Rx decoding.
std::vector< PipelineConfig > getPinelineConfig() override
std::vector< size_t > txChannels
double getMasterClockRate() override
Get the master clock rate.
double getRxSensitivity() override
Get the receiver sensitivity.
bool isRxResampleBypassFIR() override
Check if FIR filter is bypassed in Rx resampling.
std::vector< std::string > getRxAntennas() override
Get list of available Rx antennas.
uint16_t getChannelFlags() override
Get the old ChannelFlags descriptor.
void setClockSource(const std::string &clockSource) override
Set the clock source.
std::vector< PipelineConfig > rxPipelineConfigs
double numSamplesSavedBeforeStart
double getRxChannelBandwidth() override
Get the 802.11 Channel Bandwidth parameter (20e6/40e6/80e6/160e6/320e6) of the Rx path.
int transmit(const ModularPicoScenesTxFrame &frame) override
Transmit a ModularPicoScenesTxFrame frame via current frontend hardware.
std::optional< double > getSamplingFrequencyOffset4RxDecoding() override
Get the sampling frequency offset for Rx decoding.
void setTxChannels(const std::vector< size_t > &txChannelsN) override
This methods is fundamentally.
std::optional< double > rxSignalDumpDelayedStartDuration
virtual std::vector< CS16Vector > generateMultiChannelSignals(const ModularPicoScenesTxFrame &frame, const uint8_t numTxAntenna)
Generate the baseband signal via AbstractSDRFrontEnd::generateSignal, convert to SignalType type,...
void setSamplingRate(double samplingRate) override
set sampling rate (in Hz)
bool isRxMergeHighLow() override
Check if high/low merge is enabled for Rx.
void setTimeSource(const std::string &timeSource) override
Set the time source.
void setRxChannelBandwidth(double rxcbw) override
Set the Rx channel bandwidth parameter of the <contorlfreq-bandwidth-centerfreq> channel parameters.
void refreshHardwareInfoForBoards() override
Refresh boards information.
SDRFrontEndTransferType getTransferType() const override
Get the current transfer type.
void getNumSamplesSavedBeforeStart(const double numSamplesSavedBeforeStartV) override
Set the number of samples saved before start.
std::vector< std::string > getTimeSources() override
Get list of current time sources.
double getControlChannelFrequency() override
Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter.
bool isTxSplitHighLow() override
Check if high/low split is enabled for Tx.
double getRxIqRatioDB() override
Get the I/Q ratio for Rx in dB.
virtual size_t transmitSignal(const std::vector< CS16Vector > &multiChannelSignals, const double postfixDuration)
virtual int transmitSignalsFromFile(const std::string &signalSourceFile, uint64_t repeat)=0
Transmits baseband signals from a .bbsignals file.
static const std::string SDR_Tx2File
static std::shared_ptr< LicenseService > getInstance()
Configuration class for SDR frontend hardware settings.
virtual void setRxSamplingRate(double rxRate)=0
Set the Rx sampling rate.
virtual void setTxSamplingRate(double txRate)=0
Set the Tx sampling rate.
virtual double getTxSamplingRate()=0
Get the current Tx sampling rate.
virtual void setRxCarrierFrequencies(std::vector< double > carrierFreqs)=0
Set carrier frequencies for Rx channels.
virtual void setTxCarrierFrequencies(std::vector< double > carrierFreqs)=0
Set carrier frequencies for Tx channels.
virtual std::vector< double > getTxCarrierFrequencies()=0
Get carrier frequencies for Tx channels.
virtual std::vector< double > getRxCarrierFrequencies()=0
Get carrier frequencies for Rx channels.
virtual double getRxSamplingRate()=0
Get the current Rx sampling rate.
OutputIterator fastCopyN(InputIterator first, std::size_t count, OutputIterator result)
Structure containing transmission status information for SDR frontend.