IBR-DTNSuite  0.10
dtn::net::DatagramConnection Class Reference

#include <DatagramConnection.h>

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

Public Member Functions

 DatagramConnection (const std::string &identifier, const DatagramService::Parameter &params, DatagramConnectionCallback &callback)
 
virtual ~DatagramConnection ()
 
void run () throw ()
 
void setup () throw ()
 
void finally () throw ()
 
virtual void __cancellation () throw ()
 
void shutdown ()
 
const std::string & getIdentifier () const
 
void queue (const dtn::net::BundleTransfer &job)
 
void queue (const char &flags, const unsigned int &seqno, const char *buf, const dtn::data::Length &len)
 
void ack (const unsigned int &seqno)
 
void setPeerEID (const dtn::data::EID &peer)
 
- Public Member Functions inherited from ibrcommon::DetachedThread
virtual ~DetachedThread ()=0
 
void start (int priority=0) throw (ThreadException)
 
void stop () throw (ThreadException)
 

Static Public Attributes

static const std::string TAG = "DatagramConnection"
 

Additional Inherited Members

- Protected Member Functions inherited from ibrcommon::DetachedThread
 DetachedThread (size_t size=DEFAULT_STACKSIZE)
 
- Static Protected Member Functions inherited from ibrcommon::Thread
static size_t getNumberOfProcessors ()
 
static void yield (void)
 
static void sleep (time_t timeout)
 
static void concurrency (int level)
 
static bool equal (pthread_t thread1, pthread_t thread2)
 
static void * __execute__ (void *obj) throw ()
 

Detailed Description

Definition at line 52 of file DatagramConnection.h.

Constructor & Destructor Documentation

dtn::net::DatagramConnection::DatagramConnection ( const std::string &  identifier,
const DatagramService::Parameter params,
DatagramConnectionCallback callback 
)

Definition at line 46 of file DatagramConnection.cpp.

dtn::net::DatagramConnection::~DatagramConnection ( )
virtual

Definition at line 52 of file DatagramConnection.cpp.

Member Function Documentation

void dtn::net::DatagramConnection::__cancellation ( ) throw ()
virtual

Implements ibrcommon::Thread.

Definition at line 67 of file DatagramConnection.cpp.

Referenced by shutdown().

void dtn::net::DatagramConnection::ack ( const unsigned int &  seqno)

This method is called by the DatagramCL, if an ACK is received.

Parameters
seq

Definition at line 333 of file DatagramConnection.cpp.

References IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, ibrcommon::Conditional::signal(), and TAG.

Referenced by dtn::net::DatagramConvergenceLayer::componentRun().

Here is the call graph for this function:

void dtn::net::DatagramConnection::finally ( void  ) throw ()
virtual

This method is called when the run() method finishes.

Reimplemented from ibrcommon::Thread.

Definition at line 108 of file DatagramConnection.cpp.

References ibrcommon::Conditional::abort(), dtn::net::DatagramConnectionCallback::connectionDown(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, and TAG.

Here is the call graph for this function:

const std::string & dtn::net::DatagramConnection::getIdentifier ( ) const
void dtn::net::DatagramConnection::queue ( const dtn::net::BundleTransfer job)
void dtn::net::DatagramConnection::run ( ) throw ()
virtual

Abstract interface for thread context run method.

Implements ibrcommon::Thread.

Definition at line 75 of file DatagramConnection.cpp.

References dtn::core::BundleCore::getInstance(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, dtn::net::BundleReceivedEvent::raise(), TAG, and ibrcommon::Exception::what().

Here is the call graph for this function:

void dtn::net::DatagramConnection::setPeerEID ( const dtn::data::EID peer)

Assign a peer EID to this connection

Parameters
peerThe EID of this peer.

Definition at line 342 of file DatagramConnection.cpp.

Referenced by dtn::net::DatagramConvergenceLayer::componentRun().

void dtn::net::DatagramConnection::setup ( void  ) throw ()
virtual

This method is called before the run.

Reimplemented from ibrcommon::Thread.

Definition at line 100 of file DatagramConnection.cpp.

References dtn::net::DatagramConnectionCallback::connectionUp(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, and TAG.

Here is the call graph for this function:

void dtn::net::DatagramConnection::shutdown ( )

Definition at line 59 of file DatagramConnection.cpp.

References __cancellation(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, and TAG.

Referenced by dtn::net::DatagramConvergenceLayer::componentRun().

Here is the call graph for this function:

Member Data Documentation

const std::string dtn::net::DatagramConnection::TAG = "DatagramConnection"
static

Definition at line 55 of file DatagramConnection.h.

Referenced by ack(), finally(), queue(), run(), setup(), and shutdown().


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