IBR-DTNSuite
0.12
|
#include <EventSwitch.h>
Public Member Functions | |
void | loop (size_t threads=0) |
bool | empty () const |
void | shutdown () |
Public Member Functions inherited from dtn::daemon::IntegratedComponent | |
IntegratedComponent () | |
virtual | ~IntegratedComponent () |
virtual void | initialize () throw () |
virtual void | startup () throw () |
virtual void | terminate () throw () |
Public Member Functions inherited from dtn::daemon::Component | |
virtual | ~Component ()=0 |
Static Public Member Functions | |
static EventSwitch & | getInstance () |
static void | queue (EventProcessor &proc, Event *evt) |
Protected Member Functions | |
virtual void | componentUp () throw () |
virtual void | componentDown () throw () |
Friends | |
class | Worker |
Definition at line 40 of file EventSwitch.h.
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 64 of file EventSwitch.cpp.
References ibrcommon::Conditional::abort(), empty(), and ibrcommon::Conditional::wait().
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 47 of file EventSwitch.cpp.
References ibrcommon::Conditional::reset().
bool dtn::core::EventSwitch::empty | ( | ) | const |
checks if all the queues are empty
Definition at line 82 of file EventSwitch.cpp.
Referenced by componentDown().
|
static |
Definition at line 212 of file EventSwitch.cpp.
Referenced by dtn::daemon::NativeEventLoop::__cancellation(), queue(), and dtn::daemon::NativeEventLoop::run().
void dtn::core::EventSwitch::loop | ( | size_t | threads = 0 ) |
Definition at line 141 of file EventSwitch.cpp.
References Worker.
Referenced by dtn::daemon::NativeEventLoop::run().
|
static |
Queue an event to one of the event queues of the event switch.
Definition at line 169 of file EventSwitch.cpp.
References getInstance(), dtn::core::Event::prio, and ibrcommon::Conditional::signal().
void dtn::core::EventSwitch::shutdown | ( | ) |
Bring down the EventSwitch. Do not accept any further events, but deliver all events in the queue.
Definition at line 199 of file EventSwitch.cpp.
References ibrcommon::Conditional::signal().
Referenced by dtn::daemon::NativeEventLoop::__cancellation().
|
friend |
Definition at line 111 of file EventSwitch.h.
Referenced by loop().