#include <BluetoothDiscovery.h>
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 |
virtual dtn::BluetoothDiscovery::~BluetoothDiscovery | ( | ) | [inline, virtual] |
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_.
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().
friend class Discovery [friend] |
Definition at line 43 of file BluetoothDiscovery.h.
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] |