dtn::BluetoothConvergenceLayer Class Reference

#include <BluetoothConvergenceLayer.h>

Inheritance diagram for dtn::BluetoothConvergenceLayer:

dtn::StreamConvergenceLayer dtn::ConnectionConvergenceLayer dtn::ConvergenceLayer oasys::Logger List of all members.

Detailed Description

The Bluetooth Convergence Layer.

Definition at line 41 of file BluetoothConvergenceLayer.h.

Public Member Functions

 BluetoothConvergenceLayer ()
 Constructor.
bool interface_up (Interface *iface, int argc, const char *argv[])
 Virtual from ConvergenceLayer.
bool interface_down (Interface *iface)
 Virtual from ConvergenceLayer.
void dump_interface (Interface *iface, oasys::StringBuffer *buf)
 Virtual from ConvergenceLayer.

Static Public Attributes

static const u_int8_t BTCL_VERSION = 0x3
 Current protocol version.
static const u_int8_t BTCL_DEFAULT_CHANNEL = 10
 Default RFCOMM channel used by BTCL.
static BluetoothLinkParams default_link_params_
 Default link parameters.

Protected Member Functions

bool set_link_defaults (int argc, const char *argv[], const char **invalidp)
 virtual from ConvergenceLayer
void dump_link (Link *link, oasys::StringBuffer *buf)
 virtual from ConvergenceLayer
virtual LinkParamsnew_link_params ()
 virtual from ConnectionConvergenceLayer
virtual bool parse_link_params (LinkParams *params, int argc, const char **argv, const char **invalidp)
 virtual from ConnectionConvergenceLayer
virtual bool parse_nexthop (Link *link, LinkParams *params)
 virtual from ConnectionConvergenceLayer
virtual CLConnectionnew_connection (LinkParams *params)
 virtual from ConnectionConvergenceLayer

Friends

class BluetoothAnnounce

Classes

class  BluetoothLinkParams
 Tunable link parameter structure. More...
class  Connection
 Helper class (and thread) that manages an established connection with a peer daemon. More...
class  Listener
 Helper class (and thread) that listens on a registered interface for new connections. More...


Constructor & Destructor Documentation

dtn::BluetoothConvergenceLayer::BluetoothConvergenceLayer (  ) 

Constructor.

Definition at line 71 of file BluetoothConvergenceLayer.cc.


Member Function Documentation

bool dtn::BluetoothConvergenceLayer::interface_up ( Interface iface,
int  argc,
const char *  argv[] 
) [virtual]

Virtual from ConvergenceLayer.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 181 of file BluetoothConvergenceLayer.cc.

References oasys::OptParser::addopt(), BDADDR_ANY, oasys::BluetoothSocket::bind(), BTCL_DEFAULT_CHANNEL, errno, oasys::Bluetooth::hci_get_bdaddr(), oasys::BluetoothServer::listen(), log_debug, log_err, oasys::LOG_WARN, oasys::Logger::logf(), oasys::Logger::logpath_, oasys::Logger::logpathf(), dtn::Interface::name(), oasys::OptParser::parse(), dtn::Interface::set_cl_info(), and oasys::Thread::start().

bool dtn::BluetoothConvergenceLayer::interface_down ( Interface iface  )  [virtual]

Virtual from ConvergenceLayer.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 251 of file BluetoothConvergenceLayer.cc.

References ASSERT, dtn::Interface::cl_info(), oasys::IOHandlerBase::interrupt_from_io(), oasys::Thread::is_stopped(), oasys::Thread::set_should_stop(), and oasys::Thread::yield().

void dtn::BluetoothConvergenceLayer::dump_interface ( Interface iface,
oasys::StringBuffer buf 
) [virtual]

Virtual from ConvergenceLayer.

Reimplemented from dtn::ConvergenceLayer.

Definition at line 274 of file BluetoothConvergenceLayer.cc.

References oasys::StringBuffer::appendf(), ASSERT, bd2str, oasys::BluetoothSocket::channel(), dtn::Interface::cl_info(), and oasys::BluetoothSocket::local_addr().

bool dtn::BluetoothConvergenceLayer::set_link_defaults ( int  argc,
const char *  argv[],
const char **  invalidp 
) [protected, virtual]

