Skip to content

iox::popo::NotificationInfo🔗

NotificationInfo holds the state of a trigger like the pointer to the triggerOrigin, the notification id and the callback. #include <iceoryx_posh/popo/notification_info.hpp>

Public Functions🔗

Name
NotificationInfo() =default
constructs an empty NotificationInfo
virtual ~NotificationInfo() =default
template <typename T ,typename ContextDataType >
NotificationInfo(T *const notificationOrigin, const uint64_t notificationId, const NotificationCallback< T, ContextDataType > & callback)
constructs a NotificationInfo object
uint64_t getNotificationId() const
returns the notification id
template <typename T >
bool
doesOriginateFrom(T *const notificationOrigin) const
confirms the notificationOrigin
template <typename T >
T *
getOrigin() const
returns the pointer to the notificationOrigin.
bool operator()() const
If a callback is set it executes the callback.

Public Attributes🔗

Name
constexpr uint64_t INVALID_ID

Protected Attributes🔗

Name
void * m_notificationOrigin
void * m_userValue
uint64_t m_notificationOriginTypeHash
uint64_t m_notificationId
internal::GenericCallbackPtr_t m_callbackPtr
internal::TranslationCallbackPtr_t m_callback

Friends🔗

Name
class Trigger

Public Functions Documentation🔗

function NotificationInfo🔗

NotificationInfo() =default

constructs an empty NotificationInfo

function ~NotificationInfo🔗

virtual ~NotificationInfo() =default

function NotificationInfo🔗

template <typename T ,
typename ContextDataType >
NotificationInfo(
    T *const notificationOrigin,
    const uint64_t notificationId,
    const NotificationCallback< T, ContextDataType > & callback
)

constructs a NotificationInfo object

Parameters:

  • notificationOrigin the origin of the event
  • notificationId id of the event
  • callback the callback of the event

function getNotificationId🔗

uint64_t getNotificationId() const

returns the notification id

Return: the empty NotificationInfo always returns INVALID_ID, otherwise the actual notificationId is returned which can also be INVALID_ID

function doesOriginateFrom🔗

template <typename T >
bool doesOriginateFrom(
    T *const notificationOrigin
) const

confirms the notificationOrigin

Parameters:

  • notificationOrigin the possible notificationOrigin

Return: true if the address is equal to the notificationOrigin, otherwise false. The empty NotificationInfo returns always false.

function getOrigin🔗

template <typename T >
T * getOrigin() const

returns the pointer to the notificationOrigin.

Return: If T equals the Triggerable type it returns the notificationOrigin. Otherwise it calls the errorHandler with a moderate error of kPOPO__EVENT_INFO_TYPE_INCONSISTENCY_IN_GET_ORIGIN and returns nullptr.

function operator()🔗

bool operator()() const

If a callback is set it executes the callback.

Return: true if the callback was called, otherwise false

Public Attributes Documentation🔗

variable INVALID_ID🔗

static constexpr uint64_t INVALID_ID = std::numeric_limits<uint64_t>::max();

Protected Attributes Documentation🔗

variable m_notificationOrigin🔗

void * m_notificationOrigin = nullptr;

variable m_userValue🔗

void * m_userValue = nullptr;

variable m_notificationOriginTypeHash🔗

uint64_t m_notificationOriginTypeHash = 0U;

variable m_notificationId🔗

uint64_t m_notificationId = INVALID_ID;

variable m_callbackPtr🔗

internal::GenericCallbackPtr_t m_callbackPtr = nullptr;

variable m_callback🔗

internal::TranslationCallbackPtr_t m_callback = nullptr;

Friends🔗

friend Trigger🔗

friend class Trigger(
    Trigger 
);

Updated on 2 April 2022 at 16:37:47 CEST