PLCnext API Documentation 24.0.0.71
SecurityNotificationPayload.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
7
9#include "Arp/System/NmPayload/Security/SecurityNotificationInfo.hpp"
10#include "Arp/System/Nm/SpecializedPayload.hpp"
11#include "Arp/System/Nm/Notification.hpp"
12#include "Arp/System/Nm/LongStringPayloadField.hpp"
13
14namespace Arp { namespace System { namespace NmPayload { namespace Security
15{
16
21class ARP_CXX_SYMBOL_EXPORT SecurityNotificationPayload
22 : public Arp::System::Nm::SpecializedPayload<SecurityNotificationPayload>
23{
24public:
25
27 SecurityNotificationPayload(const String& message, const SecurityNotificationInfo& infoArg, String syslogFacility);
28 SecurityNotificationPayload(const String& message, const SecurityNotificationInfo& infoArg);
29 explicit SecurityNotificationPayload(const String& message);
31
35
38
41
44private:
45 String BuildFormatString() const;
46
47 // Do not change the order of the field initialization!
49 size_t fieldIndexSyslogFacility = this->AddField<String>();
51 SecurityNotificationInfo info;
52};
53
54}}}} // end of namespace Arp::System::NmPayload::Security
Provides information fields for recipients The exact field keys and values are chosen by every specif...
Definition: SecurityNotificationInfo.hpp:15
Payload class to communicate security relevant events
Definition: SecurityNotificationPayload.hpp:23
SecurityNotificationPayload(const String &message, const SecurityNotificationInfo &infoArg, String syslogFacility)
Creates a SecurityNotificationPayload object
String GetMessage() const
Returns the attached payload message
const SecurityNotificationInfo & GetInfo() const
Returns a reference to the attached SecurityNotificationInfo
SecurityNotificationPayload(const Arp::System::Nm::GenericPayload &payloadArg)
Creates a view on a GenericPayload object
String GetSyslogFacility() const
Returns a string represenation of the SyslogFacility this message should be sent to
Generic access to a IPayload
Definition: GenericPayload.hpp:20
Definition: LongStringPayloadField.hpp:18
Contains meta data and paylod of a Notification
Definition: Notification.hpp:22
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:44
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API