EMANE  1.2.1
EMANE::Transports::Virtual::VirtualTransport Class Reference

Virtual Device EMANE Transport. More...

#include <virtualtransport.h>

Inheritance diagram for EMANE::Transports::Virtual::VirtualTransport:
EMANE::Transports::Ethernet::EthernetTransport EMANE::Transport EMANE::NEMLayer EMANE::Component EMANE::UpstreamTransport EMANE::DownstreamTransport EMANE::PlatformServiceUser EMANE::Buildable EMANE::RunningStateMutable EMANE::EventServiceUser EMANE::TimerServiceUser

Public Member Functions

 VirtualTransport (NEMId id, PlatformServiceProvider *pPlatformService)
 
 ~VirtualTransport ()
 
void initialize (Registrar &registrar) override
 
void configure (const ConfigurationUpdate &update) override
 
void start () override
 
void postStart () override
 
void stop () override
 
void destroy () override throw ()
 
void processUpstreamPacket (UpstreamPacket &pkt, const ControlMessages &msgs)
 
void processUpstreamControl (const ControlMessages &msgs)
 
NEMId getNEMId () const
 
virtual void setDownstreamTransport (DownstreamTransport *pDownstreamTransport)
 
void sendDownstreamPacket (DownstreamPacket &pkt, const ControlMessages &msgs=empty)
 
void sendDownstreamControl (const ControlMessages &msgs)
 
void sendUpstreamControl (const ControlMessages &msgs)
 
virtual void processEvent (const EventId &eventId, const Serialization &serialization)
 
virtual void processTimedEvent (TimerEventId eventId, const TimePoint &expireTime, const TimePoint &scheduleTime, const TimePoint &fireTime, const void *arg)
 
BuildId getBuildId () const
 
void setBuildId (BuildId bid)
 
virtual void processConfiguration (const ConfigurationUpdate &update)
 

Static Public Attributes

static const ControlMessages empty
 
static const ControlMessages empty
 

Protected Member Functions

virtual int parseFrame (const Utils::EtherHeader *pEthHeader, EMANE::NEMId &dst, std::uint8_t &dscp)
 
virtual int verifyFrame (const void *buf, size_t len)
 
void updateArpCache (const Utils::EtherHeader *pEthHeader, EMANE::NEMId nemId)
 
void addEntry (const Utils::EtherAddr &addr, EMANE::NEMId nemId)
 
EMANE::NEMId lookupArpCache (const Utils::EtherAddr *pEthAddr)
 

Protected Attributes

bool bBroadcastMode_
 
bool bArpCacheMode_
 
NEMId id_
 
PlatformServiceProviderpPlatformService_
 

Detailed Description

Virtual Device EMANE Transport.

Definition at line 62 of file virtualtransport.h.

Constructor & Destructor Documentation

◆ VirtualTransport()

EMANE::Transports::Virtual::VirtualTransport::VirtualTransport ( NEMId  id,
PlatformServiceProvider pPlatformService 
)

Definition at line 67 of file virtualtransport.cc.

◆ ~VirtualTransport()

EMANE::Transports::Virtual::VirtualTransport::~VirtualTransport ( )

Definition at line 79 of file virtualtransport.cc.

Member Function Documentation

◆ addEntry()

void EMANE::Transports::Ethernet::EthernetTransport::addEntry ( const Utils::EtherAddr addr,
EMANE::NEMId  nemId 
)
protectedinherited

Definition at line 352 of file ethernettransport.cc.

◆ configure()

void EMANE::Transports::Virtual::VirtualTransport::configure ( const ConfigurationUpdate update)
overridevirtual

Configure the component.

Parameters
updateConfiguration update values
Exceptions
ConfigureExceptionthrown when a unexpected configuration item is encountered or there is a problem with the specified item value

Implements EMANE::Component.

Definition at line 163 of file virtualtransport.cc.

◆ destroy()

void EMANE::Transports::Virtual::VirtualTransport::destroy ( )
throw (
)
overridevirtual

Destroy the component.

Implements EMANE::Component.

Definition at line 380 of file virtualtransport.cc.

