dtn::BluetoothDiscovery Class Reference

#include <BluetoothDiscovery.h>

Inheritance diagram for dtn::BluetoothDiscovery:

dtn::Discovery oasys::Thread oasys::Logger

List of all members.


Detailed Description

Neighbor discovery main thread for Bluetooth CL.

Definition at line 35 of file BluetoothDiscovery.h.


Public Member Functions

void shutdown ()
 Close down listening socket and stop the thread.
virtual ~BluetoothDiscovery ()

Protected Member Functions

 BluetoothDiscovery (const std::string &name)
bool configure (int argc, const char *argv[])
 Configure this Discovery instance.
void run ()
 Derived classes should implement this function which will get called in the new Thread context.

Protected Attributes

volatile bool shutdown_
bdaddr_t local_addr_
oasys::Notifier notifier_

Friends

class Discovery

Constructor & Destructor Documentation

virtual dtn::BluetoothDiscovery::~BluetoothDiscovery (  )  [inline, virtual]

Definition at line 41 of file BluetoothDiscovery.h.

References shutdown().

dtn::BluetoothDiscovery::BluetoothDiscovery ( const std::string &  name  )  [protected]

Definition at line 40 of file BluetoothDiscovery.cc.

References oasys::Bluetooth::hci_get_bdaddr(), local_addr_, and shutdown_.


Member Function Documentation

void dtn::BluetoothDiscovery::shutdown (  )  [virtual]

Close down listening socket and stop the thread.

Derived classes should NOT auto-delete.

Implements dtn::Discovery.

Definition at line 34 of file BluetoothDiscovery.cc.

References notifier_, oasys::Notifier::notify(), and shutdown_.

Referenced by ~BluetoothDiscovery().

bool dtn::BluetoothDiscovery::configure ( int  argc,
const char *  argv[] 
) [protected, virtual]

Configure this Discovery instance.

Implements dtn::Discovery.

Definition at line 50 of file BluetoothDiscovery.cc.

References oasys::OptParser::addopt(), bd2str, dtn::Discovery::local_, local_addr_, log_err, log_warn, oasys::OptParser::parse(), oasys::Thread::start(), and oasys::Thread::started().

void dtn::BluetoothDiscovery::run (  )  [protected, virtual]

Derived classes should implement this function which will get called in the new Thread context.

Implements oasys::Thread.

Definition at line 74 of file BluetoothDiscovery.cc.

References dtn::Discovery::announce(), bd2str, dtn::EndpointID::c_str(), oasys::BluetoothServiceDiscoveryClient::channel(), dtn::Discovery::handle_neighbor_discovered(), oasys::BluetoothInquiry::inquire(), interval, dtn::Announce::interval_remaining(), oasys::BluetoothServiceDiscoveryClient::is_dtn_router(), dtn::Discovery::list_, log_debug, log_info, oasys::BluetoothInquiry::next(), notifier_, oasys::Random::rand(), oasys::BluetoothServiceDiscoveryClient::remote_eid(), dtn::BluetoothAnnounce::reset_interval(), shutdown_, sleep_time, and oasys::Notifier::wait().


Friends And Related Function Documentation

friend class Discovery [friend]

Definition at line 43 of file BluetoothDiscovery.h.


Member Data Documentation

volatile bool dtn::BluetoothDiscovery::shutdown_ [protected]

Definition at line 49 of file BluetoothDiscovery.h.

Referenced by BluetoothDiscovery(), run(), and shutdown().

bdaddr_t dtn::BluetoothDiscovery::local_addr_ [protected]

Definition at line 50 of file BluetoothDiscovery.h.

Referenced by BluetoothDiscovery(), and configure().

oasys::Notifier dtn::BluetoothDiscovery::notifier_ [protected]

Definition at line 51 of file BluetoothDiscovery.h.

Referenced by run(), and shutdown().


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 08:36:22 2007 for DTN Reference Implementation by  doxygen 1.5.3