PLCnext API Documentation  22.9.0.33
StorageFileIntegrityCheckPayload.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Nm/LongStringPayloadField.hpp"
9 #include "Arp/System/Nm/SpecializedPayload.hpp"
10 #include <tuple>
11 
12 namespace Arp { namespace System { namespace NmPayload { namespace NotificationLogger
13 {
14 
17 class StorageFileIntegrityCheckPayload : public Arp::System::Nm::SpecializedPayload<StorageFileIntegrityCheckPayload>
18 {
19 
20 public:
22  using ArgumentsType = std::tuple<const char*, const char*, const char*, const char*>;
23 
24  using SpecializedPayload::SpecializedPayload;
25 
28 
32  const String& archiveName, const String& filePath, const String& backupFilePath, const String& message);
33 
36 
39 
42 
44  String GetMessage() const;
45 
46 private:
47  String BuildFormatString() const;
48 
49 private:
50  // Do not change the order of the field initialization!
51  const size_t indexArchiveName = this->AddField<String>();
52  const size_t indexFilePath = this->AddField<String>();
53  const size_t indexBackupFilePath = this->AddField<String>();
55 };
56 
57 }}}} // end of namespace Arp::System::NmPayload::NotificationLogger
Payload class for a message regarding the a failed integrity check of a NotificationLogger archive
Definition: StorageFileIntegrityCheckPayload.hpp:18
std::tuple< const char *, const char *, const char *, const char * > ArgumentsType
ArgumentsType to be used with NonBlockingNotificationRegistration3
Definition: StorageFileIntegrityCheckPayload.hpp:22
StorageFileIntegrityCheckPayload(const String &archiveName, const String &filePath, const String &backupFilePath, const String &message)
Creates a payload object
String GetBackupFilePath() const
Returns the path of the backup file
String GetFilePath() const
Returns the name of the storage file
StorageFileIntegrityCheckPayload(const ArgumentsType &args)
Creates a payload object
String GetMessage() const
Returns the error message from the integrity check
Definition: LongStringPayloadField.hpp:17
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