An object oriented wrapper around a condition variable. More...
#include <Condition.hpp>
Public Member Functions | |
void | broadcast () |
void | broadcast () |
Condition () | |
Condition () | |
template<class Predicate > | |
bool | wait (Mutex &m, Predicate &p) |
bool | wait (Mutex &m) |
template<class Predicate > | |
bool | wait (Mutex &m, Predicate &p) |
bool | wait (Mutex &m) |
bool | wait_until (Mutex &m, nsecs abs_time) |
bool | wait_until (Mutex &m, nsecs abs_time) |
~Condition () | |
~Condition () | |
Protected Attributes | |
rt_cond_t | c |
An object oriented wrapper around a condition variable.
Definition at line 50 of file install/include/rtt/os/Condition.hpp.
RTT::os::Condition::Condition | ( | ) | [inline] |
Initialize a Condition.
Definition at line 51 of file install/include/rtt/os/Condition.hpp.
RTT::os::Condition::~Condition | ( | ) | [inline] |
Destroy a Condition. If the Condition is still locked, the RTOS will not be asked to clean up its resources.
Definition at line 61 of file install/include/rtt/os/Condition.hpp.
RTT::os::Condition::Condition | ( | ) | [inline] |
Initialize a Condition.
Definition at line 51 of file rtt/os/Condition.hpp.
RTT::os::Condition::~Condition | ( | ) | [inline] |
Destroy a Condition. If the Condition is still locked, the RTOS will not be asked to clean up its resources.
Definition at line 61 of file rtt/os/Condition.hpp.
void RTT::os::Condition::broadcast | ( | ) | [inline] |
Wake all threads that are blocking in wait() or wait_until().
Definition at line 95 of file rtt/os/Condition.hpp.
void RTT::os::Condition::broadcast | ( | ) | [inline] |
Wake all threads that are blocking in wait() or wait_until().
Definition at line 95 of file install/include/rtt/os/Condition.hpp.
bool RTT::os::Condition::wait | ( | Mutex & | m, | |
Predicate & | p | |||
) | [inline] |
Wait forever until a condition occurs
m | The mutex you hold locked when calling this function. | |
p | A function object returning a boolean |
Definition at line 86 of file rtt/os/Condition.hpp.
bool RTT::os::Condition::wait | ( | Mutex & | m | ) | [inline] |
Wait forever until a condition occurs
m | The mutex you hold locked when calling this function. |
Definition at line 72 of file rtt/os/Condition.hpp.
bool RTT::os::Condition::wait | ( | Mutex & | m, | |
Predicate & | p | |||
) | [inline] |
Wait forever until a condition occurs
m | The mutex you hold locked when calling this function. | |
p | A function object returning a boolean |
Definition at line 86 of file install/include/rtt/os/Condition.hpp.
bool RTT::os::Condition::wait | ( | Mutex & | m | ) | [inline] |
Wait forever until a condition occurs
m | The mutex you hold locked when calling this function. |
Definition at line 72 of file install/include/rtt/os/Condition.hpp.
Wait for this condition, but don't wait longer for it than the specified absolute time.
m | The mutex you hold locked when calling this function. | |
abs_time | The absolute time to wait until before the condition happens. Use rtos_get_time_ns() to get the current time and Seconds_to_nsecs to add a certain amount to the result. |
Definition at line 111 of file rtt/os/Condition.hpp.
Wait for this condition, but don't wait longer for it than the specified absolute time.
m | The mutex you hold locked when calling this function. | |
abs_time | The absolute time to wait until before the condition happens. Use rtos_get_time_ns() to get the current time and Seconds_to_nsecs to add a certain amount to the result. |
Definition at line 111 of file install/include/rtt/os/Condition.hpp.
rt_cond_t RTT::os::Condition::c [protected] |
Definition at line 46 of file install/include/rtt/os/Condition.hpp.