A binary semaphore.
More...
#include <epicsEvent.h>
|
| epicsEvent (epicsEventInitialState initial=epicsEventEmpty) |
| Constructor.
|
|
| ~epicsEvent () |
| Destroy the epicsEvent and any resources it holds. No calls to wait() can be active when this call is made.
|
|
void | trigger () |
| Trigger the event i.e. ensures the next or current call to wait completes. This method may be called from a vxWorks or RTEMS interrupt handler.
|
|
void | signal () |
| Signal is a synonym for trigger().
|
|
void | wait () |
| Wait for the event.
|
|
bool | wait (double timeout) |
| Wait for the event or until the specified timeout.
|
|
bool | tryWait () |
| Similar to wait() except that if the event is currently empty the call will return immediately.
|
|
void | show (unsigned level) const |
| Display information about the semaphore.
|
|
An epicsEvent is a binary semaphore that can be empty or full. When empty, a wait() issued before the next call to trigger() will block. When full, the next call to wait() will empty the event and return immediately. Multiple calls to trigger() may occur between wait() calls but will have the same effect as a single trigger(), filling the event.
Definition at line 79 of file epicsEvent.h.
◆ epicsEvent()
- Parameters
-
initial | State when created, empty (the default) or full. |
◆ signal()
void epicsEvent::signal |
( |
| ) |
|
|
inline |
◆ wait() [1/2]
void epicsEvent::wait |
( |
| ) |
|
◆ wait() [2/2]
- Parameters
-
timeout | The timeout delay in seconds. A timeout of zero is equivalent to calling tryWait(); NaN or any value too large to be represented to the target OS is equivalent to no timeout. |
- Returns
- True if the event was triggered, False if it timed out.
◆ tryWait()
bool epicsEvent::tryWait |
( |
| ) |
|
- Returns
- True if the event was full (triggered), False if empty.
◆ show()
- Note
- The information displayed is architecture dependent.
- Parameters
-
level | An unsigned int for the level of information to be displayed. |
The documentation for this class was generated from the following file: