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

#include <LOWPANConvergenceLayer.h>

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

Public Member Functions

 LOWPANConvergenceLayer (const ibrcommon::vinterface &net, uint16_t panid, unsigned int mtu=115)
 
virtual ~LOWPANConvergenceLayer ()
 
void onUpdateBeacon (const ibrcommon::vinterface &iface, DiscoveryBeacon &announcement) throw (dtn::net::DiscoveryBeaconHandler::NoServiceHereException)
 
void onAdvertiseBeacon (const ibrcommon::vinterface &iface, const DiscoveryBeacon &beacon) throw ()
 
dtn::core::Node::Protocol getDiscoveryProtocol () const
 
void queue (const dtn::core::Node &n, const dtn::net::BundleTransfer &job)
 
virtual const std::string getName () const
 
virtual void send_cb (const char *buf, const size_t len, const ibrcommon::vaddress &addr)
 
void remove (const LOWPANConnection *conn)
 
- Public Member Functions inherited from dtn::net::ConvergenceLayer
virtual ~ConvergenceLayer ()=0
 
virtual void open (const dtn::core::Node &)
 
virtual void resetStats ()
 
virtual void getStats (ConvergenceLayer::stats_data &data) const
 
- 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
 

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 implements a ConvergenceLayer for LOWPAN.

Definition at line 46 of file LOWPANConvergenceLayer.h.

Constructor & Destructor Documentation

dtn::net::LOWPANConvergenceLayer::LOWPANConvergenceLayer ( const ibrcommon::vinterface &  net,
uint16_t  panid,
unsigned int  mtu = 115 
)

Definition at line 54 of file LOWPANConvergenceLayer.cpp.

dtn::net::LOWPANConvergenceLayer::~LOWPANConvergenceLayer ( )
virtual

Definition at line 65 of file LOWPANConvergenceLayer.cpp.

References componentDown().

Here is the call graph for this function:

Member Function Documentation

void dtn::net::LOWPANConvergenceLayer::__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 303 of file LOWPANConvergenceLayer.cpp.

References _running.

void dtn::net::LOWPANConvergenceLayer::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 199 of file LOWPANConvergenceLayer.cpp.

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

Referenced by ~LOWPANConvergenceLayer().

Here is the call graph for this function:

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

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

Implements dtn::daemon::IndependentComponent.

Definition at line 183 of file LOWPANConvergenceLayer.cpp.

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

Here is the call graph for this function:

dtn::core::Node::Protocol dtn::net::LOWPANConvergenceLayer::getDiscoveryProtocol ( ) const
virtual
const std::string dtn::net::LOWPANConvergenceLayer::getName ( ) const
virtual
See Also
Component::getName()

Implements dtn::daemon::Component.

Definition at line 309 of file LOWPANConvergenceLayer.cpp.

void dtn::net::LOWPANConvergenceLayer::onAdvertiseBeacon ( const ibrcommon::vinterface &  iface,
const DiscoveryBeacon beacon 
)
throw (
)
virtual

Reimplemented from dtn::net::DiscoveryBeaconHandler.

Definition at line 209 of file LOWPANConvergenceLayer.cpp.

References BUFF_SIZE.

void dtn::net::LOWPANConvergenceLayer::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 75 of file LOWPANConvergenceLayer.cpp.

void dtn::net::LOWPANConvergenceLayer::queue ( const dtn::core::Node n,
const dtn::net::BundleTransfer job 
)
virtual

Queueing a job for a specific node. Starting point for the DTN core to submit bundles to nodes behind the LoWPAN CL

Parameters
nNode reference
jobJob reference

Implements dtn::net::ConvergenceLayer.

Definition at line 123 of file LOWPANConvergenceLayer.cpp.

References dtn::net::LOWPANConnection::_sender, dtn::core::Node::CONN_LOWPAN, dtn::core::Node::URI::decode(), dtn::core::Node::get(), and dtn::net::LOWPANConnectionSender::queue().

Here is the call graph for this function:

void dtn::net::LOWPANConvergenceLayer::remove ( const LOWPANConnection conn)

Definition at line 168 of file LOWPANConvergenceLayer.cpp.

Referenced by dtn::net::LOWPANConnection::finally().

void dtn::net::LOWPANConvergenceLayer::send_cb ( const char *  buf,
const size_t  len,
const ibrcommon::vaddress &  addr 
)
virtual

Callback interface for sending data back from the lowpanstream to the CL

Parameters
bufBuffer with a data frame
lenLength of the buffer
addressIEEE 802.15.4 short address of the destination

Definition at line 99 of file LOWPANConvergenceLayer.cpp.


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