EMANE  1.2.1
EMANE::Application::TransportAdapterImpl Class Reference

Implementation of the Transport Adapter interface. Connects a Transport implemenation with its respective NEM stack. More...

#include <transportadapterimpl.h>

Inheritance diagram for EMANE::Application::TransportAdapterImpl:
EMANE::Application::TransportAdapter EMANE::BoundaryMessageManager EMANE::Component EMANE::DownstreamTransport EMANE::Buildable

Public Types

enum  Protocol { Protocol::PROTOCOL_UDP, Protocol::PROTOCOL_TCP_SERVER, Protocol::PROTOCOL_TCP_CLIENT }
 

Public Member Functions

 TransportAdapterImpl (NEMId id)
 
 ~TransportAdapterImpl ()
 
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 processDownstreamPacket (DownstreamPacket &pkt, const ControlMessages &msgs)
 
void processDownstreamControl (const ControlMessages &msgs)
 
void setTransport (std::unique_ptr< NEMLayer > &pTransport) override
 
NEMId getNEMId () const
 
virtual void setUpstreamTransport (UpstreamTransport *pUpstreamTransport)
 
void sendUpstreamPacket (UpstreamPacket &pkt, const ControlMessages &msgs=empty)
 
void sendUpstreamControl (const ControlMessages &msgs)
 
BuildId getBuildId () const
 
void setBuildId (BuildId bid)
 
void open (const INETAddr &localAddress, const INETAddr &remoteAddress, Protocol protocol)
 
void close ()
 
void processBoundaryMessage (const void *pData, size_t length)
 
void sendPacketMessage (const PacketInfo &packetInfo, const void *pPacketData, size_t packetLength, const ControlMessages &msgs)
 
void sendPacketMessage (const PacketInfo &packetInfo, const Utils::VectorIO &packetIO, size_t overallLength, const ControlMessages &msgs)
 
void sendControlMessage (const ControlMessages &msgs)
 

Static Public Attributes

static const ControlMessages empty
 

Detailed Description

Implementation of the Transport Adapter interface. Connects a Transport implemenation with its respective NEM stack.

Definition at line 52 of file transportadapterimpl.h.

Member Enumeration Documentation

◆ Protocol

Enumerator
PROTOCOL_UDP 
PROTOCOL_TCP_SERVER 
PROTOCOL_TCP_CLIENT 

Definition at line 54 of file boundarymessagemanager.h.

Constructor & Destructor Documentation

◆ TransportAdapterImpl()

EMANE::Application::TransportAdapterImpl::TransportAdapterImpl ( NEMId  id)

Definition at line 41 of file transportadapterimpl.cc.

◆ ~TransportAdapterImpl()

EMANE::Application::TransportAdapterImpl::~TransportAdapterImpl ( )

Definition at line 46 of file transportadapterimpl.cc.

Member Function Documentation

◆ close()

void EMANE::BoundaryMessageManager::close ( )
inherited

Definition at line 118 of file boundarymessagemanager.cc.

◆ configure()

void EMANE::Application::TransportAdapterImpl::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 79 of file transportadapterimpl.cc.

◆ destroy()

void EMANE::Application::TransportAdapterImpl::destroy ( )
throw (
)
overridevirtual

Destroy the component.

Implements EMANE::Component.

Definition at line 160 of file transportadapterimpl.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::Application::TransportAdapterImpl::getNEMId ( ) const

◆ initialize()

void EMANE::Application::TransportAdapterImpl::initialize ( Registrar registrar)
overridevirtual

Initialize the component.

Exceptions
InitializeExceptionthrown when an error is encountered during initialization

Implements EMANE::Component.

Definition at line 55 of file transportadapterimpl.cc.

◆ open()

void EMANE::BoundaryMessageManager::open ( const INETAddr localAddress,
const INETAddr remoteAddress,
Protocol  protocol 
)
inherited
Exceptions
BoundaryMessageManagerException

Definition at line 66 of file boundarymessagemanager.cc.

◆ postStart()

void EMANE::Application::TransportAdapterImpl::postStart ( )
overridevirtual

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

Reimplemented from EMANE::Component.

Definition at line 150 of file transportadapterimpl.cc.

◆ processBoundaryMessage()

void EMANE::BoundaryMessageManager::processBoundaryMessage ( const void *  pData,
size_t  length 
)
inherited

◆ processDownstreamControl()

void EMANE::Application::TransportAdapterImpl::processDownstreamControl ( const ControlMessages msgs)
virtual

Process downstream control message

Parameters
msgsReference to the ControlMessages

Implements EMANE::DownstreamTransport.

Definition at line 176 of file transportadapterimpl.cc.

◆ processDownstreamPacket()

void EMANE::Application::TransportAdapterImpl::processDownstreamPacket ( DownstreamPacket pkt,
const ControlMessages msgs 
)
virtual

Process downstream packet

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

Implements EMANE::DownstreamTransport.

Definition at line 166 of file transportadapterimpl.cc.

◆ sendControlMessage()

void EMANE::BoundaryMessageManager::sendControlMessage ( const ControlMessages msgs)
inherited

Definition at line 253 of file boundarymessagemanager.cc.

◆ sendPacketMessage() [1/2]

void EMANE::BoundaryMessageManager::sendPacketMessage ( const PacketInfo packetInfo,
const void *  pPacketData,
size_t  packetLength,
const ControlMessages msgs 
)
inherited

Definition at line 148 of file boundarymessagemanager.cc.

◆ sendPacketMessage() [2/2]

void EMANE::BoundaryMessageManager::sendPacketMessage ( const PacketInfo packetInfo,
const Utils::VectorIO packetIO,
size_t  overallLength,
const ControlMessages msgs 
)
inherited

Definition at line 160 of file boundarymessagemanager.cc.

◆ 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.

◆ sendUpstreamPacket()

void EMANE::DownstreamTransport::sendUpstreamPacket ( UpstreamPacket pkt,
const ControlMessages msgs = empty 
)
inlineinherited

Send upstream packet

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

Definition at line 37 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.

◆ setTransport()

void EMANE::Application::TransportAdapterImpl::setTransport ( std::unique_ptr< NEMLayer > &  pTransport)
overridevirtual

Set the Transport

Parameters
pTransportpointer to the Transport instance to be

Implements EMANE::Application::TransportAdapter.

Definition at line 48 of file transportadapterimpl.cc.

◆ setUpstreamTransport()

virtual void EMANE::DownstreamTransport::setUpstreamTransport ( UpstreamTransport pUpstreamTransport)
inlinevirtualinherited

Set the upstream transport.

Parameters
pUpstreamTransportPointer to the upstream transport of this downstream transport.

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

Definition at line 79 of file downstreamtransport.h.

◆ start()

void EMANE::Application::TransportAdapterImpl::start ( )
overridevirtual

Start the component.

Exceptions
StartExceptionthrown when an error is encountered during start.

Implements EMANE::Component.

Definition at line 130 of file transportadapterimpl.cc.

◆ stop()

void EMANE::Application::TransportAdapterImpl::stop ( )
overridevirtual

Stop the component.

Exceptions
StopExceptionthrown when an error is encountered during stop

Implements EMANE::Component.

Definition at line 155 of file transportadapterimpl.cc.

Member Data Documentation

◆ empty

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

Definition at line 102 of file downstreamtransport.h.


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