17#ifndef IOX_POSH_POPO_TRIGGER_HPP
18#define IOX_POSH_POPO_TRIGGER_HPP
20#include "iceoryx_hoofs/cxx/helplets.hpp"
21#include "iceoryx_hoofs/cxx/method_callback.hpp"
22#include "iceoryx_posh/internal/popo/building_blocks/condition_variable_data.hpp"
23#include "iceoryx_posh/popo/notification_callback.hpp"
24#include "iceoryx_posh/popo/notification_info.hpp"
58 static constexpr uint64_t INVALID_TRIGGER_ID = std::numeric_limits<uint64_t>::max();
77 template <
typename T,
typename UserType>
99 template <
typename T,
typename UserType>
174 uint64_t m_uniqueId = INVALID_TRIGGER_ID;
176 TriggerType m_triggerType = TriggerType::STATE_BASED;
177 uint64_t m_originTriggerType = INVALID_TRIGGER_ID;
178 uint64_t m_originTriggerTypeHash = INVALID_TRIGGER_ID;
185#include "iceoryx_posh/internal/popo/trigger.inl"
NotificationInfo holds the state of a trigger like the pointer to the triggerOrigin,...
Definition notification_info.hpp:35
The Trigger class is usually managed by a factory class like a WaitSet and acquired by classes which ...
Definition trigger.hpp:56
void invalidate() noexcept
invalidates the Trigger without calling the reset callback
void reset() noexcept
resets and invalidates the Trigger
bool isStateConditionSatisfied() const noexcept
returns the result of the provided hasTriggeredCallback
TriggerType getTriggerType() const noexcept
returns the type of trigger
bool isValid() const noexcept
returns true if the trigger is valid otherwise false
const NotificationInfo & getNotificationInfo() const noexcept
returns the NotificationInfo
~Trigger() noexcept
calls reset on destruction
Trigger(EventBasedTrigger_t, T *const notificationOrigin, const cxx::MethodCallback< void, uint64_t > &resetCallback, const uint64_t notificationId, const NotificationCallback< T, UserType > &callback, const uint64_t uniqueId, const uint64_t notificationType, const uint64_t notificationTypeHash) noexcept
Creates an event based Trigger.
bool isLogicalEqualTo(const void *const notificationOrigin, const uint64_t originTriggerType, const uint64_t originTriggerTypeHash) const noexcept
returns true if the Triggers are logical equal otherwise false. Two Triggers are logical equal when
uint64_t getUniqueId() const noexcept
returns the internal unique id of the trigger
Trigger(StateBasedTrigger_t, T *const stateOrigin, const cxx::ConstMethodCallback< bool > &hasTriggeredCallback, const cxx::MethodCallback< void, uint64_t > &resetCallback, const uint64_t notificationId, const NotificationCallback< T, UserType > &callback, const uint64_t uniqueId, const uint64_t stateType, const uint64_t stateTypeHash) noexcept
Creates a state based Trigger.
void updateOrigin(T &newOrigin) noexcept
sets a new origin of the trigger
Definition trigger.hpp:39
the struct describes a callback with a user defined type which can be attached to a WaitSet or a List...
Definition notification_callback.hpp:58
Definition trigger.hpp:34