5#ifndef PICOSCENES_PLATFORM_FRONTENDCONFIGURATIONS_HXX
6#define PICOSCENES_PLATFORM_FRONTENDCONFIGURATIONS_HXX
9#include "ModularPicoScenesFrame.hxx"
10#include "ExtraInfoSegment.hxx"
36 virtual void applyPreset(
const std::string &presetName,
bool skipChangeRate =
false) = 0;
65 virtual int setChannelAndBandwidth(std::optional<double> control, std::optional<double> bw, std::optional<double> center) = 0;
150 virtual void setRxGain(
double rxGain, uint8_t channel) = 0;
199 std::vector<size_t> channels;
200 for (
auto i = 0; i < numTxChannels; i++)
201 channels.emplace_back(i);
223 std::vector<size_t> channels;
224 for (
auto i = 0; i < numRxChannels; i++)
225 channels.emplace_back(i);
231 std::vector<size_t> channels;
233 channels.emplace_back(txChannel);
235 channels.emplace_back(rxChannel);
237 std::sort(channels.begin(), channels.end());
238 channels.erase(std::unique(channels.begin(), channels.end()), channels.end());
This class holds the common hardware configuration setters/getters for ALL types of frontend (SDR or ...
std::vector< std::array< uint8_t, 6 > > sourceAddressFilterList
the source addresses to be filtered
virtual uint8_t getRxChainMask()=0
Get Rx chain mask.
std::vector< std::array< uint8_t, 6 > > destinationAddressFilterList
the destination addressed to be filtered
virtual void setCarrierFrequency(double carrierFrequency)=0
Get the RF carrier frequency.
void setNumRxChannels(const uint8_t numRxChannels)
Set the number of Rx channels, the active channels start from 0.
virtual double getTxpower()=0
get the transmission power (Tx power)
virtual double getCarrierFrequency()=0
Get the RF carrier frequency.
virtual std::vector< size_t > getTxChannels()=0
Get the numbers of the active Tx channels, starting from 0.
virtual void setRxGain(double rxGain, uint8_t channel)=0
Set the Rx gain for the specified channel. However, currently only QCA9300 and SDR frontend support t...
virtual uint16_t getChannelFlags()=0
Get the old ChannelFlags descriptor.
virtual void applyPreset(const std::string &presetName, bool skipChangeRate=false)=0
Apply a preset configuration to the frontend hardware.
virtual void setRxChainMask(uint8_t rxChainMask)=0
Set Rx chain mask. Setting Rx chain mask means to use only the selected Rx chains for signal receptio...
virtual void setTxChainMask(uint8_t txChainMask)=0
Set Tx chain mask. Setting Tx chain mask means to use only the selected Tx chain for signal transmiss...
virtual uint16_t getAndIncreasePerFrontEndTxFrameSequenceNumber()
virtual bool isHardwareSupportedPreset(const std::string &presetName)=0
Check if a preset configuration is supported by the hardware.
virtual void setRxGain(double rxGain)=0
Set the total Rx gain. However, currently only QCA9300 and SDR frontend support this method.
virtual void setDestinationMACAddressFilter(const std::vector< std::array< uint8_t, 6 > > &addresses)
Set the DESTINATION addresses that will be blocked by the frontend.
virtual uint8_t getTxChainMask()=0
Get the Tx chain mask.
virtual void setSourceMACAddressFilter(const std::vector< std::array< uint8_t, 6 > > &addresses)
Set the SOURCE addresses that will be blocked by the frontend.
std::vector< size_t > getAllChannels()
virtual ExtraInfo buildExtraInfo()=0
Build an ExtraInfo object describing the current frontend status.
virtual void setTxpower(double txpower)=0
Set the Tx power (in dB)
virtual void setSamplingRate(double samplingRate)=0
set sampling rate (in Hz)
virtual double getRxGain()=0
Get the total Rx gain. However, currently only QCA9300 and SDR frontend support this method.
virtual int setChannelAndBandwidth(double control, double bw, double center)=0
Set the <contorlfreq-bandwidth-centerfreq> channel parameter.
virtual ModularPicoScenesTxFrame initializeTxFrame()=0
virtual void setRxChannelBandwidth(double rxcbw)=0
Set the Rx channel bandwidth parameter of the <contorlfreq-bandwidth-centerfreq> channel parameters.
virtual void setRxChannels(const std::vector< size_t > &rxChannels)=0
Set the number of the active Rx channels, starting from 0.
virtual double getRxChannelBandwidth()=0
Get the 802.11 Channel Bandwidth parameter (20e6/40e6/80e6/160e6/320e6) of the Rx path.
virtual int setChannelAndBandwidth(std::optional< double > control, std::optional< double > bw, std::optional< double > center)=0
Set the <contorlfreq-bandwidth-centerfreq> channel parameter, but with optional.
void setNumTxChannels(const uint8_t numTxChannels)
Set the number of Tx channels, the active channels start from 0.
virtual std::vector< size_t > getRxChannels()=0
Get the number of the active Rx channels, starting from 0.
virtual void setTxChannels(const std::vector< size_t > &txChannels)=0
This methods is fundamentally.
virtual void setControlChannelFrequency(double controlFrequency)=0
Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter.
virtual std::tuple< double, double, double > getChannelAndBandwidth()=0
Get the <contorlfreq-bandwidth-centerfreq> channel parameter.
virtual ~FrontEndConfigurations()=default
virtual double getSamplingRate()=0
Get the baseband sampling rate.
virtual double getControlChannelFrequency()=0
Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter.
uint16_t currentTxSequenceNumber
current Tx sequence number