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

Network Interface Card class with CSI extraction capabilities for MAC80211 devices. More...

#include <MAC80211CSIExtractableNIC.hxx>

Inheritance diagram for MAC80211CSIExtractableNIC:
Collaboration diagram for MAC80211CSIExtractableNIC:

Public Member Functions

const std::string & getDevId () const
 Get the device interface identifier.
 
const std::string & getMonId () const
 Get the monitor interface identifier.
 
uint16_t getPhyIdNumber () const
 Get the physical interface number.
 
const std::string & getPhyPath () const
 Get the path to the physical interface in the system.
 
const std::array< uint8_t, 6 > & getMacAddressMon () const
 Get the MAC address of the monitor interface.
 
const std::array< uint8_t, 6 > & getMacAddressDev () const
 Get the MAC address of the device interface.
 
const std::shared_ptr< MAC80211CSIExtractableFrontEnd > & getMacFrontEnd () const
 Get the associated MAC80211 CSI-capable frontend.
 
- Public Member Functions inherited from AbstractNIC
virtual void startTxService ()=0
 Start the transmission service.
 
virtual void stopTxService ()=0
 Stop the transmission service.
 
virtual void pauseTx ()=0
 Temporarily pause transmission.
 
virtual void resumeTx ()=0
 Resume paused transmission.
 
virtual bool isTxServiceStarted () const =0
 Check if transmission service is running.
 
virtual int transmitPicoScenesFrame (const ModularPicoScenesTxFrame &frame)=0
 Transmit a single PicoScenes frame.
 
virtual int transmitPicoScenesFrameSync (const ModularPicoScenesTxFrame &frame)=0
 Transmit a frame synchronously.
 
virtual int transmitFramesInBatch (const std::vector< ModularPicoScenesTxFrame > &frames, uint16_t numRepeats)=0
 Transmit multiple frames in batch mode.
 
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)
 Template method for batch transmission of frames.
 
virtual ModularPicoScenesTxFrame initializeTxFrame ()
 Initialize a new transmission frame.
 
virtual void startRxService ()=0
 Start the reception service.
 
virtual void stopRxService ()=0
 Stop the reception service.
 
virtual void pauseRx ()=0
 Temporarily pause reception.
 
virtual void resumeRx ()=0
 Resume paused reception.
 
virtual bool isRxServiceStarted () const =0
 Check if reception service is running.
 
virtual std::optional< ModularPicoScenesRxFrame > syncRxConditionally (const std::function< bool(const ModularPicoScenesRxFrame &)> &condition, const std::chrono::milliseconds &maxWait_ms, std::optional< std::string > conditionaName=std::nullopt)=0
 Wait for a frame that matches specific conditions.
 
virtual std::optional< ModularPicoScenesRxFrame > syncRxWaitTaskId (uint16_t taskid, uint32_t maxWait_ms)=0
 Wait for a frame with specific task ID.
 
virtual void registerTaskIdHandler (uint16_t taskId, const std::function< bool(const ModularPicoScenesRxFrame &)> &handle)=0
 Register a handler for specific task ID.
 
virtual std::function< bool(const ModularPicoScenesRxFrame &)> getHandlerForFrameType (uint8_t frameType)=0
 Get handler for specific frame type.
 
virtual void unregisterTaskIdHandler (uint16_t taskId)=0
 Unregister handler for specific task ID.
 
virtual bool checkTaskIdHandlerExist (uint16_t taskId)=0
 Check if handler exists for specific task ID.
 
virtual void registerFrameTypeHandler (uint8_t frameType, const std::function< bool(const ModularPicoScenesRxFrame &)> &handle)=0
 Register handler for specific frame type.
 
virtual std::function< bool(const ModularPicoScenesRxFrame &)> getHandlerForTaskId (uint16_t taskId)=0
 Get handler for specific task ID.
 
virtual void unregisterFrameTypeHandler (uint8_t frameType)=0
 Unregister handler for specific frame type.
 
virtual bool checkFrameTypeHandlerExist (uint8_t frameType)=0
 Check if handler exists for specific frame type.
 
virtual void registerGeneralHandler (const std::string &handlerKeyName, const std::function< bool(const ModularPicoScenesRxFrame &)> &handle)=0
 Register a general handler.
 
virtual std::function< bool(const ModularPicoScenesRxFrame &)> getGeneralHandler (const std::string &handlerKeyName)=0
 Get general handler by name.
 
virtual void unregisterGeneralHandler (const std::string &handlerKeyName)=0
 Unregister general handler.
 
virtual bool checkGeneralHandlerExist (const std::string &handlerKeyName)=0
 Check if general handler exists.
 
const std::string & getReferredInterfaceName () const
 Get the interface name.
 
const std::string & getPhyId () const
 Get the physical interface ID.
 
const std::shared_ptr< AbstractFrontEnd > & getFrontEnd () const
 Get the front end interface.
 
virtual const PicoScenesFrameTxParameters & getUserSpecifiedTxParameters () const =0
 This methods returns the PicoScenesFrameTxParameters object created by the user specified Tx parameters.
.
 
virtual PicoScenesFrameTxParameters & getUserSpecifiedTxParameters ()=0
 This methods returns the PicoScenesFrameTxParameters object created by the user specified Tx parameters.
.
 
PicoScenesDeviceType getDeviceType () const
 Get the device type.
 
std::shared_ptr< AbstractHALConfigurationgetConfiguration () const
 Get the HAL configuration.
 
template<typename FrontEndT , class = std::enable_if_t<std::is_base_of_v<AbstractFrontEnd, FrontEndT>>>
std::shared_ptr< FrontEndT > getTypedFrontEnd () const
 Get typed front end instance.
 
const std::shared_ptr< PicoScenesPluginManager > & getPluginManager () const
 Get the plugin manager.
 
virtual void installPlugins () const =0
 Install plugins for this NIC.
 
std::vector< std::shared_ptr< po::options_description > > getAllNICOptions ()
 Get all NIC options.
 

Static Public Member Functions

static std::shared_ptr< MAC80211CSIExtractableNICgetNICInstance (const std::string &referredInterfaceName)
 Get or create a NIC instance for the specified interface.
 

Protected Member Functions

 MAC80211CSIExtractableNIC (const std::string &referredInterfaceName)
 Protected constructor for MAC80211CSIExtractableNIC.
 
- Protected Member Functions inherited from AbstractNIC
 AbstractNIC (const std::string &referredInterfaceName)
 Protected constructor.
 

Protected Attributes

std::string devId
 Device interface identifier.
 
std::string monId
 Monitor interface identifier.
 
uint16_t phyIdNumber
 Physical interface number.
 
std::string phyPath
 Path to physical interface in system.
 
std::shared_ptr< MAC80211CSIExtractableFrontEndmacFrontEnd
 Frontend instance for CSI operations.
 
std::array< uint8_t, 6 > macAddress_MON {}
 MAC address of monitor interface.
 
std::array< uint8_t, 6 > macAddress_DEV {}
 MAC address of device interface.
 
- Protected Attributes inherited from AbstractNIC
std::string referredInterfaceName
 Interface name reference.
 
std::string phyId
 Physical interface identifier.
 
PicoScenesDeviceType deviceType = PicoScenesDeviceType::Unknown
 Type of the device (NIC/SDR)
 
std::shared_ptr< AbstractHALConfigurationconfiguration
 Hardware abstraction layer configuration.
 
std::shared_ptr< AbstractFrontEndfrontEnd
 Frontend interface for hardware interaction.
 
std::shared_ptr< PicoScenesPluginManagerpluginManager
 Plugin manager for extending functionality.
 

Detailed Description

Network Interface Card class with CSI extraction capabilities for MAC80211 devices.

This class implements a NIC interface for MAC80211-based devices that support Channel State Information (CSI) extraction. It provides:

  • Device identification and management
  • MAC address handling for both monitor and device interfaces
  • Integration with MAC80211CSIExtractableFrontEnd for CSI operations

Definition at line 21 of file MAC80211CSIExtractableNIC.hxx.

Constructor & Destructor Documentation

