IBR-DTN  1.0.0
dtn::net::UDPConvergenceLayer Class Reference

#include <UDPConvergenceLayer.h>

Inheritance diagram for dtn::net::UDPConvergenceLayer:
Inheritance graph
Collaboration diagram for dtn::net::UDPConvergenceLayer:
Collaboration graph

Public Member Functions

 UDPConvergenceLayer (ibrcommon::vinterface net, int port, dtn::data::Length mtu=1280)
 
virtual ~UDPConvergenceLayer ()
 
void onUpdateBeacon (const ibrcommon::vinterface &iface, DiscoveryBeacon &announcement) throw (dtn::net::DiscoveryBeaconHandler::NoServiceHereException)
 
dtn::core::Node::Protocol getDiscoveryProtocol () const
 
void queue (const dtn::core::Node &n, const dtn::net::BundleTransfer &job)
 
virtual const std::string getName () const
 
void eventNotify (const ibrcommon::LinkEvent &evt)
 
virtual void resetStats ()
 
virtual void getStats (ConvergenceLayer::stats_data &data) const
 
- Public Member Functions inherited from dtn::net::ConvergenceLayer
virtual ~ConvergenceLayer ()=0
 
virtual void open (const dtn::core::Node &)
 
- Public Member Functions inherited from dtn::daemon::IndependentComponent
 IndependentComponent ()
 
virtual ~IndependentComponent ()
 
virtual void initialize () throw ()
 
virtual void startup () throw ()
 
virtual void terminate () throw ()
 
- Public Member Functions inherited from dtn::daemon::Component
virtual ~Component ()=0
 
- Public Member Functions inherited from dtn::net::DiscoveryBeaconHandler
virtual ~DiscoveryBeaconHandler ()=0
 
virtual void onAdvertiseBeacon (const ibrcommon::vinterface &iface, const DiscoveryBeacon &beacon) throw ()
 

Protected Member Functions

virtual void componentUp () throw ()
 
virtual void componentRun () throw ()
 
virtual void componentDown () throw ()
 
void __cancellation () throw ()
 
- Protected Member Functions inherited from dtn::daemon::IndependentComponent
void run () throw ()
 

Additional Inherited Members

- Public Types inherited from dtn::net::ConvergenceLayer
typedef std::pair< string, string > stats_pair
 
typedef std::map< string, string > stats_data
 

Detailed Description

This class implement a ConvergenceLayer for UDP/IP. Each bundle is sent in exact one UDP datagram.

Definition at line 43 of file UDPConvergenceLayer.h.

Constructor & Destructor Documentation

dtn::net::UDPConvergenceLayer::UDPConvergenceLayer ( ibrcommon::vinterface  net,
int  port,
dtn::data::Length  mtu = 1280 
)

Constructor

Parameters
[in]bind_addrThe address to bind.
[in]portThe udp port to use.
[in]broadcastIf true, the broadcast feature for this socket is enabled.
[in]mtuThe maximum bundle size.

Definition at line 60 of file UDPConvergenceLayer.cpp.

dtn::net::UDPConvergenceLayer::~UDPConvergenceLayer ( )
virtual

Desktruktor

Definition at line 65 of file UDPConvergenceLayer.cpp.

References componentDown().

Here is the call graph for this function:

Member Function Documentation

void dtn::net::UDPConvergenceLayer::__cancellation ( )
throw (
)
protectedvirtual

This method is called after componentDown() and should should guarantee that blocking calls in componentRun() will unblock.

Implements dtn::daemon::IndependentComponent.

Definition at line 486 of file UDPConvergenceLayer.cpp.

void dtn::net::UDPConvergenceLayer::componentDown ( )
throw (
)
protectedvirtual

This method is called if the component should stop. Clean-up code should be inserted here.

Implements dtn::daemon::IndependentComponent.

Definition at line 433 of file UDPConvergenceLayer.cpp.

References dtn::core::BundleCore::getDiscoveryAgent(), dtn::core::BundleCore::getInstance(), and dtn::net::DiscoveryAgent::unregisterService().

Referenced by ~UDPConvergenceLayer().

Here is the call graph for this function:

void dtn::net::UDPConvergenceLayer::componentRun ( )
throw (
)
protectedvirtual
void dtn::net::UDPConvergenceLayer::componentUp ( )
throw (
)
protectedvirtual

Is called in preparation of the component. Before componentRun() is called.

Implements dtn::daemon::IndependentComponent.

Definition at line 392 of file UDPConvergenceLayer.cpp.

References dtn::core::BundleCore::getDiscoveryAgent(), dtn::core::BundleCore::getInstance(), and dtn::net::DiscoveryAgent::registerService().

Here is the call graph for this function:

void dtn::net::UDPConvergenceLayer::eventNotify ( const ibrcommon::LinkEvent &  evt)

Definition at line 338 of file UDPConvergenceLayer.cpp.

dtn::core::Node::Protocol dtn::net::UDPConvergenceLayer::getDiscoveryProtocol ( ) const
virtual

Implements dtn::net::ConvergenceLayer.

Definition at line 91 of file UDPConvergenceLayer.cpp.

References dtn::core::Node::CONN_UDPIP.

Referenced by componentRun(), getStats(), and queue().

const std::string dtn::net::UDPConvergenceLayer::getName ( ) const
virtual
See Also
Component::getName()

Implements dtn::daemon::Component.

Definition at line 492 of file UDPConvergenceLayer.cpp.

void dtn::net::UDPConvergenceLayer::getStats ( ConvergenceLayer::stats_data data) const
virtual

Reimplemented from dtn::net::ConvergenceLayer.

Definition at line 76 of file UDPConvergenceLayer.cpp.

References getDiscoveryProtocol(), and dtn::core::Node::toString().

Here is the call graph for this function:

void dtn::net::UDPConvergenceLayer::onUpdateBeacon ( const ibrcommon::vinterface &  iface,
DiscoveryBeacon announcement 
)
throw (dtn::net::DiscoveryBeaconHandler::NoServiceHereException
)
virtual

this method updates the given values

Reimplemented from dtn::net::DiscoveryBeaconHandler.

Definition at line 96 of file UDPConvergenceLayer.cpp.

References dtn::daemon::Configuration::Discovery::enableCrosslayer(), dtn::daemon::Configuration::getDiscovery(), and dtn::daemon::Configuration::getInstance().

Here is the call graph for this function:

void dtn::net::UDPConvergenceLayer::resetStats ( )
virtual

Reimplemented from dtn::net::ConvergenceLayer.

Definition at line 70 of file UDPConvergenceLayer.cpp.


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