PLCnext API Documentation  22.3.0.20
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 
11 namespace Arp { namespace System { namespace NmPayload { namespace NotificationLogger
12 {
13 
16 class StorageFileIntegrityCheckPayload : public Arp::System::Nm::SpecializedPayload<StorageFileIntegrityCheckPayload>
17 {
18 
19 public:
20  using SpecializedPayload::SpecializedPayload;
21 
25  const String& archiveName, const String& filePath, const String& backupFilePath, const String& message);
26 
28  String GetArchiveName() const;
29 
31  String GetFilePath() const;
32 
34  String GetBackupFilePath() const;
35 
37  String GetMessage() const;
38 
39 private:
40  String BuildFormatString() const;
41 
42 private:
43  // Do not change the order of the field initialization!
44  const size_t indexArchiveName = this->AddField<String>();
45  const size_t indexFilePath = this->AddField<String>();
46  const size_t indexBackupFilePath = this->AddField<String>();
48 };
49 
50 }}}} // end of namespace Arp::System::NmPayload::NotificationLogger
String GetMessage() const
Returns the error message from the integrity check
Payload class for a message regarding the a failed integrity check of a NotificationLogger archive...
Definition: StorageFileIntegrityCheckPayload.hpp:16
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:42
StorageFileIntegrityCheckPayload(const String &archiveName, const String &filePath, const String &backupFilePath, const String &message)
Creates a payload object
String GetFilePath() const
Returns the name of the storage file
Root namespace for the PLCnext API
System components used by the System, Device, Plc or Io domains.
String GetBackupFilePath() const
Returns the path of the backup file
Definition: LongStringPayloadField.hpp:16