◆ getBuildId()

EMANE::BuildId EMANE::Buildable::getBuildId ( ) const
inlineinherited

Gets the application wide unique BuildId of this object.

Returns
the BuildId

Definition at line 34 of file buildable.inl.

◆ getNEMId()

NEMId EMANE::Transport::getNEMId ( ) const
inlineinherited

Gets the NEM identifier.

Returns
NEM identifier

Definition at line 62 of file transport.h.

◆ initialize()

void EMANE::Transports::Virtual::VirtualTransport::initialize ( Registrar registrar)
overridevirtual

Initialize the component.

Exceptions
InitializeExceptionthrown when an error is encountered during initialization

Implements EMANE::Component.

Definition at line 96 of file virtualtransport.cc.

◆ lookupArpCache()

EMANE::NEMId EMANE::Transports::Ethernet::EthernetTransport::lookupArpCache ( const Utils::EtherAddr pEthAddr)
protectedinherited

Definition at line 390 of file ethernettransport.cc.

◆ parseFrame()

int EMANE::Transports::Ethernet::EthernetTransport::parseFrame ( const Utils::EtherHeader pEthHeader,
EMANE::NEMId dst,
std::uint8_t &  dscp 
)
protectedvirtualinherited

Definition at line 166 of file ethernettransport.cc.

◆ postStart()

void EMANE::Transports::Virtual::VirtualTransport::postStart ( )
overridevirtual

Hook to run any post start functionaililty. Called after all the components have been started.

Reimplemented from EMANE::Component.

Definition at line 341 of file virtualtransport.cc.

◆ processConfiguration()

virtual void EMANE::RunningStateMutable::processConfiguration ( const ConfigurationUpdate update)
inlinevirtualinherited

Process dynamic running-state configuration updates

Parameters
updateConfiguration update
Note
Running state configuration errors are indicated using a validator. Validators can be registered using the ConfigurationRegistrar.

Reimplemented in EMANE::Models::IEEE80211ABG::MACLayer, EMANE::Models::RFPipe::MACLayer, EMANE::Models::TDMA::BaseModel::Implementation, EMANE::Models::TDMA::BaseModel, EMANE::NEMStatefulLayer, EMANE::NEMQueuedLayer, and EMANE::FrameworkPHY.

Definition at line 63 of file runningstatemutable.h.

◆ processEvent()

virtual void EMANE::EventServiceUser::processEvent ( const EventId eventId,
const Serialization serialization 
)
inlinevirtualinherited

◆ processTimedEvent()

virtual void EMANE::TimerServiceUser::processTimedEvent ( TimerEventId  eventId,
const TimePoint expireTime,
const TimePoint scheduleTime,
const TimePoint fireTime,
const void *  arg 
)
inlinevirtualinherited

Process a timed event

Parameters
eventIdIdentifier corresponding to the timer being processed
expireTimeThe time the timer was scheduled to expire
scheduleTimeThe Time the timer was scheduled
fireTimeTime time The time the timer actually fired
argOpaque timed event data
Note
All times are abosulte using CLOCK_REALTIME

Reimplemented in EMANE::NEMStatefulLayer, EMANE::Models::Bypass::PHYLayer, EMANE::NEMQueuedLayer, EMANE::Models::PHYAPITest::ShimLayer, EMANE::Models::CommEffect::Shim, EMANE::Agents::GPSDLocation::Agent, EMANE::TimerServiceProxy, and EMANE::NEMTimerServiceProxy.

Definition at line 62 of file timerserviceuser.h.

◆ processUpstreamControl()

void EMANE::Transports::Virtual::VirtualTransport::processUpstreamControl ( const ControlMessages msgs)
virtual

Process upstream control message

Parameters
msgsreference to the ControlMessages

Implements EMANE::UpstreamTransport.

Definition at line 465 of file virtualtransport.cc.

◆ processUpstreamPacket()

void EMANE::Transports::Virtual::VirtualTransport::processUpstreamPacket ( UpstreamPacket pkt,
const ControlMessages msgs 
)
virtual

Process upstream packet

