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

Portal class for managing Network Interface Cards. More...

#include <NICPortal.hxx>

Public Member Functions

std::vector< std::shared_ptr< AbstractNIC > > getAllNICs ()
 Get all registered NICs.
 
std::shared_ptr< AbstractNICgetNIC (const std::string &referredName)
 Get NIC by interface name.
 
template<typename T , class = std::enable_if_t<std::is_base_of_v<AbstractNIC, T>>>
std::shared_ptr< T > getTypedNIC (const std::string &referredName)
 Get typed NIC by interface name.
 
std::vector< std::shared_ptr< po::options_description > > getAllHALOptions ()
 Get all HAL (Hardware Abstraction Layer) options.
 

Static Public Member Functions

static std::shared_ptr< NICPortalgetInstance ()
 Get singleton instance of NICPortal.
 

Detailed Description

Portal class for managing Network Interface Cards.

Implements a singleton pattern to provide centralized access to NIC instances. Supports various types of NICs including:

  • MAC80211 based NICs (AX210/AX200/IWL5300/QCA9300)
  • USRP devices
  • SoapySDR devices
  • Virtual SDR devices

Definition at line 19 of file NICPortal.hxx.

Member Function Documentation

◆ getAllHALOptions()

std::vector< std::shared_ptr< po::options_description > > NICPortal::getAllHALOptions ( )

Get all HAL (Hardware Abstraction Layer) options.

Returns
Vector of shared pointers to options_description

Collects configuration options from both MAC80211 and SDR HAL implementations

◆ getAllNICs()

std::vector< std::shared_ptr< AbstractNIC > > NICPortal::getAllNICs ( )

Get all registered NICs.

Returns
Vector of shared pointers to AbstractNIC instances

◆ getInstance()

static std::shared_ptr< NICPortal > NICPortal::getInstance ( )
static

Get singleton instance of NICPortal.

Returns
Shared pointer to NICPortal instance

◆ getNIC()

std::shared_ptr< AbstractNIC > NICPortal::getNIC ( const std::string &  referredName)

Get NIC by interface name.

Parameters
referredNameInterface name or device identifier
Returns
Shared pointer to AbstractNIC instance
Exceptions
std::invalid_argumentif device ID is unresolvable or unsupported

Automatically creates and registers new NIC instances if not already present. Supports MAC80211 devices, USRP devices, SoapySDR devices, and Virtual SDR devices.

Referenced by getTypedNIC().

◆ getTypedNIC()

template<typename T , class = std::enable_if_t<std::is_base_of_v<AbstractNIC, T>>>
std::shared_ptr< T > NICPortal::getTypedNIC ( const std::string &  referredName)
inline

Get typed NIC by interface name.

Template Parameters
TType of NIC (must inherit from AbstractNIC)
Parameters
referredNameInterface name or device identifier
Returns
Shared pointer to typed NIC instance

Template method that provides type-safe access to specific NIC implementations

Definition at line 51 of file NICPortal.hxx.

References getNIC().


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