![]() |
User Manual, Developers Guide and API Documentation |
![]() |
#include <events/PeriodicRealTimeout.hpp>


Public Member Functions | |
| void | cancelPeriodicRealTimeout () |
| Cancel the timer. | |
| bool | hasPeriodicRealTimeoutSet () |
| Is a timer set? | |
| virtual void | periodically ()=0 |
| Your callback. Implement this! | |
| PeriodicRealTimeout () | |
| void | startPeriodicTimeout (double _period, double _delay=0.0) |
| Start the periodic timer. | |
| virtual | ~PeriodicRealTimeout () |
Static Private Member Functions | |
| static void * | worker (void *_arg) |
Private Attributes | |
| wns::events::scheduler::ICommandPtr | currentCommand |
| pthread_cond_t | dataRead |
| double | delay |
| pthread_mutex_t | mutex |
| double | period |
| bool | running |
| pthread_t | thread |
Classes | |
| class | PeriodicRealTimeoutCommand |
| Command to be queued for real time execution. More... | |
Times are given in realtime. If you are looking for periodic simulation time events, look at PeriodicTimeout instead.
Definition at line 47 of file PeriodicRealTimeout.hpp.
| PeriodicRealTimeout::PeriodicRealTimeout | ( | ) | [explicit] |
Definition at line 37 of file PeriodicRealTimeout.cpp.
| PeriodicRealTimeout::~PeriodicRealTimeout | ( | ) | [virtual] |
Definition at line 50 of file PeriodicRealTimeout.cpp.
| void PeriodicRealTimeout::cancelPeriodicRealTimeout | ( | ) |
Cancel a previously set timer. Silently ignore, whether the timer has not been set.
Definition at line 83 of file PeriodicRealTimeout.cpp.
| bool PeriodicRealTimeout::hasPeriodicRealTimeoutSet | ( | ) |
Definition at line 76 of file PeriodicRealTimeout.cpp.
| virtual void wns::events::PeriodicRealTimeout::periodically | ( | ) | [pure virtual] |
The deriver is forced to implement this method. It gets called periodically, whenever the timer fires.
Implemented in wns::simulator::ProbeWriter, and wns::simulator::StatusReport.
Starts the timer with the given period in seconds. The first timeout is delayed by the given value (default 0). When the period has elapsed, the method periodically() is called. The method periodically() has to be implemented by the deriver.
If the timer has been set before, it will be silently cancelled. At any time there is only one valid timer.
Definition at line 59 of file PeriodicRealTimeout.cpp.
| void * PeriodicRealTimeout::worker | ( | void * | _arg | ) | [static, private] |
Definition at line 102 of file PeriodicRealTimeout.cpp.
Definition at line 125 of file PeriodicRealTimeout.hpp.
pthread_cond_t wns::events::PeriodicRealTimeout::dataRead [private] |
Definition at line 117 of file PeriodicRealTimeout.hpp.
Definition at line 120 of file PeriodicRealTimeout.hpp.
pthread_mutex_t wns::events::PeriodicRealTimeout::mutex [private] |
Definition at line 118 of file PeriodicRealTimeout.hpp.
Definition at line 119 of file PeriodicRealTimeout.hpp.
Definition at line 123 of file PeriodicRealTimeout.hpp.
pthread_t wns::events::PeriodicRealTimeout::thread [private] |
Definition at line 124 of file PeriodicRealTimeout.hpp.
1.5.5