Interface API base class
More...
#include <senf/Ext/NetEmu/InterfaceAPI.hh>
Interface API base class
All NetEmu Interfaces derive from this class. This class provides the basic generic interface API.
- See also
- NetEmu interface API
Definition at line 193 of file InterfaceAPI.hh.
◆ Decorator
Interface base class specific decorator type
Definition at line 198 of file InterfaceAPI.hh.
◆ ~Interface()
virtual senf::emu::Interface::~Interface |
( |
| ) |
|
|
virtual |
◆ Interface()
senf::emu::Interface::Interface |
( |
| ) |
|
|
protected |
◆ canReceive()
bool senf::emu::Interface::canReceive |
( |
| ) |
const |
true
, if interface is receive capable
◆ canTransmit()
bool senf::emu::Interface::canTransmit |
( |
| ) |
const |
true
, if interface is transmit capable
◆ consoleDir()
Access interface console directory.
◆ device()
std::string const& senf::emu::Interface::device |
( |
| ) |
const |
◆ deviceId() [1/2]
◆ deviceId() [2/2]
◆ disable()
void senf::emu::Interface::disable |
( |
| ) |
|
Disable interface (aka ifconfig down
)
◆ enable()
void senf::emu::Interface::enable |
( |
| ) |
|
Enable interface (aka ifconfig up
)
◆ enabled()
bool senf::emu::Interface::enabled |
( |
| ) |
const |
true
, if interface enabled
◆ id() [1/2]
void senf::emu::Interface::id |
( |
MACAddress const & |
eui | ) |
|
◆ id() [2/2]
MACAddress const& senf::emu::Interface::id |
( |
| ) |
const |
Get interface MAC Address.
◆ index()
unsigned senf::emu::Interface::index |
( |
| ) |
const |
◆ init()
void senf::emu::Interface::init |
( |
| ) |
|
|
protected |
Initialize interface.
This member will be called by every derived class
Definition at line 38 of file InterfaceAPI.cc.
◆ interfaceTypeName()
std::string senf::emu::Interface::interfaceTypeName |
( |
| ) |
const |
◆ linkTypeId()
boost::uint8_t senf::emu::Interface::linkTypeId |
( |
| ) |
const |
◆ nodeId() [1/2]
static unsigned senf::emu::Interface::nodeId |
( |
| ) |
|
|
static |
Get unique node id.
The nodeId defaults to the process id
◆ nodeId() [2/2]
static void senf::emu::Interface::nodeId |
( |
unsigned |
id | ) |
|
|
static |
◆ registerStatistics()
template<class Stat >
senf::Statistics& senf::emu::Interface::registerStatistics |
( |
std::string |
name, |
|
|
Stat & |
stat |
|
) |
| |
Register statistics source.
Associates stat with a statistics collector and adds it to the statistics console directory of the interface. stat can be an arbitrary statistics signal.
- Returns
- reference to the new created Statistics object
- Warning
- Be careful when saving the returned reference, since it is coupled to the lifetime of the interface.
◆ startStatistics()
Start statistics generation.
Starts the statistics generation timer in all statistics sources registered with this interface (via registerStatistics()).
- Implementation note:
- This is not really a member function, it's a boost signal which can be called like a function.
- See also
- senf_emu_interface_statistics
◆ statistic()
boost::optional< senf::Statistics & > senf::emu::Interface::statistic |
( |
std::string const & |
name | ) |
|
◆ statisticsDir()
Access the interface statistics directory.
◆ v_device()
virtual std::string const& senf::emu::Interface::v_device |
( |
| ) |
const |
|
protectedpure virtual |
◆ v_disable()
virtual void senf::emu::Interface::v_disable |
( |
| ) |
|
|
protectedpure virtual |
◆ v_enable()
virtual void senf::emu::Interface::v_enable |
( |
| ) |
|
|
protectedpure virtual |
◆ v_enabled()
virtual bool senf::emu::Interface::v_enabled |
( |
| ) |
const |
|
protectedpure virtual |
◆ v_id() [1/2]
virtual void senf::emu::Interface::v_id |
( |
MACAddress const & |
id | ) |
|
|
protectedpure virtual |
◆ v_id() [2/2]
virtual MACAddress senf::emu::Interface::v_id |
( |
| ) |
const |
|
protectedpure virtual |
◆ v_linkTypeId()
virtual boost::uint8_t senf::emu::Interface::v_linkTypeId |
( |
| ) |
const |
|
protectedpure virtual |
◆ idChangedSignal
The documentation for this class was generated from the following files: