This class holds the common hardware configuration setters/getters for ALL types of frontend (SDR or NIC). More...
#include <FrontEndConfigurations.hxx>
Public Member Functions | |
virtual | ~FrontEndConfigurations ()=default |
virtual ExtraInfo | buildExtraInfo ()=0 |
Build an ExtraInfo object describing the current frontend status. | |
virtual bool | isHardwareSupportedPreset (const std::string &presetName)=0 |
Check if a preset configuration is supported by the hardware. | |
virtual void | applyPreset (const std::string &presetName, bool skipChangeRate=false)=0 |
Apply a preset configuration to the frontend hardware. | |
virtual std::tuple< double, double, double > | getChannelAndBandwidth ()=0 |
Get the <contorlfreq-bandwidth-centerfreq> channel parameter. | |
virtual int | setChannelAndBandwidth (double control, double bw, double center)=0 |
Set the <contorlfreq-bandwidth-centerfreq> channel parameter. | |
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. | |
virtual double | getCarrierFrequency ()=0 |
Get the RF carrier frequency. | |
virtual void | setCarrierFrequency (double carrierFrequency)=0 |
Get the RF carrier frequency. | |
virtual double | getSamplingRate ()=0 |
Get the baseband sampling rate. | |
virtual void | setSamplingRate (double samplingRate)=0 |
set sampling rate (in Hz) | |
virtual double | getControlChannelFrequency ()=0 |
Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter. | |
virtual void | setControlChannelFrequency (double controlFrequency)=0 |
Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter. | |
virtual double | getRxChannelBandwidth ()=0 |
Get the 802.11 Channel Bandwidth parameter (20e6/40e6/80e6/160e6/320e6) of the Rx path. | |
virtual void | setRxChannelBandwidth (double rxcbw)=0 |
Set the Rx channel bandwidth parameter of the <contorlfreq-bandwidth-centerfreq> channel parameters. | |
virtual double | getTxpower ()=0 |
get the transmission power (Tx power) | |
virtual void | setTxpower (double txpower)=0 |
Set the Tx power (in dB) | |
virtual double | getRxGain ()=0 |
Get the total Rx gain. However, currently only QCA9300 and SDR frontend support this method. | |
virtual void | setRxGain (double rxGain)=0 |
Set the total Rx gain. However, currently only QCA9300 and SDR frontend support this method. | |
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 this method. | |
virtual uint8_t | getTxChainMask ()=0 |
Get the Tx chain mask. | |
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 transmission. | |
virtual uint8_t | getRxChainMask ()=0 |
Get Rx chain mask. | |
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 reception. | |
virtual std::vector< size_t > | getTxChannels ()=0 |
Get the numbers of the active Tx channels, starting from 0. | |
virtual void | setTxChannels (const std::vector< size_t > &txChannels)=0 |
This methods is fundamentally. | |
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 | setRxChannels (const std::vector< size_t > &rxChannels)=0 |
Set the number of the active Rx channels, starting 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 uint16_t | getChannelFlags ()=0 |
Get the old ChannelFlags descriptor. | |
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 ModularPicoScenesTxFrame | initializeTxFrame ()=0 |
Protected Attributes | |
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 | |
This class holds the common hardware configuration setters/getters for ALL types of frontend (SDR or NIC).
Definition at line 15 of file FrontEndConfigurations.hxx.
|
virtualdefault |
|
pure virtual |
Apply a preset configuration to the frontend hardware.
presetName | The name of the preset configuration to apply |
skipChangeRate | Whether to skip changing the sampling rate, default is false |
Implemented in VirtualSDRFrontEnd.
|
pure virtual |
Build an ExtraInfo object describing the current frontend status.
Implemented in AbstractSDRFrontEnd, MAC80211InjectionOnlyFrontEnd, and VirtualSDRFrontEnd.
|
inline |
Definition at line 230 of file FrontEndConfigurations.hxx.
References getRxChannels(), and getTxChannels().
|
inlinevirtual |
Return the Tx sequence number and increase by 1. The sequence number is used to fill the sequence field of 802.11 MPDU header.
Definition at line 273 of file FrontEndConfigurations.hxx.
References currentTxSequenceNumber.
|
pure virtual |
Get the RF carrier frequency.
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Get the <contorlfreq-bandwidth-centerfreq> channel parameter.
Implemented in AbstractSDRFrontEnd, MAC80211InjectionOnlyFrontEnd, and VirtualSDRFrontEnd.
|
pure virtual |
Get the old ChannelFlags descriptor.
Implemented in AbstractSDRFrontEnd, MAC80211InjectionOnlyFrontEnd, and VirtualSDRFrontEnd.
|
pure virtual |
Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter.
Implemented in AbstractSDRFrontEnd, MAC80211InjectionOnlyFrontEnd, and VirtualSDRFrontEnd.
|
pure virtual |
Get Rx chain mask.
0/1/2/3-bit for the 0/1/2/3-th radio chain. This method should be based on setTxChannels() internally for SDR frontend.
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Get the 802.11 Channel Bandwidth parameter (20e6/40e6/80e6/160e6/320e6) of the Rx path.
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Get the number of the active Rx channels, starting from 0.
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
Referenced by getAllChannels().
|
pure virtual |
Get the total Rx gain. However, currently only QCA9300 and SDR frontend support this method.
Implemented in AbstractSDRFrontEnd, MAC80211InjectionOnlyFrontEnd, and VirtualSDRFrontEnd.
|
pure virtual |
Get the baseband sampling rate.
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Get the Tx chain mask.
0/1/2/3-bit for the 0/1/2/3-th radio chain; 1 for active and 0 for inactive This method should be based on getTxChannels() internally for SDR frontend.
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Get the numbers of the active Tx channels, starting from 0.
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
Referenced by getAllChannels().
|
pure virtual |
get the transmission power (Tx power)
Implemented in AbstractSDRFrontEnd, MAC80211InjectionOnlyFrontEnd, and VirtualSDRFrontEnd.
|
pure virtual |
Implemented in AbstractFrontEnd.
|
pure virtual |
Check if a preset configuration is supported by the hardware.
presetName | The name of the preset configuration to check |
Implemented in VirtualSDRFrontEnd.
|
pure virtual |
Get the RF carrier frequency.
carrierFrequency | the carrier frequency to be set |
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Set the <contorlfreq-bandwidth-centerfreq> channel parameter.
control | the control channel frequency (in Hz or MHz) |
bw | the bandwidth (in Hz or MHz) |
center | the actual center frequency (in Hz or MHz) |
0
for OK 1
for Error Implemented in VirtualSDRFrontEnd, AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Set the <contorlfreq-bandwidth-centerfreq> channel parameter, but with optional.
control | the control channel frequency |
bw | the bandwidth |
center | the actual center frequency |
0
for OK 1
for Error Implemented in AbstractSDRFrontEnd, MAC80211InjectionOnlyFrontEnd, and VirtualSDRFrontEnd.
|
pure virtual |
Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter.
controlFrequency |
Implemented in VirtualSDRFrontEnd, AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
inlinevirtual |
Set the DESTINATION addresses that will be blocked by the frontend.
addresses | an address vector holding all DESTINATION addresses to be blocked |
Definition at line 262 of file FrontEndConfigurations.hxx.
References destinationAddressFilterList.
|
inline |
Set the number of Rx channels, the active channels start from 0.
numRxChannels |
Definition at line 222 of file FrontEndConfigurations.hxx.
References setRxChannels().
|
inline |
Set the number of Tx channels, the active channels start from 0.
numTxChannels |
Definition at line 198 of file FrontEndConfigurations.hxx.
References setTxChannels().
|
pure virtual |
Set Rx chain mask. Setting Rx chain mask means to use only the selected Rx chains for signal reception.
0/1/2/3-bit for the 0/1/2/3-th radio chain. This method should be based on setRxChannels() internally for SDR frontend.
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Set the Rx channel bandwidth parameter of the <contorlfreq-bandwidth-centerfreq> channel parameters.
rxcbw |
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Set the number of the active Rx channels, starting from 0.
Implemented in MAC80211InjectionOnlyFrontEnd, and AbstractSDRFrontEnd.
Referenced by setNumRxChannels().
|
pure virtual |
Set the total Rx gain. However, currently only QCA9300 and SDR frontend support this method.
This method calls the following method to set same Rx gain for all Rx channels.
rxGain | the Rx Gain to be set (in dB) |
Implemented in VirtualSDRFrontEnd, AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
Set the Rx gain for the specified channel. However, currently only QCA9300 and SDR frontend support this method.
rxGain | the Rx Gain to be set (in dB) |
channel | the specified channel (starting from 0) |
Implemented in VirtualSDRFrontEnd, AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
set sampling rate (in Hz)
samplingRate |
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
inlinevirtual |
Set the SOURCE addresses that will be blocked by the frontend.
addresses | an address vector holding all SOURCE addresses to be blocked |
Definition at line 253 of file FrontEndConfigurations.hxx.
References sourceAddressFilterList.
|
pure virtual |
Set Tx chain mask. Setting Tx chain mask means to use only the selected Tx chain for signal transmission.
0/1/2/3-bit for the 0/1/2/3-th radio chain. This method should be based on setTxChannels() internally for SDR frontend.
txChainMask |
Implemented in AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
pure virtual |
This methods is fundamentally.
txChannels |
Implemented in MAC80211InjectionOnlyFrontEnd, and AbstractSDRFrontEnd.
Referenced by setNumTxChannels().
|
pure virtual |
Set the Tx power (in dB)
txpower
is between [0, 1.0], the actual txpower should be scaled to txpower
x MAX_TXPOWER Implemented in VirtualSDRFrontEnd, AbstractSDRFrontEnd, and MAC80211InjectionOnlyFrontEnd.
|
protected |
current Tx sequence number
Definition at line 282 of file FrontEndConfigurations.hxx.
Referenced by getAndIncreasePerFrontEndTxFrameSequenceNumber().
|
protected |
the destination addressed to be filtered
Definition at line 281 of file FrontEndConfigurations.hxx.
Referenced by setDestinationMACAddressFilter().
|
protected |
the source addresses to be filtered
Definition at line 280 of file FrontEndConfigurations.hxx.
Referenced by setSourceMACAddressFilter().