virtual from ConvergenceLayer

Reimplemented from dtn::ConvergenceLayer.

Definition at line 135 of file BluetoothConvergenceLayer.cc.

References default_link_params_, and parse_link_params().

void dtn::BluetoothConvergenceLayer::dump_link ( Link link,
oasys::StringBuffer buf 
) [protected, virtual]

virtual from ConvergenceLayer

Reimplemented from dtn::StreamConvergenceLayer.

Definition at line 122 of file BluetoothConvergenceLayer.cc.

References oasys::StringBuffer::appendf(), ASSERT, bd2str, dtn::BluetoothConvergenceLayer::BluetoothLinkParams::channel_, dtn::Link::cl_info(), dtn::StreamConvergenceLayer::dump_link(), dtn::BluetoothConvergenceLayer::BluetoothLinkParams::local_addr_, and dtn::BluetoothConvergenceLayer::BluetoothLinkParams::remote_addr_.

ConnectionConvergenceLayer::LinkParams * dtn::BluetoothConvergenceLayer::new_link_params (  )  [protected, virtual]

virtual from ConnectionConvergenceLayer

Implements dtn::ConnectionConvergenceLayer.

Definition at line 79 of file BluetoothConvergenceLayer.cc.

References default_link_params_.

Referenced by dtn::BluetoothAnnounce::handle_neighbor_discovered().

bool dtn::BluetoothConvergenceLayer::parse_link_params ( LinkParams params,
int  argc,
const char **  argv,
const char **  invalidp 
) [protected, virtual]

virtual from ConnectionConvergenceLayer

Reimplemented from dtn::StreamConvergenceLayer.

Definition at line 86 of file BluetoothConvergenceLayer.cc.

References oasys::OptParser::addopt(), ASSERT, BDADDR_ANY, count, oasys::Bluetooth::hci_get_bdaddr(), dtn::BluetoothConvergenceLayer::BluetoothLinkParams::local_addr_, log_err, oasys::OptParser::parse_and_shift(), and dtn::StreamConvergenceLayer::parse_link_params().

Referenced by set_link_defaults().

bool dtn::BluetoothConvergenceLayer::parse_nexthop ( Link link,
LinkParams params 
) [protected, virtual]

virtual from ConnectionConvergenceLayer

Implements dtn::ConnectionConvergenceLayer.

Definition at line 143 of file BluetoothConvergenceLayer.cc.

References ASSERT, log_warn, dtn::Link::nexthop(), dtn::BluetoothConvergenceLayer::BluetoothLinkParams::remote_addr_, and oasys::Bluetooth::strtoba().

CLConnection * dtn::BluetoothConvergenceLayer::new_connection ( LinkParams params  )  [protected, virtual]

virtual from ConnectionConvergenceLayer

Implements dtn::ConnectionConvergenceLayer.

Definition at line 172 of file BluetoothConvergenceLayer.cc.

References ASSERT.

Referenced by dtn::BluetoothAnnounce::handle_neighbor_discovered().


Friends And Related Function Documentation

friend class BluetoothAnnounce [friend]

Definition at line 90 of file BluetoothConvergenceLayer.h.


Member Data Documentation

const u_int8_t dtn::BluetoothConvergenceLayer::BTCL_VERSION = 0x3 [static]

Current protocol version.

Definition at line 47 of file BluetoothConvergenceLayer.h.

const u_int8_t dtn::BluetoothConvergenceLayer::BTCL_DEFAULT_CHANNEL = 10 [static]

Default RFCOMM channel used by BTCL.

Definition at line 52 of file BluetoothConvergenceLayer.h.

Referenced by dtn::BluetoothAnnounce::configure(), and interface_up().

BluetoothConvergenceLayer::BluetoothLinkParams dtn::BluetoothConvergenceLayer::default_link_params_ [static]

Default link parameters.

Definition at line 87 of file BluetoothConvergenceLayer.h.

Referenced by dtn::BluetoothConvergenceLayer::Listener::accepted(), new_link_params(), and set_link_defaults().


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 12:54:33 2007 for DTN Reference Implementation by  doxygen 1.5.1