5#ifndef IO_EVENT_NOTIFICATION_H
6#define IO_EVENT_NOTIFICATION_H
16using namespace std::chrono_literals;
47 std::chrono::high_resolution_clock::time_point
next{ 0ms };
59 std::shared_ptr<event_queue>
queue;
184 std::unique_ptr<impl> _impl;
virtual bool process_notification(const event_notification_descriptor &desc) const noexcept=0
Notification processing interface.
virtual void start_notifications()
Start the event notifications.
virtual bool remove_notification(event_notification_id id)
Remove a notification identified by 'id'.
event_notification()
Class constructors.
virtual void remove_all_notifications()
Remove all notifications.
event_notification(event_notification &&other) noexcept
Class constructors.
virtual void stop_notifications()
Stop the event notifications.
event_notification(const event_notification &other)=delete
Class constructors.
virtual event_notification_id add_notification(const event_notification_descriptor &desc)
Add a definition when an event must be notified.
Describes the source of an event.
Definition io_event_source.h:25
event_type
Describes the event type.
Definition io_event_common.h:41
uint32_t event_notification_id
Identifies a specific notification entry.
Definition io_event_notification.h:28
event_notification_frequency
Specifies the type of notifications.
Definition io_event_notification.h:33
@ none
indicates event_type default value.
Definition io_event_common.h:42
@ single_shot
single_shot means a notification is generated once
Definition io_event_notification.h:35
@ continuous
continuous means a notification will be rescheduled
Definition io_event_notification.h:34
IO event common data types.
IO event queue interface.
Any entities that belong to the IO library.
The event_notification_descriptor class.
Definition io_event_notification.h:55
std::shared_ptr< event_queue > queue
event_queue where the event will be created
Definition io_event_notification.h:59
std::any value
value The trigger value for the notification, it depends on the event_type. For threshould events tha...
Definition io_event_notification.h:71
event_notification_schedule schedule
event_notification_schedule details how often a notification occur
Definition io_event_notification.h:65
event_type type
event_type specifies the type of the event
Definition io_event_notification.h:63
event_source source
event_source specifies where the event values come from
Definition io_event_notification.h:61
The event_notification_schedule class.
Definition io_event_notification.h:41
event_notification_frequency freq
event_notification_frequency specifies the periodicity of a notification
Definition io_event_notification.h:43
std::chrono::milliseconds interval
specifies how often a notification will be evaluated
Definition io_event_notification.h:45
std::chrono::high_resolution_clock::time_point next
reserved
Definition io_event_notification.h:47