Public Member Functions |
| Monitor () |
| Construct a new monitor with a default value of 0.
|
| Monitor (const T &value) |
| Construct a new monitor with a given default value.
|
| Monitor (const Monitor< T > &from) |
| Ctor initializing with the given monitor value.
|
| ~Monitor () |
| Destructs the monitor.
|
template<> |
Monitor< bool > & | operator++ () |
template<> |
Monitor< bool > & | operator-- () |
template<> |
Monitor< bool > & | operator|= (const bool &value) |
|
Monitor & | operator++ () |
| Increment the monitored value, prefix only.
|
Monitor & | operator-- () |
| Decrement the monitored value, prefix only.
|
Monitor & | operator= (const T &value) |
| Assign a new value.
|
const Monitor & | operator= (const Monitor< T > &from) |
| Assign a new value.
|
Monitor & | operator|= (const T &value) |
| Perform an or operation on the value.
|
void | set (const T &value) |
| Set a new value.
|
|
const T & | waitEQ (const T &value) const |
| Block until the monitor has the given value.
|
const T | waitNE (const T &value) const |
| Block until the monitor has not the given value.
|
const T | waitNE (const T &v1, const T &v2) const |
| Block until the monitor has none of the given values.
|
const T | waitGE (const T &value) const |
| Block until the monitor has a value greater or equal to the given value.
|
const T | waitLE (const T &value) const |
| Block until the monitor has a value less or equal to the given value.
|
|
bool | timedWaitEQ (const T &value, const uint32_t timeout) const |
| Block until the monitor has the given value.
|
bool | timedWaitGE (const T &value, const uint32_t timeout) const |
| Block until the monitor has a value greater or equal to the given value.
|
|
bool | operator== (const T &value) const |
bool | operator!= (const T &value) const |
bool | operator< (const T &value) const |
bool | operator> (const T &value) const |
bool | operator<= (const T &value) const |
bool | operator>= (const T &value) const |
bool | operator== (const Monitor< T > &rhs) const |
bool | operator!= (const Monitor< T > &rhs) const |
bool | operator< (const Monitor< T > &rhs) const |
bool | operator> (const Monitor< T > &rhs) const |
bool | operator<= (const Monitor< T > &rhs) const |
bool | operator>= (const Monitor< T > &rhs) const |
|
const T & | operator-> () const |
const T & | get () const |
T | operator+ (const T &value) const |
T | operator| (const T &value) const |
T | operator& (const T &value) const |
template<typename T>
class co::base::Monitor< T >
A monitor primitive.
A monitor has a value, which can be monitored to reach a certain state. The caller is blocked until the condition is fulfilled. The concept is similar to a pthread condition, with more usage convenience.
Definition at line 42 of file monitor.h.