PicoScenes API Docs
 
Loading...
Searching...
No Matches
IWLMVMFrontEnd Class Reference

#include <IWLMVMFrontEnd.hxx>

Inheritance diagram for IWLMVMFrontEnd:
Collaboration diagram for IWLMVMFrontEnd:

Public Member Functions

 IWLMVMFrontEnd (const std::string &referredInterfaceName)
 
- Public Member Functions inherited from MAC80211CSIExtractableFrontEnd
 MAC80211CSIExtractableFrontEnd (const std::string &referredInterfaceName)
 
int startRx () override
 Activiate the Rx service loop.
 
virtual void setFrameTypeFilter (const std::vector< uint8_t > &frameTypes)
 
- Public Member Functions inherited from MAC80211InjectionOnlyFrontEnd
int startTx () override
 Activate internal Tx service loop.
 
int stopTx () override
 De-activate Tx service loop.
 
int startRx () override
 Activiate the Rx service loop.
 
int stopRx () override
 De-activate the Rx service loop, set rxServiceStarted to false.
 
int transmit (const ModularPicoScenesTxFrame &frame) override
 
int transmitFramesInBatch (const std::vector< const ModularPicoScenesTxFrame * > &frames, uint32_t repeat) override
 Transmit frames in batch with precise inter-frame timing.
 
int transmitFramesInBatch (const std::vector< ModularPicoScenesTxFrame > &frames, uint32_t repeat) override
 
 ~MAC80211InjectionOnlyFrontEnd () override
 
const std::string & getDevId () const
 
const std::string & getMonId () const
 
uint16_t getPhyIdNumber () const
 
const std::string & getPhyPath () const
 
const std::array< uint8_t, 6 > & getMacAddressMon () const
 
const std::array< uint8_t, 6 > & getMacAddressDev () const
 
std::tuple< double, double, double > getChannelAndBandwidth () override
 Get the <contorlfreq-bandwidth-centerfreq> channel parameter.
 
int setChannelAndBandwidth (double control, double bw, double center) override
 Set the <contorlfreq-bandwidth-centerfreq> channel parameter.
 
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.
 
double getCarrierFrequency () override
 Get the RF carrier frequency.
 
void setCarrierFrequency (double carrierFrequency) override
 Get the RF carrier frequency.
 
double getSamplingRate () override
 Get the baseband sampling rate.
 
void setSamplingRate (double samplingRate) override
 set sampling rate (in Hz)
 
double getControlChannelFrequency () override
 Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter.
 
void setControlChannelFrequency (double controlFrequency) override
 Get the control channel frequency of <contorlfreq-bandwidth-centerfreq> channel parameter.
 
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.
 
double getTxpower () override
 get the transmission power (Tx power)
 
void setTxpower (double txpower) override
 Set the Tx power (in dB)
 
double getRxGain () override
 Get the total Rx gain. However, currently only QCA9300 and SDR frontend support this method.
 
void setRxGain (double rxGain) override
 Set the total Rx gain. However, currently only QCA9300 and SDR frontend support this method.
 
void setRxGain (double rxGain, uint8_t channel) override
 Set the Rx gain for the specified channel. However, currently only QCA9300 and SDR frontend support this method.
 
uint8_t getTxChainMask () override
 Get the Tx chain mask.
 
void setTxChainMask (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 (uint8_t rxChainMask) override
 Set Rx chain mask. Setting Rx chain mask means to use only the selected Rx chains for signal reception.
 
std::vector< size_t > getTxChannels () override
 Get the numbers of the active Tx channels, starting from 0.
 
void setTxChannels (const std::vector< size_t > &txChannels) override
 This methods is fundamentally.
 
std::vector< size_t > getRxChannels () override
 Get the number of the active Rx channels, starting from 0.
 
void setRxChannels (const std::vector< size_t > &rxChannels) override
 Set the number of the active Rx channels, starting from 0.
 
uint16_t getChannelFlags () override
 Get the old ChannelFlags descriptor.
 
ExtraInfo buildExtraInfo () override
 Build an ExtraInfo object describing the current frontend status.
 
const std::vector< double > & getSystemSupportedFrequencies () const
 
bool isMAC80211SupportedCarrierFrequency (double frequency) const
 
void printStatus () override
 Print a status string to command line.
 
- Public Member Functions inherited from AbstractFrontEnd
 AbstractFrontEnd (const std::string &referredInterfaceName)
 Create AbstractFrontEnd object according to the user-specified frontend name referredInterfaceName.
 
virtual bool isTxServiceStarted () const
 Returns whether Tx service is started.
 
virtual int pauseTx ()
 Pause Tx service loop.
 
virtual int resumeTx ()
 Resume Tx service loop.
 
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 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
 
- Public Member Functions inherited from FrontEndConfigurations
virtual ~FrontEndConfigurations ()=default
 
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.
 
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 ()
 

Static Public Member Functions

static std::shared_ptr< IWLMVMFrontEndgetInstance (const std::string &referredInterfaceName)
 
- Static Public Member Functions inherited from MAC80211InjectionOnlyFrontEnd
static bool isMAC80211CompatibleFrontEnd (const std::string &referredInterfaceName)
 

Additional Inherited Members

- Protected Member Functions inherited from MAC80211CSIExtractableFrontEnd
virtual void startCSIExtractionAndParsingLoop ()=0
 
- Protected Member Functions inherited from MAC80211InjectionOnlyFrontEnd
 MAC80211InjectionOnlyFrontEnd (const std::string &referredName)
 
- Protected Attributes inherited from MAC80211CSIExtractableFrontEnd
int csiPathPointer {}
 
- Protected Attributes inherited from MAC80211InjectionOnlyFrontEnd
std::string devId
 
std::string monId
 
uint16_t phyIdNumber = 0
 
std::string phyPath
 
std::shared_ptr< uint8_t > txContext
 
std::array< uint8_t, 6 > macAddress_MON {0, 0, 0, 0, 0, 0}
 
std::array< uint8_t, 6 > macAddress_DEV {0, 0, 0, 0, 0, 0}
 
std::vector< double > systemSupportedFrequencies
 
- Protected Attributes inherited from AbstractFrontEnd
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
 
- Protected Attributes inherited from FrontEndConfigurations
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
 

Detailed Description

Definition at line 10 of file IWLMVMFrontEnd.hxx.

Constructor & Destructor Documentation

◆ IWLMVMFrontEnd()

IWLMVMFrontEnd::IWLMVMFrontEnd ( const std::string &  referredInterfaceName)

Member Function Documentation

◆ getInstance()

static std::shared_ptr< IWLMVMFrontEnd > IWLMVMFrontEnd::getInstance ( const std::string &  referredInterfaceName)
static

The documentation for this class was generated from the following file: