PLCnext API Documentation 25.0.2.69
NonBlockingNotificationSendingAdapter.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
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
40 Future<NotificationNameIdType> NonBlockingRegisterNotification(const String& notificationName,
41 const String& senderName, Severity severity, PayloadTypeIdType payloadTypeId) override;
42
43 void NonBlockingRegisterNotification(const String& notificationName, const String& senderName, Severity severity,
45
46 Future<void> NonBlockingUnregisterNotification(NotificationNameIdType notificationNameId) override;
47
48 void NonBlockingUnregisterNotification(NotificationNameIdType notificationNameId, Future<void> result);
49
50 Future<NotificationIdType> NonBlockingSendNotification(
51 NotificationNameIdType notificationNameId, Arp::DateTime timestamp, const RawPayloadType& payload) override;
52
53 Future<NotificationIdType> NonBlockingSendNotification(
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
This class contains date and time informations.
Definition: DateTime.hpp:27
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
Future object as proxy for return value an asynchronous function call
Definition: Future.hpp:144
Future object as proxy for return value an asynchronous function call
Definition: Future.hpp:68
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
Primary access to the NotificationManager
Definition: NotificationManager.hpp:48
enum ARP_CXX_SYMBOL_EXPORT Severity
Enumeration of Severities for notifications
Definition: Severity.hpp:14
std::vector< Arp::Base::Rsc::Commons::RscVariant< RawPayloadTypeLength > > RawPayloadType
type for the internally transferred payloads
Definition: NotificationManagerTypes.hpp:32
Root namespace for the PLCnext API
Definition: NonBlockingNotificationSendingAdapter.hpp:29