IBR-DTNSuite  0.10
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 update (const ibrcommon::vinterface &iface, DiscoveryAnnouncement &announcement) throw (dtn::net::DiscoveryServiceProvider::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
 
virtual void raiseEvent (const Event *evt) throw ()
 
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::DiscoveryAgent
 DiscoveryAgent (const dtn::daemon::Configuration::Discovery &config)
 
virtual ~DiscoveryAgent ()=0
 
void received (const dtn::data::EID &source, const std::list< DiscoveryService > &services, const dtn::data::Number &timeout=0)
 
void addService (dtn::net::DiscoveryServiceProvider *provider)
 
- Public Member Functions inherited from dtn::net::ConvergenceLayer
virtual ~ConvergenceLayer ()=0
 
virtual void open (const dtn::core::Node &)
 
virtual void resetStats ()
 
virtual const stats_mapgetStats ()
 
- 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::core::EventReceiver
virtual ~EventReceiver ()=0
 
- Public Member Functions inherited from dtn::net::DiscoveryServiceProvider
virtual ~DiscoveryServiceProvider ()
 

Static Public Attributes

static const size_t BUFF_SIZE = 115
 

Protected Member Functions

virtual void componentUp () throw ()
 
virtual void componentRun () throw ()
 
virtual void componentDown () throw ()
 
void __cancellation () throw ()
 
virtual void sendAnnoucement (const uint16_t &sn, std::list< dtn::net::DiscoveryServiceProvider * > &providers)
 
- Protected Member Functions inherited from dtn::net::DiscoveryAgent
void timeout ()
 
- Protected Member Functions inherited from dtn::net::ConvergenceLayer
virtual void addStats (const std::string &tag, const size_t value)
 
virtual void setStats (const std::string &tag, const size_t value)
 
- 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::map< std::string,
size_t > 
stats_map
 
- Protected Attributes inherited from dtn::net::DiscoveryAgent
const
dtn::daemon::Configuration::Discovery
_config
 

Detailed Description

This class implements a ConvergenceLayer for LOWPAN.

Definition at line 48 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 51 of file LOWPANConvergenceLayer.cpp.

References AF_IEEE802154.

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

Definition at line 63 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 317 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(), ibrcommon::JoinableThread::join(), dtn::core::EventDispatcher< E >::remove(), and ibrcommon::JoinableThread::stop().

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
dtn::core::Node::Protocol dtn::net::LOWPANConvergenceLayer::getDiscoveryProtocol ( ) const
virtual

Implements dtn::net::ConvergenceLayer.

Definition at line 68 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 323 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 121 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::raiseEvent ( const Event evt) throw ()
virtual
void dtn::net::LOWPANConvergenceLayer::remove ( const LOWPANConnection conn)

Definition at line 166 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 97 of file LOWPANConvergenceLayer.cpp.

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

Referenced by sendAnnoucement().

Here is the call graph for this function:

void dtn::net::LOWPANConvergenceLayer::update ( const ibrcommon::vinterface iface,
DiscoveryAnnouncement announcement 
) throw (dtn::net::DiscoveryServiceProvider::NoServiceHereException)
virtual

this method updates the given values

Implements dtn::net::DiscoveryServiceProvider.

Definition at line 73 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:

Member Data Documentation

const size_t dtn::net::LOWPANConvergenceLayer::BUFF_SIZE = 115
static

Definition at line 85 of file LOWPANConvergenceLayer.h.


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