A Component interface to the Real-Time types::Toolkit's timer. It must be configured with a Activity which will emit the timeout event of this component. More...
#include <TimerComponent.hpp>
Classes | |
struct | TimeoutCatcher |
Public Member Functions | |
TimerComponent (std::string name="os::Timer") | |
virtual | ~TimerComponent () |
Protected Member Functions | |
bool | isTimerExpired (RTT::os::Timer::TimerId id) const |
bool | startHook () |
void | stopHook () |
void | updateHook () |
bool | wait (RTT::os::Timer::TimerId id, double seconds) |
bool | waitFor (RTT::os::Timer::TimerId id) |
Protected Attributes | |
OutputPort < RTT::os::Timer::TimerId > | mtimeoutEvent |
TimeoutCatcher | mtimer |
std::vector< OutputPort < RTT::os::Timer::TimerId > * > | port_timers |
RTT::Operation< bool(RTT::os::Timer::TimerId, double)> | waitCommand |
RTT::Operation< bool(RTT::os::Timer::TimerId)> | waitForCommand |
A Component interface to the Real-Time types::Toolkit's timer. It must be configured with a Activity which will emit the timeout event of this component.
Definition at line 21 of file TimerComponent.hpp.
OCL::TimerComponent::TimerComponent | ( | std::string | name = "os::Timer" | ) |
Set up a component for timing events.
Definition at line 14 of file TimerComponent.cpp.
OCL::TimerComponent::~TimerComponent | ( | ) | [virtual] |
Definition at line 40 of file TimerComponent.cpp.
bool OCL::TimerComponent::isTimerExpired | ( | RTT::os::Timer::TimerId | id | ) | const [protected] |
Command Condition: return true if id expired.
Definition at line 71 of file TimerComponent.cpp.
bool OCL::TimerComponent::startHook | ( | ) | [protected, virtual] |
This hook will check if a Activity has been properly setup.
Reimplemented from RTT::base::TaskCore.
Definition at line 46 of file TimerComponent.cpp.
void OCL::TimerComponent::stopHook | ( | ) | [protected, virtual] |
Reimplemented from RTT::base::TaskCore.
Definition at line 56 of file TimerComponent.cpp.
void OCL::TimerComponent::updateHook | ( | ) | [protected, virtual] |
Reimplemented from RTT::base::TaskCore.
Definition at line 51 of file TimerComponent.cpp.
bool OCL::TimerComponent::wait | ( | RTT::os::Timer::TimerId | id, |
double | seconds | ||
) | [protected] |
Command Implementation: arm and wait until a timer expires.
Definition at line 61 of file TimerComponent.cpp.
bool OCL::TimerComponent::waitFor | ( | RTT::os::Timer::TimerId | id | ) | [protected] |
Command Implementation: wait until a timer expires.
Definition at line 66 of file TimerComponent.cpp.
Definition at line 42 of file TimerComponent.hpp.
TimeoutCatcher OCL::TimerComponent::mtimer [protected] |
Definition at line 43 of file TimerComponent.hpp.
std::vector<OutputPort<RTT::os::Timer::TimerId>* > OCL::TimerComponent::port_timers [protected] |
Definition at line 41 of file TimerComponent.hpp.
RTT::Operation<bool(RTT::os::Timer::TimerId, double)> OCL::TimerComponent::waitCommand [protected] |
Command: arm and wait until a timer expires.
Definition at line 61 of file TimerComponent.hpp.
RTT::Operation<bool(RTT::os::Timer::TimerId)> OCL::TimerComponent::waitForCommand [protected] |
Command: wait until a timer expires.
Definition at line 56 of file TimerComponent.hpp.