PLCnext API Documentation  22.9.0.33
StationDiagnosisItem.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include <vector>
9 #include "Arp/System/Rsc/Services/IRscSerializable.hpp"
10 #include "Arp/System/Rsc/Services/RscReader.hpp"
11 #include "Arp/System/Rsc/Services/RscWriter.hpp"
12 
13 // DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED
14 
15 namespace Arp { namespace Io { namespace Profibus { namespace Services
16 {
17 
18 using namespace Arp;
19 using namespace Arp::System::Rsc::Services;
20 
25 {
26 public:
30  uint8 StationAddress = 0;
31 
35  uint8 MasterAddress = 0;
36 
40  uint16 Id = 0;
41 
45  boolean StationExists = false;
46 
50  boolean IsStationReady = false;
51 
55  boolean HasConfigurationError = false;
56 
60  boolean HasExtendedDiagnosis = false;
61 
65  boolean NotSupported = false;
66 
70  boolean IsValidResponse = false;
71 
75  boolean HasParameterError = false;
76 
80  boolean HasMasterLock = false;
81 
85  boolean RequiresParameterization = false;
86 
91  boolean HasStaticDiagnosis = false;
92 
96  boolean WatchdogEnabled = false;
97 
101  boolean IsFreezed = false;
102 
106  boolean IsSynced = false;
107 
111  boolean IsSlaveEnabled = false;
112 
116  std::vector<uint8> ExtendedDiagnosisData;
117 
118  void Serialize(RscWriter& writer)const override
119  {
120  writer.Write(this->StationAddress);
121  writer.Write(this->MasterAddress);
122  writer.Write(this->Id);
123  writer.Write(this->StationExists);
124  writer.Write(this->IsStationReady);
125  writer.Write(this->HasConfigurationError);
126  writer.Write(this->HasExtendedDiagnosis);
127  writer.Write(this->NotSupported);
128  writer.Write(this->IsValidResponse);
129  writer.Write(this->HasParameterError);
130  writer.Write(this->HasMasterLock);
131  writer.Write(this->RequiresParameterization);
132  writer.Write(this->HasStaticDiagnosis);
133  writer.Write(this->WatchdogEnabled);
134  writer.Write(this->IsFreezed);
135  writer.Write(this->IsSynced);
136  writer.Write(this->IsSlaveEnabled);
137  writer.WriteArray(this->ExtendedDiagnosisData);
138  }
139 
140  void Deserialize(RscReader& reader)override
141  {
142  reader.Read(this->StationAddress);
143  reader.Read(this->MasterAddress);
144  reader.Read(this->Id);
145  reader.Read(this->StationExists);
146  reader.Read(this->IsStationReady);
147  reader.Read(this->HasConfigurationError);
148  reader.Read(this->HasExtendedDiagnosis);
149  reader.Read(this->NotSupported);
150  reader.Read(this->IsValidResponse);
151  reader.Read(this->HasParameterError);
152  reader.Read(this->HasMasterLock);
153  reader.Read(this->RequiresParameterization);
154  reader.Read(this->HasStaticDiagnosis);
155  reader.Read(this->WatchdogEnabled);
156  reader.Read(this->IsFreezed);
157  reader.Read(this->IsSynced);
158  reader.Read(this->IsSlaveEnabled);
159  reader.ReadArray(this->ExtendedDiagnosisData);
160  }
161 
162  static constexpr size_t GetFieldCount(void)
163  {
164  return 18;
165  }
166 };
167 
168 }}}} // end of namespace Arp::Io::Profibus::Services
Delivers diagnostic information of a slave
Definition: StationDiagnosisItem.hpp:25
void Serialize(RscWriter &writer) const override
Serializes the datatype. All fields of the datatype have to be serialized in use of RscWriter.
Definition: StationDiagnosisItem.hpp:118
std::vector< uint8 > ExtendedDiagnosisData
Contains extended diagnosis data if 'ExtendedDiagnosis' is set
Definition: StationDiagnosisItem.hpp:116
void Deserialize(RscReader &reader) override
Deserializes the datatype. All fields of the datatype have to be deserialized in use of RscReader.
Definition: StationDiagnosisItem.hpp:140
Marshalls structure or class data types. Serialize and Deserialize have to marshal fields in the same...
Definition: IRscSerializable.hpp:19
Reads data from Rsc
Definition: RscReader.hpp:26
void ReadArray(std::vector< T > &result)
Reads an array from Rsc. The read data is stored as std::vector.
Definition: RscReader.hpp:187
T Read(void)
Reads an element of T from Rsc. With data tagging enabled RscType of T is validated.
Definition: RscReader.hpp:165
Writes data to Rsc.
Definition: RscWriter.hpp:31
void Write(const T &value)
Writes an element of T from Rsc. Datatag and format is determined deducted by type of T.
Definition: RscWriter.hpp:177
void WriteArray(const std::vector< T > &values)
Writes an array to Rsc. The data to write has to be stored in a std::vector.
Definition: RscWriter.hpp:203
std::uint8_t uint8
The Arp unsigned integer type of 1 byte size.
Definition: PrimitiveTypes.hpp:27
std::uint16_t uint16
The Arp unsigned integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:31
Namespace for classes and interfaces for the Remote Service Call implementation
Definition: IRscReadEnumerator.hxx:10
Root namespace for the PLCnext API