PLCnext API Documentation 25.0.2.69
DcgResultInfo.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Rsc/Commons/Rsc.hpp"
9#include "Arp/Base/Rsc/Commons/RscSerializable.hpp"
10#include "Arp/Base/Rsc/Commons/RscString.hxx"
11#include "Arp/Plc/Domain/Commons/DcgResult.hpp"
12
14{
15
16using namespace Arp::Base::Rsc::Commons;
17using namespace Arp::Base::Rsc::Commons::Services;
18
20class ARP_EXPORT DcgResultInfo : public RscSerializable
21{
22public: //construction
24
25private:
26 DcgResultInfo(DcgResult result, const String& refusedReason);
27
28public: // static operations
29 static DcgResultInfo CreateEmpty(void);
30 static DcgResultInfo CreateSuccess(void);
31 static DcgResultInfo CreateRefused(const String& refusedReason);
32
33public:
34 DcgResult GetResult(void)const;
35 String GetMessage(void)const;
36
37public:
38 void Serialize(RscWriter& writer)const;
39 void Deserialize(RscReader& reader);
40
41public: // static RSC operation
42 static size_t GetFieldCount(void);
43
44private: // fields
46 RscString<512> message;
47
48private: // const member
49 static constexpr size_t fieldCount = 2;
50 static constexpr int maxMessageLength = 512;
51};
52
53} // end of namespace Arp::Plc::Domain::Commons
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
Any custom struct type which is intended to be marshalled in a Rsc serialization context,...
Definition: RscSerializable.hpp:35
Reads marshaled data of RSC services.
Definition: RscReader.hpp:34
Writes marshalled data of RSC services.
Definition: RscWriter.hpp:34
This class is used to return the result of a PLC operation concerning download-changes (Dcg).
Definition: DcgResultInfo.hpp:21
DcgResultInfo(void)
The default constructor creates an empty instance.
Namespace for interface types of the PLC domain
DcgResult
The result of a PLC download-changes operation.
Definition: DcgResult.hpp:19
@ None
Determines an empty download-changes result.