|
PLCnext API Documentation
22.3.0.20
|
Proxy object for a NotificationRegistration More...
#include <NotificationRegistration.hpp>

Public Types | |
| using | payload_type = PayloadType |
Public Member Functions | |
| NotificationRegistration ()=default | |
| Creates an empty NotificationRegistration More... | |
| NotificationRegistration (const String ¬ificationName, const String &senderName, Severity severity, INotificationSending ¬ificationSending) | |
| Creates a NotificationRegistration More... | |
| NotificationRegistration (NotificationRegistration &&other) | |
| NotificationRegistration & | operator= (NotificationRegistration &&other) |
| NotificationRegistration (const NotificationRegistration &)=delete | |
| NotificationRegistration & | operator= (const NotificationRegistration &)=delete |
| template<typename... Args> | |
| NotificationIdType | SendNotification (Args &&... args) |
| Sends a notification More... | |
| template<typename... Args> | |
| NotificationIdType | SendNotificationWithTimestamp (const DateTime ×tamp, Args &&... args) |
| Sends a notification with a specified timestamp More... | |
| NotificationNameIdType | GetNotificationNameId () const override |
| Returns the NotificationNameId More... | |
Public Member Functions inherited from Arp::System::Nm::NotificationRegistrationBase< NotificationRegistration< PayloadType > > | |
| NotificationRegistrationBase (const NotificationRegistrationBase &)=delete | |
| NotificationRegistrationBase & | operator= (NotificationRegistrationBase &&other)=default |
| NotificationRegistrationBase & | operator= (const NotificationRegistrationBase &)=delete |
| void | Dispose () noexcept |
| Unregisters the Notification and release all resources More... | |
| const String | GetNotificationName () const |
| Returns the notification name More... | |
| const String | GetSenderName () const |
| Returns the sender name More... | |
| Severity | GetSeverity () const |
| Returns the Severity More... | |
| PayloadTypeIdType | GetPayloadTypeId () const |
| Returns the PayloadTypeId More... | |
Proxy object for a NotificationRegistration
This proxy class represents a Notification registration like a smart pointer. The Notification is registered in the constructor and unregistered in the destructor. Notifications can be send using the SendNotification method. The template parameter PayloadType indicates the Payload class to be used when sending Notifications.
This class supportes move semantics. Ownerchip of a notification registration is transfered by a move operation.
This class uses the INotificationSending interface. All calls to the NotificationManager are synchronous.
|
default |
Creates an empty NotificationRegistration
To be used as a class member, when it cannot be initialized directly. Use move semantics to transfer ownership from another object.
| Arp::System::Nm::NotificationRegistration< PayloadType >::NotificationRegistration | ( | const String & | notificationName, |
| const String & | senderName, | ||
| Severity | severity, | ||
| INotificationSending & | notificationSending | ||
| ) |
Creates a NotificationRegistration
| notificationName | name of the notification (e.g. Arp.System.Nm.SomethingInterestingHappened) |
| senderName | name of the sender of the notification |
| severity | severity of the notification |
| notificationSending | reference to the NotificationManager |
|
overridevirtual |
Returns the NotificationNameId
Implements Arp::System::Nm::NotificationRegistrationBase< NotificationRegistration< PayloadType > >.
| NotificationIdType Arp::System::Nm::NotificationRegistration< PayloadType >::SendNotification | ( | Args &&... | args | ) |
Sends a notification
| args | Arguments to the constructor of PayloadType (variadic) |
Uses the current time as timestamp.
| NotificationIdType Arp::System::Nm::NotificationRegistration< PayloadType >::SendNotificationWithTimestamp | ( | const DateTime & | timestamp, |
| Args &&... | args | ||
| ) |
Sends a notification with a specified timestamp
| timestamp | timestamp to be used |
| args | Arguments to the constructor of PayloadType (variadic) |
1.8.13