◆ MAC80211CSIExtractableNIC()

MAC80211CSIExtractableNIC::MAC80211CSIExtractableNIC ( const std::string &  referredInterfaceName)
explicitprotected

Protected constructor for MAC80211CSIExtractableNIC.

Parameters
referredInterfaceNameName of the network interface
Exceptions
std::runtime_errorIf the interface is not a supported MAC80211 device

Member Function Documentation

◆ getDevId()

const std::string & MAC80211CSIExtractableNIC::getDevId ( ) const

Get the device interface identifier.

Returns
const std::string& Device interface ID

◆ getMacAddressDev()

const std::array< uint8_t, 6 > & MAC80211CSIExtractableNIC::getMacAddressDev ( ) const

Get the MAC address of the device interface.

Returns
const std::array<uint8_t, 6>& MAC address as 6-byte array

◆ getMacAddressMon()

const std::array< uint8_t, 6 > & MAC80211CSIExtractableNIC::getMacAddressMon ( ) const

Get the MAC address of the monitor interface.

Returns
const std::array<uint8_t, 6>& MAC address as 6-byte array

◆ getMacFrontEnd()

const std::shared_ptr< MAC80211CSIExtractableFrontEnd > & MAC80211CSIExtractableNIC::getMacFrontEnd ( ) const

Get the associated MAC80211 CSI-capable frontend.

Returns
const std::shared_ptr<MAC80211CSIExtractableFrontEnd>& Shared pointer to frontend

◆ getMonId()

const std::string & MAC80211CSIExtractableNIC::getMonId ( ) const

Get the monitor interface identifier.

Returns
const std::string& Monitor interface ID

◆ getNICInstance()

static std::shared_ptr< MAC80211CSIExtractableNIC > MAC80211CSIExtractableNIC::getNICInstance ( const std::string &  referredInterfaceName)
static

Get or create a NIC instance for the specified interface.

Parameters
referredInterfaceNameName of the network interface
Returns
std::shared_ptr<MAC80211CSIExtractableNIC> Shared pointer to NIC instance, or nullptr if the interface is not supported

◆ getPhyIdNumber()

uint16_t MAC80211CSIExtractableNIC::getPhyIdNumber ( ) const

Get the physical interface number.

Returns
uint16_t Physical interface number

◆ getPhyPath()

const std::string & MAC80211CSIExtractableNIC::getPhyPath ( ) const

Get the path to the physical interface in the system.

Returns
const std::string& Physical interface path

Member Data Documentation

◆ devId

std::string MAC80211CSIExtractableNIC::devId
protected

Device interface identifier.

Definition at line 76 of file MAC80211CSIExtractableNIC.hxx.

◆ macAddress_DEV

std::array<uint8_t, 6> MAC80211CSIExtractableNIC::macAddress_DEV {}
protected

MAC address of device interface.

Definition at line 88 of file MAC80211CSIExtractableNIC.hxx.

◆ macAddress_MON

std::array<uint8_t, 6> MAC80211CSIExtractableNIC::macAddress_MON {}
protected

MAC address of monitor interface.

Definition at line 87 of file MAC80211CSIExtractableNIC.hxx.

◆ macFrontEnd

std::shared_ptr<MAC80211CSIExtractableFrontEnd> MAC80211CSIExtractableNIC::macFrontEnd
protected

Frontend instance for CSI operations.

Handles low-level CSI extraction and processing

Definition at line 85 of file MAC80211CSIExtractableNIC.hxx.

◆ monId

std::string MAC80211CSIExtractableNIC::monId
protected

Monitor interface identifier.

Definition at line 77 of file MAC80211CSIExtractableNIC.hxx.

◆ phyIdNumber

uint16_t MAC80211CSIExtractableNIC::phyIdNumber
protected

Physical interface number.

Definition at line 78 of file MAC80211CSIExtractableNIC.hxx.

◆ phyPath

std::string MAC80211CSIExtractableNIC::phyPath
protected

Path to physical interface in system.

Definition at line 79 of file MAC80211CSIExtractableNIC.hxx.


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