Parameters
pktreference to the UpstreamPacket to process
msgsoptional reference to the ControlMessages

Implements EMANE::UpstreamTransport.

Definition at line 385 of file virtualtransport.cc.

◆ sendDownstreamControl()

void EMANE::UpstreamTransport::sendDownstreamControl ( const ControlMessages msgs)
inlineinherited

Send downstream control message

Parameters
msgsreference to the ControlMessages

Definition at line 44 of file upstreamtransport.inl.

◆ sendDownstreamPacket()

void EMANE::UpstreamTransport::sendDownstreamPacket ( DownstreamPacket pkt,
const ControlMessages msgs = empty 
)
inlineinherited

Send downsteam packet

Parameters
pktreference to the DownstreamPacket to process
msgsoptional reference to the ControlMessages

Definition at line 37 of file upstreamtransport.inl.

◆ sendUpstreamControl()

void EMANE::DownstreamTransport::sendUpstreamControl ( const ControlMessages msgs)
inlineinherited

Send upstream control message

Parameters
msgsReference to the ControlMessages

Definition at line 44 of file downstreamtransport.inl.

◆ setBuildId()

void EMANE::Buildable::setBuildId ( BuildId  bid)
inlineinherited

Sets the application wide unique BuildId of this object. Builders assign a BuildId to objects at instantiation.

Parameters
bidthe BuildId
Note
: This method is for internal framework use only.

Definition at line 40 of file buildable.inl.

◆ setDownstreamTransport()

virtual void EMANE::UpstreamTransport::setDownstreamTransport ( DownstreamTransport pDownstreamTransport)
inlinevirtualinherited

Set the downstream transport.

Parameters
pDownstreamTransportPointer to the downstream transport of this upstream transport.
Note
: This method is for internal framework use only.

Reimplemented in EMANE::NEMStatefulLayer, EMANE::PHYLayer, EMANE::MACLayer, EMANE::ShimLayer, and EMANE::TransportLayer.

Definition at line 82 of file upstreamtransport.h.

◆ start()

void EMANE::Transports::Virtual::VirtualTransport::start ( )
overridevirtual

Start the component.

Exceptions
StartExceptionthrown when an error is encountered during start.

Implements EMANE::Component.

Definition at line 286 of file virtualtransport.cc.

◆ stop()

void EMANE::Transports::Virtual::VirtualTransport::stop ( )
overridevirtual

Stop the component.

Exceptions
StopExceptionthrown when an error is encountered during stop

Implements EMANE::Component.

Definition at line 358 of file virtualtransport.cc.

◆ updateArpCache()

void EMANE::Transports::Ethernet::EthernetTransport::updateArpCache ( const Utils::EtherHeader pEthHeader,
EMANE::NEMId  nemId 
)
protectedinherited

Definition at line 294 of file ethernettransport.cc.

◆ verifyFrame()

int EMANE::Transports::Ethernet::EthernetTransport::verifyFrame ( const void *  buf,
size_t  len 
)
protectedvirtualinherited

Definition at line 50 of file ethernettransport.cc.

Member Data Documentation

◆ bArpCacheMode_

bool EMANE::Transports::Ethernet::EthernetTransport::bArpCacheMode_
protectedinherited

Definition at line 76 of file ethernettransport.h.

◆ bBroadcastMode_

bool EMANE::Transports::Ethernet::EthernetTransport::bBroadcastMode_
protectedinherited

Definition at line 75 of file ethernettransport.h.

◆ empty [1/2]

const EMANE::ControlMessages EMANE::DownstreamTransport::empty
staticinherited

Definition at line 102 of file downstreamtransport.h.

◆ empty [2/2]

const EMANE::ControlMessages EMANE::UpstreamTransport::empty
staticinherited

Definition at line 106 of file upstreamtransport.h.

◆ id_

NEMId EMANE::NEMLayer::id_
protectedinherited

Definition at line 81 of file nemlayer.h.

◆ pPlatformService_

PlatformServiceProvider* EMANE::PlatformServiceUser::pPlatformService_
protectedinherited

Definition at line 64 of file platformserviceuser.h.


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