|
| WaitSet (const WaitSet &rhs)=delete |
| all the Trigger have a pointer pointing to this waitset for cleanup calls, therefore the WaitSet cannot be moved
|
|
| WaitSet (WaitSet &&rhs)=delete |
|
WaitSet & | operator= (const WaitSet &rhs)=delete |
|
WaitSet & | operator= (WaitSet &&rhs)=delete |
|
void | markForDestruction () noexcept |
| Non-reversible call. After this call wait() and timedWait() do not block any longer and never return triggered events/states. This method can be used to manually initialize destruction and to wakeup any thread which is waiting in wait() or timedWait().
|
|
template<typename T , typename EventType , typename ContextDataType = internal::NoType_t, typename = std::enable_if_t<std::is_enum<EventType>::value>> |
cxx::expected< WaitSetError > | attachEvent (T &eventOrigin, const EventType eventType, const uint64_t notificationId=0U, const NotificationCallback< T, ContextDataType > &eventCallback={}) noexcept |
| attaches an event of a given class to the WaitSet. More...
|
|
template<typename T , typename EventType , typename ContextDataType = internal::NoType_t, typename = std::enable_if_t<std::is_enum<EventType>::value, void>> |
cxx::expected< WaitSetError > | attachEvent (T &eventOrigin, const EventType eventType, const NotificationCallback< T, ContextDataType > &eventCallback) noexcept |
| attaches an event of a given class to the WaitSet. More...
|
|
template<typename T , typename ContextDataType = internal::NoType_t> |
cxx::expected< WaitSetError > | attachEvent (T &eventOrigin, const uint64_t notificationId=0U, const NotificationCallback< T, ContextDataType > &eventCallback={}) noexcept |
| attaches an event of a given class to the WaitSet. More...
|
|
template<typename T , typename ContextDataType = internal::NoType_t> |
cxx::expected< WaitSetError > | attachEvent (T &eventOrigin, const NotificationCallback< T, ContextDataType > &eventCallback) noexcept |
| attaches an event of a given class to the WaitSet. More...
|
|
template<typename T , typename StateType , typename ContextDataType = internal::NoType_t, typename = std::enable_if_t<std::is_enum<StateType>::value>> |
cxx::expected< WaitSetError > | attachState (T &stateOrigin, const StateType stateType, const uint64_t id=0U, const NotificationCallback< T, ContextDataType > &stateCallback={}) noexcept |
| attaches a state of a given class to the WaitSet. More...
|
|
template<typename T , typename StateType , typename ContextDataType = internal::NoType_t, typename = std::enable_if_t<std::is_enum<StateType>::value, void>> |
cxx::expected< WaitSetError > | attachState (T &stateOrigin, const StateType stateType, const NotificationCallback< T, ContextDataType > &stateCallback) noexcept |
| attaches a state of a given class to the WaitSet. More...
|
|
template<typename T , typename ContextDataType = internal::NoType_t> |
cxx::expected< WaitSetError > | attachState (T &stateOrigin, const uint64_t id=0U, const NotificationCallback< T, ContextDataType > &stateCallback={}) noexcept |
| attaches a state of a given class to the WaitSet. More...
|
|
template<typename T , typename ContextDataType = internal::NoType_t> |
cxx::expected< WaitSetError > | attachState (T &stateOrigin, const NotificationCallback< T, ContextDataType > &stateCallback) noexcept |
| attaches a state of a given class to the WaitSet. More...
|
|
template<typename T , typename... Targs> |
void | detachEvent (T &eventOrigin, const Targs &... args) noexcept |
| detaches an event from the WaitSet More...
|
|
template<typename T , typename... Targs> |
void | detachState (T &stateOrigin, const Targs &... args) noexcept |
| detaches a state based trigger from the WaitSet More...
|
|
NotificationInfoVector | timedWait (const units::Duration timeout) noexcept |
| Blocking wait with time limit till one or more of the triggers are triggered. More...
|
|
NotificationInfoVector | wait () noexcept |
| Blocking wait till one or more of the triggers are triggered. More...
|
|
uint64_t | size () const noexcept |
| Returns the amount of stored Trigger inside of the WaitSet.
|
|
template<uint64_t Capacity = MAX_NUMBER_OF_ATTACHMENTS_PER_WAITSET>
class iox::popo::WaitSet< Capacity >
Logical disjunction of a certain number of Triggers.
The WaitSet stores Triggers and allows the user to wait till one or more of those Triggers are triggered. It works over process borders. With the creation of a WaitSet it requests a condition variable from RouDi and destroys it with the destructor. Hence the lifetime of the condition variable is bound to the lifetime of the WaitSet.
- Parameters
-
[in] | Capacity | the amount of events/states which can be attached to the waitset |