PLCnext API Documentation 24.0.0.71
NonBlockingNotificationSendingAdapter.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6
7#pragma once
8
10#include "Arp/System/Nm/INonBlockingNotificationSending.hpp"
11#include "Arp/System/Nm/NonBlockingNotificationRegistration3ArgumentsBufferBase.hpp"
12#include <limits>
13#include <memory>
14
15namespace Arp { namespace System { namespace Nm
16{
17
18class NotificationManager;
19class NonBlockingNotificationRegistration3ArgumentsBufferBase;
20
26{
27public:
29 {
30 std::shared_ptr<NonBlockingNotificationRegistration3ArgumentsBufferBase> BufferPtr = nullptr;
31 size_t Index = std::numeric_limits<size_t>::max();
32 };
33 using CreatePayloadFunctor = RawPayloadType (*)(CreatePayloadFunctorArg);
34
36
37 NotificationNameIdType RegisterNotification(
38 const String& notificationName, const String& senderName, Severity severity, PayloadTypeIdType payloadTypeId);
39
41 const String& senderName, Severity severity, PayloadTypeIdType payloadTypeId) override;
42
43 void NonBlockingRegisterNotification(const String& notificationName, const String& senderName, Severity severity,
45
47
48 void NonBlockingUnregisterNotification(NotificationNameIdType notificationNameId, Future<void> result);
49
51 NotificationNameIdType notificationNameId, Arp::DateTime timestamp, const RawPayloadType& payload) override;
52
54 NotificationNameIdType notificationNameId, Arp::DateTime timestamp, const IPayload& payload) override;
55
56 void NonBlockingSendNotification(NotificationNameIdType notificationNameId, Arp::DateTime timestamp,
57 std::function<RawPayloadType()> createPayloadFunctor, Future<NotificationIdType> result);
58
59 void NonBlockingSendNotification(NotificationNameIdType notificationNameId, Arp::DateTime timestamp,
60 CreatePayloadFunctor createPayloadFunctor, CreatePayloadFunctorArg createPayloadFunctorArg,
62
63private:
65};
66
67}}} // namespace Arp::System::Nm
The class contains date and time informations.
Definition: DateTime.hpp:46
Future object as proxy for return value an asynchronous function call
Definition: Future.hpp:192
Future object as proxy for return value an asynchronous function call
Definition: Future.hpp:115
Interface for non blocking sending of Notifications
Definition: INonBlockingNotificationSending.hpp:23
Interface for Paylo objects
Definition: IPayload.hpp:19
Adapter for INonBlockingNotificationSending with additional functions
Definition: NonBlockingNotificationSendingAdapter.hpp:26
Future< NotificationIdType > NonBlockingSendNotification(NotificationNameIdType notificationNameId, Arp::DateTime timestamp, const IPayload &payload) override
Sends a notification (non-blocking)
Future< NotificationIdType > NonBlockingSendNotification(NotificationNameIdType notificationNameId, Arp::DateTime timestamp, const RawPayloadType &payload) override
Sends a notification (non-blocking)
Future< void > NonBlockingUnregisterNotification(NotificationNameIdType notificationNameId) override
Unregisters a Nototification (non-blocking)
Future< NotificationNameIdType > NonBlockingRegisterNotification(const String &notificationName, const String &senderName, Severity severity, PayloadTypeIdType payloadTypeId) override
Registers a new Notification (non-blocking)
Primary access to the NotificationManager
Definition: NotificationManager.hpp:50
@ System
System components used by the System, Device, Plc or Io domains.
enum ARP_CXX_SYMBOL_EXPORT Severity
Enumeration of Severities for notifications
Definition: Severity.hpp:14
std::vector< Arp::System::Rsc::Services::RscVariant< RawPayloadTypeLength > > RawPayloadType
type for the internally transferred payloads
Definition: NotificationManagerTypes.hpp:34
Root namespace for the PLCnext API
Definition: NonBlockingNotificationSendingAdapter.hpp:29