PLCnext API Documentation 23.6.0.37
StationDiagnosisItem.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
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
15namespace Arp { namespace Io { namespace Profibus { namespace Services
16{
17
18using namespace Arp;
19using namespace Arp::System::Rsc::Services;
20
25{
26public:
31
36
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<byte> 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
boolean NotSupported
Requested command is not supported by slave
Definition: StationDiagnosisItem.hpp:65
boolean HasExtendedDiagnosis
Extended diagnostic information available
Definition: StationDiagnosisItem.hpp:60
uint8 MasterAddress
Contains station address of master which configured the slave
Definition: StationDiagnosisItem.hpp:35
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
boolean IsSynced
Slave has received a "Sync" command
Definition: StationDiagnosisItem.hpp:106
boolean HasConfigurationError
Internal configuration of the slave differs from the master configuration
Definition: StationDiagnosisItem.hpp:55
boolean IsSlaveEnabled
Slave has been projected
Definition: StationDiagnosisItem.hpp:111
boolean RequiresParameterization
Slave requires new parameterization and configuration
Definition: StationDiagnosisItem.hpp:85
boolean IsValidResponse
Response of slave was valid.
Definition: StationDiagnosisItem.hpp:70
boolean StationExists
Slave does exist and is responding
Definition: StationDiagnosisItem.hpp:45
std::vector< byte > ExtendedDiagnosisData
Contains extended diagnosis data if 'ExtendedDiagnosis' is set
Definition: StationDiagnosisItem.hpp:116
boolean HasMasterLock
Slave has been parameterized by another master
Definition: StationDiagnosisItem.hpp:80
boolean HasStaticDiagnosis
Master needs to request diagnostic information from slave again. Slave is not ready for data exchange...
Definition: StationDiagnosisItem.hpp:91
uint8 StationAddress
Contain station address of slave
Definition: StationDiagnosisItem.hpp:30
boolean WatchdogEnabled
Watchdog timer supervision mechanism is activated
Definition: StationDiagnosisItem.hpp:96
boolean HasParameterError
Last parameter telegram was defective or incorrect
Definition: StationDiagnosisItem.hpp:75
boolean IsFreezed
Slaves has received a "Freeze" command
Definition: StationDiagnosisItem.hpp:101
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
uint16 Id
Identification number of slave given by manufacturer
Definition: StationDiagnosisItem.hpp:40
boolean IsStationReady
Slave is ready for cyclic data transfer
Definition: StationDiagnosisItem.hpp:50
Marshalls structure or class data types. Serialize and Deserialize have to marshal fields in the same...
Definition: IRscSerializable.hpp:20
Reads data from Rsc
Definition: RscReader.hpp:27
void ReadArray(std::vector< T > &result)
Reads an array from Rsc. The read data is stored as std::vector.
Definition: RscReader.hpp:188
T Read(void)
Reads an element of T from Rsc. With data tagging enabled RscType of T is validated.
Definition: RscReader.hpp:166
Writes data to Rsc.
Definition: RscWriter.hpp:32
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:178
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:204
std::uint16_t uint16
The Arp unsigned integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:32
std::uint8_t uint8
The Arp unsigned integer type of 1 byte size.
Definition: PrimitiveTypes.hpp:28
Namespace for classes and interfaces for the Remote Service Call implementation
Root namespace for the PLCnext API