senf::emu::WirelessInterface Class Referenceabstract

Interface API base class specialization for wireless interfaces. More...

#include <senf/Ext/NetEmu/WirelessInterfaceAPI.hh>

Inheritance diagram for senf::emu::WirelessInterface:

Classes

struct  Frequency
 Frequency table entry. More...
 

Public Types

typedef TypedInterfaceDecorator< WirelessInterface, Interface::DecoratorDecorator
 WirelessInterface base class specific decorator type. More...
 
typedef boost::filter_iterator< frequency_is_whitelisted, Frequencies::const_iteratorFrequencyIterator
 
typedef boost::iterator_range< FrequencyIteratorFrequenciesRange
 Range of frequency entries. More...
 
- Public Types inherited from senf::emu::Interface
typedef InterfaceDecorator Decorator
 Interface base class specific decorator type More...
 

Protected Member Functions

 WirelessInterface ()
 
void init ()
 
void clearRegisteredFrequencies ()
 remove all registered frequencies More...
 
void clearRegisteredModulations ()
 remove all registered modulations More...
 
void registerFrequency (unsigned frequency, unsigned bandwidth)
 register single frequency/bandwidth combination More...
 
void registerFrequency (unsigned frequencyLower, unsigned frequencyUpper, unsigned bandwidthLower, unsigned bandwidthUpper)
 register frequency/bandwidth range More...
 
void registerModulation (ModulationParameter::id_t id)
 register modulation configuration More...
 
virtual void v_coverageRange (unsigned distance)=0
 
virtual unsigned v_frequency () const =0
 Called to get current frequency. More...
 
virtual unsigned v_bandwidth () const =0
 Called to get current bandwidth. More...
 
virtual void v_frequency (unsigned freq, unsigned bw)=0
 Called to set frequency and bandwidth. More...
 
- Protected Member Functions inherited from senf::emu::Interface
 Interface ()
 
void init ()
 Initialize interface. More...
 
virtual void v_enable ()=0
 Called to enable interface. More...
 
virtual void v_disable ()=0
 Called to disable interface. More...
 
virtual bool v_enabled () const =0
 Return true if interface is enabled. More...
 
virtual void v_id (MACAddress const &id)=0
 Called to set interface mac address. More...
 
virtual MACAddress v_id () const =0
 Return the interface mac address. More...
 
virtual boost::uint8_t v_linkTypeId () const =0
 
virtual std::string const & v_device () const =0
 

Wireless Modulation

ModulationParameterIds const & modulationParameterIds () const
 Get list of valid parameters. More...
 
unsigned maxNSS () const
 Get max numer of spatial stream;. More...
 

Frequency/bandwidth

unsigned frequency () const
 Get current channel frequency. More...
 
unsigned bandwidth () const
 Get current bandwidth. More...
 
void frequency (unsigned freq)
 Set channel frequency. More...
 
void frequency (unsigned freq, unsigned bw)
 Set channel frequency and bandwidth. More...
 
FrequenciesRange frequencies () const
 Get valid frequency intervals. More...
 
void whitelistedFrequencyRange (unsigned frequencyLower, unsigned frequencyUpper)
 
void whitelistedChannel (unsigned frequency, unsigned bandwidth)
 
void clearWhitelistedFrequencies ()
 
void coverageRange (unsigned distance)
 set the coverage range of the interface in meters More...
 

Additional Inherited Members

- Public Member Functions inherited from senf::emu::Interface
virtual ~Interface ()
 
bool canTransmit () const
 true, if interface is transmit capable More...
 
bool canReceive () const
 true, if interface is receive capable More...
 
void enable ()
 Enable interface (aka ifconfig up) More...
 
void disable ()
 Disable interface (aka ifconfig down) More...
 
bool enabled () const
 true, if interface enabled More...
 
unsigned index () const
 Get interface index. More...
 
void id (MACAddress const &eui)
 Change interface MAC. More...
 
MACAddress const & id () const
 Get interface MAC Address. More...
 
void deviceId (InterfaceDeviceId id)
 
InterfaceDeviceId deviceId () const
 
std::string const & device () const
 
boost::uint8_t linkTypeId () const
 
std::string interfaceTypeName () const
 
console::DirectoryNodeconsoleDir () const
 Access interface console directory. More...
 
console::DirectoryNodestatisticsDir () const
 Access the interface statistics directory. More...
 
template<class Stat >
senf::StatisticsregisterStatistics (std::string name, Stat &stat)
 Register statistics source. More...
 
boost::optional< senf::Statistics & > statistic (std::string const &name)
 Get registered statistic. More...
 
void startStatistics (ClockService::clock_type inverval)
 Start statistics generation. More...
 
- Static Public Member Functions inherited from senf::emu::Interface
static unsigned nodeId ()
 Get unique node id. More...
 
static void nodeId (unsigned id)
 Set unique node id. More...
 
- Public Attributes inherited from senf::emu::Interface
boost::signals2::signal< void(Interface &, MACAddress)> idChangedSignal
 

Detailed Description

