IBR-DTNSuite  0.12
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 ibrcommon::lowpanstream_callback
virtual ~lowpanstream_callback ()
 
- 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 ()
 
- Protected Member Functions inherited from ibrcommon::JoinableThread
virtual ~JoinableThread ()=0
 
void join (void) throw (ThreadException)
 
bool isRunning (void)
 
void start (int priority=0) throw (ThreadException)
 
void stop () throw ()
 
 JoinableThread (size_t size=DEFAULT_STACKSIZE)
 

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.

References AF_IEEE802154.

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, and ibrcommon::vsocket::down().

Here is the call graph for this function:

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 ibrcommon::vsocket::destroy(), dtn::core::BundleCore::getDiscoveryAgent(), dtn::core::BundleCore::getInstance(), ibrcommon::JoinableThread::join(), ibrcommon::JoinableThread::stop(), and dtn::net::DiscoveryAgent::unregisterService().

Referenced by ~LOWPANConvergenceLayer().

Here is the call graph for this function:

void dtn::net::LOWPANConvergenceLayer::componentUp ( )
throw (
)
protectedvirtual
dtn::core::Node::Protocol dtn::net::LOWPANConvergenceLayer::getDiscoveryProtocol ( ) const
virtual

Implements dtn::net::ConvergenceLayer.

Definition at line 70 of file LOWPANConvergenceLayer.cpp.

References dtn::core::Node::CONN_LOWPAN.

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

References sockaddr_ieee802154::addr, ieee802154_addr::addr_type, ibrcommon::lowpansocket::getAddress(), IEEE802154_ADDR_SHORT, ieee802154_addr::pan_id, and ieee802154_addr::short_addr.

Here is the call graph for this function:

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, sockaddr_ieee802154::addr, AF_IEEE802154, dtn::core::Node::CONN_LOWPAN, dtn::core::Node::URI::decode(), dtn::core::Node::get(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, 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

Implements ibrcommon::lowpanstream_callback.

Definition at line 99 of file LOWPANConvergenceLayer.cpp.

References ibrcommon::vsocket::getAll(), ibrcommon::lowpansocket::sendto(), and ibrcommon::lowpansocket::setAutoAck().

Here is the call graph for this function:


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