9 #include "Arp/System/Core/AppDomainSingleton.hxx" 10 #include "Arp/System/Commons/Logging.h" 12 #include "Arp/System/Nm/INonBlockingNotificationSending.hpp" 13 #include "Arp/System/Nm/INotificationManagerInfo.hpp" 14 #include "Arp/System/Nm/INotificationReceiving.hpp" 15 #include "Arp/System/Nm/INotificationSending.hpp" 16 #include "Arp/System/Nm/NonBlockingNotificationRegistration.hpp" 17 #include "Arp/System/Nm/NonBlockingNotificationSendingAdapter.hpp" 18 #include "Arp/System/Nm/NotificationRegistration.hpp" 19 #include "Arp/System/Nm/NotificationSubscriber.hpp" 22 namespace Arp {
namespace System {
namespace Nm
49 ,
private Loggable<NotificationManager, true>
57 explicit NotificationManager(
size_t nonBlockingNotificationSendingProxyQueueLength = 128);
58 ~NotificationManager()
override;
61 NotificationManager(
const NotificationManager&) =
delete;
62 NotificationManager(NotificationManager&&) =
delete;
64 NotificationManager& operator=(
const NotificationManager&) =
delete;
65 NotificationManager& operator=(NotificationManager&&) =
delete;
76 template<
typename PayloadType>
88 template<
typename PayloadType>
104 template<
typename PayloadType>
173 void ReplaceSubscriber(
178 const std::unique_ptr<Impl> pImpl;
182 template<
typename PayloadType>
190 template<
typename PayloadType>
196 notificationName, senderName, severity, *
this);
200 template<
typename PayloadType>
Interface for non blocking sending of Notifications
Definition: INonBlockingNotificationSending.hpp:21
const PayloadTypeIdType GetPayloadTypeId(const String &payloadTypeName) override
Query an id for a given PayloadType
Interface for subscribers of Notifications
Definition: INotificationReceiving.hpp:19
Future< NotificationIdType > NonBlockingSendNotification(NotificationNameIdType notificationNameId, Arp::DateTime timestamp, const RawPayloadType &payload) override
Sends a notification (non-blocking)
NotificationNameIdType RegisterNotification(const String ¬ificationName, const String &senderName, Severity severity, PayloadTypeIdType payloadTypeId) override
Registers a new Notification
Interface for Paylo objects
Definition: IPayload.hpp:18
NotificationNameIdType Subscribe(const String ¬ificationName, INotificationSubscriber *subscriber) override
Subscribe to a Notification
Future object as proxy for return value an asynchronous function call
Definition: Future.hpp:191
The class contains date and time informations.
Definition: DateTime.hpp:44
Proxy object for a non-blocking NotificationRegistration
Definition: NonBlockingNotificationRegistration.hpp:32
NonBlockingNotificationRegistration< PayloadType > CreateNonBlockingNotificationRegistration2(const String ¬ificationName, const String &senderName, Severity severity)
Creates a NonBlockingNotificationRegistration proxy
Definition: NotificationManager.hpp:202
Future< NotificationNameIdType > NonBlockingRegisterNotification(const String ¬ificationName, const String &senderName, Severity severity, PayloadTypeIdType payloadTypeId) override
Registers a new Notification (non-blocking)
const NotificationNameIdList GetNotificationNameIdsByStatus(const NotificationRegistrationStatus &status) const override
Queries the ids of Notifications with a given NotificationRegistrationStatus
Definition: Loggable.hxx:18
const String GetNotificationName(NotificationNameIdType notificationNameId) const override
Queries the NotifictionName
void UnregisterNotification(NotificationNameIdType notificationNameId) override
Unregisters a Nototification
NotificationRegistration< PayloadType > CreateNotificationRegistration(const String ¬ificationName, const String &senderName, Severity severity)
Creates a NotificationRegistration proxy
Definition: NotificationManager.hpp:183
Interface for sending of notifications
Definition: INotificationSending.hpp:20
const NotificationNameIdList GetAllKnownNotificationNameIds() const override
Queries of all known NotificationNameIds
const NotificationRegistrationInfo GetNotificationRegistration(NotificationNameIdType notificationNameId) const override
Queries information about an Notification
std::vector< Arp::System::Rsc::Services::RscVariant< RawPayloadTypeLength > > RawPayloadType
type for the internally transferred payloads
Definition: NotificationManagerTypes.hpp:34
Future< void > NonBlockingUnregisterNotification(NotificationNameIdType notificationNameId) override
Unregisters a Nototification (non-blocking)
NotificationIdType SendNotification(NotificationNameIdType notificationNameId, Arp::DateTime timestamp, const RawPayloadType &payload) override
Sends a notification
const String GetPayloadTypeName(const PayloadTypeIdType &payloadTypeId) const override
Query the payload type name of a given id
Interface for information about the Notification Manager
Definition: INotificationManagerInfo.hpp:20
NotificationRegistrationStatus
Enumeration to represent the status of the Notification
Definition: NotificationRegistrationStatus.hpp:16
Interface for subscribers of Notifications
Definition: INotificationSubscriber.hpp:19
Severity
Enumeration of Severities for notifications
Definition: Severity.hpp:15
Root namespace for the PLCnext API
Information about the registration of a Notification
Definition: NotificationRegistrationInfo.hpp:21
This class implements the singleton pattern for singletons with process wide scope.
Definition: AppDomainSingleton.hxx:24
std::uint64_t uint64
The Arp unsigned integer type of 8 byte size.
Definition: PrimitiveTypes.hpp:39
NotificationSubscriber CreateNotificationSubscriber(const String ¬ificationName)
Creates a NotificationSubscriber proxy
Proxy object for a NotificationRegistration
Definition: NotificationRegistration.hpp:29
void UnsubscribeFromAll(INotificationSubscriber *subscriber) override
Unsubscribe from all Notification
const NotificationNameIdType GetNotificationNameId(const String ¬ificationName) override
Queries the id of an NotificationName
Arp::uint64 GetNumberOfSubmittedNotifications() const override
Returns the number of Notifications submitted since startup of the controller
Future object as proxy for return value an asynchronous function call
Definition: Future.hpp:114
System components used by the System, Device, Plc or Io domains.
NonBlockingNotificationRegistration< PayloadType > CreateNonBlockingNotificationRegistration(const String ¬ificationName, const String &senderName, Severity severity)
Creates a NonBlockingNotificationRegistration proxy
Definition: NotificationManager.hpp:192
Adapter for INonBlockingNotificationSending with additional functions
Definition: NonBlockingNotificationSendingAdapter.hpp:24
std::vector< NotificationNameIdType > NotificationNameIdList
collection of Notification name ids
Definition: NotificationManagerTypes.hpp:25
Primary access to the NotificationManager
Definition: NotificationManager.hpp:43
void Unsubscribe(NotificationNameIdType notificationNameId, INotificationSubscriber *subscriber) override
Unsubscribe from a Notification
Proxy class for an subscriber of notifications
Definition: NotificationSubscriber.hpp:27