Interface API base class specialization for wireless interfaces.

This interface base class is a specialization of senf::emu::Interface with extensions implementing a generic wireless interface API.

A wireless interface configuration is characterized by two or three values:

  • The modulation parameter identifies the coding and bandwidth setup.
  • The frequency and bandwidth
  • For transmit enabled interfaces, the txpower

Every parameter index identifies a unique receiver/transmitter configuration. The exact configuration parameters (e.g. coding) are not public but implementation defined. All important external properties are accessible via the parameters() member.

Every wireless interface manages a list of valid frequency/bandwidth ranges. Transmit capable interface additionally manage a list of valid txpower ranges.

See also
NetEmu interface API

Definition at line 124 of file WirelessInterfaceAPI.hh.

Member Typedef Documentation

◆ Decorator

◆ FrequenciesRange

Range of frequency entries.

Definition at line 193 of file WirelessInterfaceAPI.hh.

◆ FrequencyIterator

typedef boost::filter_iterator<frequency_is_whitelisted, Frequencies::const_iterator> senf::emu::WirelessInterface::FrequencyIterator

Definition at line 192 of file WirelessInterfaceAPI.hh.

Constructor & Destructor Documentation

◆ WirelessInterface()

senf::emu::WirelessInterface::WirelessInterface ( )
protected

Member Function Documentation

◆ bandwidth()

unsigned senf::emu::WirelessInterface::bandwidth ( ) const

Get current bandwidth.

◆ clearRegisteredFrequencies()

void senf::emu::WirelessInterface::clearRegisteredFrequencies ( )
protected

remove all registered frequencies

◆ clearRegisteredModulations()

void senf::emu::WirelessInterface::clearRegisteredModulations ( )
protected

remove all registered modulations

◆ clearWhitelistedFrequencies()

void senf::emu::WirelessInterface::clearWhitelistedFrequencies ( )

Definition at line 248 of file WirelessInterfaceAPI.cc.

◆ coverageRange()

void senf::emu::WirelessInterface::coverageRange ( unsigned  distance)

set the coverage range of the interface in meters

◆ frequencies()

FrequenciesRange senf::emu::WirelessInterface::frequencies ( ) const

Get valid frequency intervals.

◆ frequency() [1/3]

unsigned senf::emu::WirelessInterface::frequency ( ) const

Get current channel frequency.

◆ frequency() [2/3]

void senf::emu::WirelessInterface::frequency ( unsigned  freq)

Set channel frequency.

◆ frequency() [3/3]

void senf::emu::WirelessInterface::frequency ( unsigned  freq,
unsigned  bw 
)

Set channel frequency and bandwidth.

◆ init()

void senf::emu::WirelessInterface::init ( )
protected

Definition at line 89 of file WirelessInterfaceAPI.cc.

◆ maxNSS()

unsigned senf::emu::WirelessInterface::maxNSS ( ) const

Get max numer of spatial stream;.

◆ modulationParameterIds()

ModulationParameterIds const& senf::emu::WirelessInterface::modulationParameterIds ( ) const

Get list of valid parameters.

◆ registerFrequency() [1/2]

void senf::emu::WirelessInterface::registerFrequency ( unsigned  frequency,
unsigned  bandwidth 
)
protected

register single frequency/bandwidth combination

◆ registerFrequency() [2/2]

void senf::emu::WirelessInterface::registerFrequency ( unsigned  frequencyLower,
unsigned  frequencyUpper,
unsigned  bandwidthLower,
unsigned  bandwidthUpper 
)
protected

register frequency/bandwidth range

◆ registerModulation()

void senf::emu::WirelessInterface::registerModulation ( ModulationParameter::id_t  id)
protected

register modulation configuration

◆ v_bandwidth()

virtual unsigned senf::emu::WirelessInterface::v_bandwidth ( ) const
protectedpure virtual

Called to get current bandwidth.

Implemented in senf::emu::EmulatedDVBInterface.

◆ v_coverageRange()

virtual void senf::emu::WirelessInterface::v_coverageRange ( unsigned  distance)
protectedpure virtual

◆ v_frequency() [1/2]

virtual unsigned senf::emu::WirelessInterface::v_frequency ( ) const
protectedpure virtual

Called to get current frequency.

Implemented in senf::emu::EmulatedDVBInterface.

◆ v_frequency() [2/2]

virtual void senf::emu::WirelessInterface::v_frequency ( unsigned  freq,
unsigned  bw 
)
protectedpure virtual

Called to set frequency and bandwidth.

Implemented in senf::emu::EmulatedDVBInterface.

◆ whitelistedChannel()

void senf::emu::WirelessInterface::whitelistedChannel ( unsigned  frequency,
unsigned  bandwidth 
)

Definition at line 241 of file WirelessInterfaceAPI.cc.

◆ whitelistedFrequencyRange()

void senf::emu::WirelessInterface::whitelistedFrequencyRange ( unsigned  frequencyLower,
unsigned  frequencyUpper 
)

Definition at line 234 of file WirelessInterfaceAPI.cc.


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