PLCnext API Documentation 23.0.2.9
SecurityNotificationPayload.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
7
8#include "Arp/System/NmPayload/Security/SecurityNotificationInfo.hpp"
9#include "Arp/System/Nm/SpecializedPayload.hpp"
10#include "Arp/System/Nm/Notification.hpp"
11#include "Arp/System/Nm/LongStringPayloadField.hpp"
12
13namespace Arp { namespace System { namespace NmPayload { namespace Security
14{
15
21 : public Arp::System::Nm::SpecializedPayload<SecurityNotificationPayload>
22{
23public:
24
26 SecurityNotificationPayload(const String& message, const SecurityNotificationInfo& infoArg, String syslogFacility);
27 SecurityNotificationPayload(const String& message, const SecurityNotificationInfo& infoArg);
28 explicit SecurityNotificationPayload(const String& message);
30
34
37
40
43private:
44 String BuildFormatString() const;
45
46 // Do not change the order of the field initialization!
48 size_t fieldIndexSyslogFacility = this->AddField<String>();
50 SecurityNotificationInfo info;
51};
52
53}}}} // 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:22
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:19
Definition: LongStringPayloadField.hpp:17
Contains meta data and paylod of a Notification
Definition: Notification.hpp:22
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:43
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API