1 | // Copyright (C) 2019 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include <private/opcuastatus_p.h> |
5 | #include <private/opcuaconnection_p.h> |
6 | |
7 | QT_BEGIN_NAMESPACE |
8 | |
9 | /*! |
10 | \qmltype Status |
11 | \inqmlmodule QtOpcUa |
12 | \brief Status code of an OPC UA function. |
13 | \since QtOpcUa 5.13 |
14 | |
15 | This QML element contains information about the result status of an OPC UA action. |
16 | The most common use case is to check if a call was successful |
17 | \code |
18 | if (methodNode.resultCode.isGood) { |
19 | // do something |
20 | } |
21 | \endcode |
22 | */ |
23 | |
24 | /*! |
25 | \qmlproperty bool Status::isGood |
26 | |
27 | Returns whether the result status is a success. |
28 | */ |
29 | |
30 | /*! |
31 | \qmlproperty bool Status::isBad |
32 | |
33 | Returns whether the result status is a failure. |
34 | */ |
35 | |
36 | /*! |
37 | \qmlproperty Status.Status Status::status |
38 | |
39 | Returns the exact status code. This allows to handle the status specifically. |
40 | |
41 | \code |
42 | if (resultStatus.status == QtOpcUa.Status.BadTimeout) { |
43 | // try again |
44 | } |
45 | \endcode |
46 | */ |
47 | |
48 | /*! |
49 | \qmlproperty enumeration Status::Status |
50 | |
51 | The names of this enumeration are matching the names from the standard, but |
52 | the values are different. |
53 | |
54 | Attributes of a status |
55 | |
56 | \value Status.Good Everything is fine. |
57 | \value Status.BadUnexpectedError An unexpected error occurred. |
58 | \value Status.BadInternalError An internal error occurred as a result of a programming or configuration error. |
59 | \value Status.BadOutOfMemory Not enough memory to complete the operation. |
60 | \value Status.BadResourceUnavailable An operating system resource is not available. |
61 | \value Status.BadCommunicationError A low level communication error occurred. |
62 | \value Status.BadEncodingError Encoding halted because of invalid data in the objects being serialized. |
63 | \value Status.BadDecodingError Decoding halted because of invalid data in the stream. |
64 | \value Status.BadEncodingLimitsExceeded The message encoding/decoding limits imposed by the stack have been exceeded. |
65 | \value Status.BadRequestTooLarge The request message size exceeds limits set by the server. |
66 | \value Status.BadResponseTooLarge The response message size exceeds limits set by the client. |
67 | \value Status.BadUnknownResponse An unrecognized response was received from the server. |
68 | \value Status.BadTimeout The operation timed out. |
69 | \value Status.BadServiceUnsupported The server does not support the requested service. |
70 | \value Status.BadShutdown The operation was cancelled because the application is shutting down. |
71 | \value Status.BadServerNotConnected The operation could not complete because the client is not connected to the server. |
72 | \value Status.BadServerHalted The server has stopped and cannot process any requests. |
73 | \value Status.BadNothingToDo There was nothing to do because the client passed a list of operations with no elements. |
74 | \value Status.BadTooManyOperations The request could not be processed because it specified too many operations. |
75 | \value Status.BadTooManyMonitoredItems The request could not be processed because there are too many monitored items in the subscription. |
76 | \value Status.BadDataTypeIdUnknown The extension object cannot be (de)serialized because the data type id is not recognized. |
77 | \value Status.BadCertificateInvalid The certificate provided as a parameter is not valid. |
78 | \value Status.BadSecurityChecksFailed An error occurred verifying security. |
79 | \value Status.BadCertificateTimeInvalid The Certificate has expired or is not yet valid. |
80 | \value Status.BadCertificateIssuerTimeInvalid An Issuer Certificate has expired or is not yet valid. |
81 | \value Status.BadCertificateHostNameInvalid The HostName used to connect to a Server does not match a HostName in the Certificate. |
82 | \value Status.BadCertificateUriInvalid The URI specified in the ApplicationDescription does not match the URI in the Certificate. |
83 | \value Status.BadCertificateUseNotAllowed The Certificate may not be used for the requested operation. |
84 | \value Status.BadCertificateIssuerUseNotAllowed The Issuer Certificate may not be used for the requested operation. |
85 | \value Status.BadCertificateUntrusted The Certificate is not trusted. |
86 | \value Status.BadCertificateRevocationUnknown It was not possible to determine if the Certificate has been revoked. |
87 | \value Status.BadCertificateIssuerRevocationUnknown It was not possible to determine if the Issuer Certificate has been revoked. |
88 | \value Status.BadCertificateRevoked The certificate has been revoked. |
89 | \value Status.BadCertificateIssuerRevoked The issuer certificate has been revoked. |
90 | \value Status.BadCertificateChainIncomplete The certificate chain is incomplete. |
91 | \value Status.BadUserAccessDenied User does not have permission to perform the requested operation. |
92 | \value Status.BadIdentityTokenInvalid The user identity token is not valid. |
93 | \value Status.BadIdentityTokenRejected The user identity token is valid but the server has rejected it. |
94 | \value Status.BadSecureChannelIdInvalid The specified secure channel is no longer valid. |
95 | \value Status.BadInvalidTimestamp The timestamp is outside the range allowed by the server. |
96 | \value Status.BadNonceInvalid The nonce does appear to be not a random value or it is not the correct length. |
97 | \value Status.BadSessionIdInvalid The session id is not valid. |
98 | \value Status.BadSessionClosed The session was closed by the client. |
99 | \value Status.BadSessionNotActivated The session cannot be used because ActivateSession has not been called. |
100 | \value Status.BadSubscriptionIdInvalid The subscription id is not valid. |
101 | \value Status.BadRequestHeaderInvalid The header for the request is missing or invalid. |
102 | \value Status.BadTimestampsToReturnInvalid The timestamps to return parameter is invalid. |
103 | \value Status.BadRequestCancelledByClient The request was cancelled by the client. |
104 | \value Status.BadTooManyArguments Too many arguments were provided. |
105 | \value Status.GoodSubscriptionTransferred The subscription was transferred to another session. |
106 | \value Status.GoodCompletesAsynchronously The processing will complete asynchronously. |
107 | \value Status.GoodOverload Sampling has slowed down due to resource limitations. |
108 | \value Status.GoodClamped The value written was accepted but was clamped. |
109 | \value Status.BadNoCommunication Communication with the data source is defined, but not established, and there is no last known value available. |
110 | \value Status.BadWaitingForInitialData Waiting for the server to obtain values from the underlying data source. |
111 | \value Status.BadNodeIdInvalid The syntax of the node id is not valid. |
112 | \value Status.BadNodeIdUnknown The node id refers to a node that does not exist in the server address space. |
113 | \value Status.BadAttributeIdInvalid The attribute is not supported for the specified Node. |
114 | \value Status.BadIndexRangeInvalid The syntax of the index range parameter is invalid. |
115 | \value Status.BadIndexRangeNoData No data exists within the range of indexes specified. |
116 | \value Status.BadDataEncodingInvalid The data encoding is invalid. |
117 | \value Status.BadDataEncodingUnsupported The server does not support the requested data encoding for the node. |
118 | \value Status.BadNotReadable The access level does not allow reading or subscribing to the Node. |
119 | \value Status.BadNotWritable The access level does not allow writing to the Node. |
120 | \value Status.BadOutOfRange The value was out of range. |
121 | \value Status.BadNotSupported The requested operation is not supported. |
122 | \value Status.BadNotFound A requested item was not found or a search operation ended without success. |
123 | \value Status.BadObjectDeleted The object cannot be used because it has been deleted. |
124 | \value Status.BadNotImplemented Requested operation is not implemented. |
125 | \value Status.BadMonitoringModeInvalid The monitoring mode is invalid. |
126 | \value Status.BadMonitoredItemIdInvalid The monitoring item id does not refer to a valid monitored item. |
127 | \value Status.BadMonitoredItemFilterInvalid The monitored item filter parameter is not valid. |
128 | \value Status.BadMonitoredItemFilterUnsupported The server does not support the requested monitored item filter. |
129 | \value Status.BadFilterNotAllowed A monitoring filter cannot be used in combination with the attribute specified. |
130 | \value Status.BadStructureMissing A mandatory structured parameter was missing or null. |
131 | \value Status.BadEventFilterInvalid The event filter is not valid. |
132 | \value Status.BadContentFilterInvalid The content filter is not valid. |
133 | \value Status.BadFilterOperatorInvalid An unregognized operator was provided in a filter. |
134 | \value Status.BadFilterOperatorUnsupported A valid operator was provided, but the server does not provide support for this filter operator. |
135 | \value Status.BadFilterOperandCountMismatch The number of operands provided for the filter operator was less then expected for the operand provided. |
136 | \value Status.BadFilterOperandInvalid The operand used in a content filter is not valid. |
137 | \value Status.BadFilterElementInvalid The referenced element is not a valid element in the content filter. |
138 | \value Status.BadFilterLiteralInvalid The referenced literal is not a valid value. |
139 | \value Status.BadContinuationPointInvalid The continuation point provide is longer valid. |
140 | \value Status.BadNoContinuationPoints The operation could not be processed because all continuation points have been allocated. |
141 | \value Status.BadReferenceTypeIdInvalid The operation could not be processed because all continuation points have been allocated. |
142 | \value Status.BadBrowseDirectionInvalid The browse direction is not valid. |
143 | \value Status.BadNodeNotInView The node is not part of the view. |
144 | \value Status.BadServerUriInvalid The ServerUri is not a valid URI. |
145 | \value Status.BadServerNameMissing No ServerName was specified. |
146 | \value Status.BadDiscoveryUrlMissing No DiscoveryUrl was specified. |
147 | \value Status.BadSempahoreFileMissing The semaphore file specified by the client is not valid. |
148 | \value Status.BadRequestTypeInvalid The security token request type is not valid. |
149 | \value Status.BadSecurityModeRejected The security mode does not meet the requirements set by the Server. |
150 | \value Status.BadSecurityPolicyRejected The security policy does not meet the requirements set by the Server. |
151 | \value Status.BadTooManySessions The server has reached its maximum number of sessions. |
152 | \value Status.BadUserSignatureInvalid The user token signature is missing or invalid. |
153 | \value Status.BadApplicationSignatureInvalid The signature generated with the client certificate is missing or invalid. |
154 | \value Status.BadNoValidCertificates The client did not provide at least one software certificate that is valid and meets the profile requirements for the server. |
155 | \value Status.BadIdentityChangeNotSupported The Server does not support changing the user identity assigned to the session. |
156 | \value Status.BadRequestCancelledByRequest The request was cancelled by the client with the Cancel service. |
157 | \value Status.BadParentNodeIdInvalid The parent node id does not to refer to a valid node. |
158 | \value Status.BadReferenceNotAllowed The reference could not be created because it violates constraints imposed by the data model. |
159 | \value Status.BadNodeIdRejected The requested node id was reject because it was either invalid or server does not allow node ids to be specified by the client. |
160 | \value Status.BadNodeIdExists The requested node id is already used by another node. |
161 | \value Status.BadNodeClassInvalid The node class is not valid. |
162 | \value Status.BadBrowseNameInvalid The browse name is invalid. |
163 | \value Status.BadBrowseNameDuplicated The browse name is not unique among nodes that share the same relationship with the parent. |
164 | \value Status.BadNodeAttributesInvalid The node attributes are not valid for the node class. |
165 | \value Status.BadTypeDefinitionInvalid The type definition node id does not reference an appropriate type node. |
166 | \value Status.BadSourceNodeIdInvalid The source node id does not reference a valid node. |
167 | \value Status.BadTargetNodeIdInvalid The target node id does not reference a valid node. |
168 | \value Status.BadDuplicateReferenceNotAllowed he reference type between the nodes is already defined. |
169 | \value Status.BadInvalidSelfReference The server does not allow this type of self reference on this node. |
170 | \value Status.BadReferenceLocalOnly The reference type is not valid for a reference to a remote server. |
171 | \value Status.BadNoDeleteRights The server will not allow the node to be deleted. |
172 | \value Status.UncertainReferenceNotDeleted The server was not able to delete all target references. |
173 | \value Status.BadServerIndexInvalid The server index is not valid. |
174 | \value Status.BadViewIdUnknown The view id does not refer to a valid view node. |
175 | \value Status.BadViewTimestampInvalid The view timestamp is not available or not supported. |
176 | \value Status.BadViewParameterMismatch The view parameters are not consistent with each other. |
177 | \value Status.BadViewVersionInvalid The view version is not available or not supported. |
178 | \value Status.UncertainNotAllNodesAvailable The list of references may not be complete because the underlying system is not available. |
179 | \value Status.GoodResultsMayBeIncomplete The server should have followed a reference to a node in a remote server but did not. The result set may be incomplete. |
180 | \value Status.BadNotTypeDefinition The provided Nodeid was not a type definition nodeid. |
181 | \value Status.UncertainReferenceOutOfServer One of the references to follow in the relative path references to a node in the address space in another server. |
182 | \value Status.BadTooManyMatches The requested operation has too many matches to return. |
183 | \value Status.BadQueryTooComplex The requested operation requires too many resources in the server. |
184 | \value Status.BadNoMatch The requested operation has no match to return. |
185 | \value Status.BadMaxAgeInvalid The max age parameter is invalid. |
186 | \value Status.BadSecurityModeInsufficient The operation is not permitted over the current secure channel. |
187 | \value Status.BadHistoryOperationInvalid The history details parameter is not valid. |
188 | \value Status.BadHistoryOperationUnsupported The server does not support the requested operation. |
189 | \value Status.BadInvalidTimestampArgument The defined timestamp to return was invalid. |
190 | \value Status.BadWriteNotSupported The server not does support writing the combination of value, status and timestamps provided. |
191 | \value Status.BadTypeMismatch The value supplied for the attribute is not of the same type as the attribute's value. |
192 | \value Status.BadMethodInvalid The method id does not refer to a method for the specified object. |
193 | \value Status.BadArgumentsMissing The client did not specify all of the input arguments for the method. |
194 | \value Status.BadTooManySubscriptions The server has reached its maximum number of subscriptions. |
195 | \value Status.BadTooManyPublishRequests The server has reached the maximum number of queued publish requests. |
196 | \value Status.BadNoSubscription There is no subscription available for this session. |
197 | \value Status.BadSequenceNumberUnknown The sequence number is unknown to the server. |
198 | \value Status.BadMessageNotAvailable The requested notification message is no longer available. |
199 | \value Status.BadInsufficientClientProfile The Client of the current Session does not support one or more Profiles that are necessary for the Subscription. |
200 | \value Status.BadStateNotActive The sub-state machine is not currently active. |
201 | \value Status.BadTcpServerTooBusy The server cannot process the request because it is too busy. |
202 | \value Status.BadTcpMessageTypeInvalid The type of the message specified in the header invalid. |
203 | \value Status.BadTcpSecureChannelUnknown The SecureChannelId and/or TokenId are not currently in use. |
204 | \value Status.BadTcpMessageTooLarge The size of the message specified in the header is too large. |
205 | \value Status.BadTcpNotEnoughResources There are not enough resources to process the request. |
206 | \value Status.BadTcpInternalError An internal error occurred. |
207 | \value Status.BadTcpEndpointUrlInvalid The Server does not recognize the QueryString specified. |
208 | \value Status.BadRequestInterrupted The request could not be sent because of a network interruption. |
209 | \value Status.BadRequestTimeout Timeout occurred while processing the request. |
210 | \value Status.BadSecureChannelClosed The secure channel has been closed. |
211 | \value Status.BadSecureChannelTokenUnknown The token has expired or is not recognized. |
212 | \value Status.BadSequenceNumberInvalid The sequence number is not valid. |
213 | \value Status.BadProtocolVersionUnsupported The applications do not have compatible protocol versions. |
214 | \value Status.BadConfigurationError There is a problem with the configuration that affects the usefulness of the value. |
215 | \value Status.BadNotConnected The variable should receive its value from another variable, but has never been configured to do so. |
216 | \value Status.BadDeviceFailure There has been a failure in the device/data source that generates the value that has affected the value. |
217 | \value Status.BadSensorFailure There has been a failure in the sensor from which the value is derived by the device/data source. |
218 | \value Status.BadOutOfService The source of the data is not operational. |
219 | \value Status.BadDeadbandFilterInvalid The deadband filter is not valid. |
220 | \value Status.UncertainNoCommunicationLastUsableValue Communication to the data source has failed. The variable value is the last value that had a good quality. |
221 | \value Status.UncertainLastUsableValue Whatever was updating this value has stopped doing so. |
222 | \value Status.UncertainSubstituteValue The value is an operational value that was manually overwritten. |
223 | \value Status.UncertainInitialValue The value is an initial value for a variable that normally receives its value from another variable. |
224 | \value Status.UncertainSensorNotAccurate The value is at one of the sensor limits. |
225 | \value Status.UncertainEngineeringUnitsExceeded The value is outside of the range of values defined for this parameter. |
226 | \value Status.UncertainSubNormal The value is derived from multiple sources and has less than the required number of Good sources. |
227 | \value Status.GoodLocalOverride The value has been overridden. |
228 | \value Status.BadRefreshInProgress This Condition refresh failed, a Condition refresh operation is already in progress. |
229 | \value Status.BadConditionAlreadyDisabled This condition has already been disabled. |
230 | \value Status.BadConditionAlreadyEnabled This condition has already been enabled. |
231 | \value Status.BadConditionDisabled Property not available, this condition is disabled. |
232 | \value Status.BadEventIdUnknown The specified event id is not recognized. |
233 | \value Status.BadEventNotAcknowledgeable The event cannot be acknowledged. |
234 | \value Status.BadDialogNotActive The dialog condition is not active. |
235 | \value Status.BadDialogResponseInvalid The response is not valid for the dialog. |
236 | \value Status.BadConditionBranchAlreadyAcked The condition branch has already been acknowledged. |
237 | \value Status.BadConditionBranchAlreadyConfirmed The condition branch has already been confirmed. |
238 | \value Status.BadConditionAlreadyShelved The condition has already been shelved. |
239 | \value Status.BadConditionNotShelved The condition is not currently shelved. |
240 | \value Status.BadShelvingTimeOutOfRange The shelving time not within an acceptable range. |
241 | \value Status.BadNoData No data exists for the requested time range or event filter. |
242 | \value Status.BadBoundNotFoundNo data found to provide upper or lower bound value. |
243 | \value Status.BadBoundNotSupported The server cannot retrieve a bound for the variable. |
244 | \value Status.BadDataLost Data is missing due to collection started/stopped/lost. |
245 | \value Status.BadDataUnavailable Expected data is unavailable for the requested time range due to an un-mounted volume, an off-line archive or tape, or similar reason for temporary unavailability. |
246 | \value Status.BadEntryExists The data or event was not successfully inserted because a matching entry exists. |
247 | \value Status.BadNoEntryExists The data or event was not successfully updated because no matching entry exists. |
248 | \value Status.BadTimestampNotSupported The client requested history using a timestamp format the server does not support (i.e requested ServerTimestamp when server only supports SourceTimestamp). |
249 | \value Status.GoodEntryInserted The data or event was successfully inserted into the historical database. |
250 | \value Status.GoodEntryReplaced The data or event field was successfully replaced in the historical database. |
251 | \value Status.UncertainDataSubNormal The value is derived from multiple values and has less than the required number of Good values. |
252 | \value Status.GoodNoData No data exists for the requested time range or event filter. |
253 | \value Status.GoodMoreData The data or event field was successfully replaced in the historical database. |
254 | \value Status.BadAggregateListMismatch The requested number of Aggregates does not match the requested number of NodeIds. |
255 | \value Status.BadAggregateNotSupported The requested Aggregate is not support by the server. |
256 | \value Status.BadAggregateInvalidInputs The aggregate value could not be derived due to invalid data inputs. |
257 | \value Status.BadAggregateConfigurationRejected The aggregate configuration is not valid for specified node. |
258 | \value Status.GoodDataIgnored The request pecifies fields which are not valid for the EventType or cannot be saved by the historian |
259 | \value Status.BadRequestNotAllowed The request was rejected by the server because it did not meet the criteria set by the server. |
260 | \value Status.GoodEdited The value does not come from the real source and has been edited by the server. |
261 | \value Status.GoodPostActionFailed There was an error in execution of these post-actions. |
262 | \value Status.UncertainDominantValueChanged The related EngineeringUnit has been changed but the Variable Value is still provided based on the previous unit. |
263 | \value Status.GoodDependentValueChanged A dependent value has been changed but the change has not been applied to the device. |
264 | \value Status.BadDominantValueChanged The related EngineeringUnit has been changed but this change has not been applied to the device. The Variable Value is still dependent on the previous unit but its status is currently Bad. |
265 | \value Status.UncertainDependentValueChanged A dependent value has been changed but the change has not been applied to the device. The quality of the dominant variable is uncertain. |
266 | \value Status.BadDependentValueChanged A dependent value has been changed but the change has not been applied to the device. The quality of the dominant variable is Bad. |
267 | \value Status.GoodCommunicationEvent The communication layer has raised an event. |
268 | \value Status.GoodShutdownEvent The system is shutting down. |
269 | \value Status.GoodCallAgain The operation is not finished and needs to be called again. |
270 | \value Status.GoodNonCriticalTimeout A non-critical timeout occurred. |
271 | \value Status.BadInvalidArgument One or more arguments are invalid. |
272 | \value Status.BadConnectionRejected Could not establish a network connection to remote server. |
273 | \value Status.BadDisconnect The server has disconnected from the client. |
274 | \value Status.BadConnectionClosed The network connection has been closed. |
275 | \value Status.BadInvalidState The operation cannot be completed because the object is closed, uninitialized or in some other invalid state. |
276 | \value Status.BadEndOfStream Cannot move beyond end of the stream. |
277 | \value Status.BadNoDataAvailable No data is currently available for reading from a non-blocking stream. |
278 | \value Status.BadWaitingForResponse The asynchronous operation is waiting for a response. |
279 | \value Status.BadOperationAbandoned The asynchronous operation was abandoned by the caller. |
280 | \value Status.BadExpectedStreamToBlock The stream did not return all data requested (possibly because it is a non-blocking stream). |
281 | \value Status.BadWouldBlock Non blocking behavior is required and the operation would block. |
282 | \value Status.BadSyntaxError A value had an invalid syntax. |
283 | \value Status.BadMaxConnectionsReached The operation could not be finished because all available connections are in use. |
284 | */ |
285 | |
286 | OpcUaStatus::OpcUaStatus() = default; |
287 | |
288 | OpcUaStatus::OpcUaStatus(OpcUaStatus::Status status) |
289 | { |
290 | m_statusCode = static_cast<quint32>(status) << 16; |
291 | } |
292 | |
293 | OpcUaStatus::~OpcUaStatus() = default; |
294 | |
295 | bool OpcUaStatus::isBad() const |
296 | { |
297 | return m_statusCode & 0x80000000; |
298 | } |
299 | |
300 | bool OpcUaStatus::isGood() const |
301 | { |
302 | return !isBad(); |
303 | } |
304 | |
305 | OpcUaStatus::OpcUaStatus(QOpcUa::UaStatusCode uaStatusCode) |
306 | { |
307 | m_statusCode = static_cast<quint32>(uaStatusCode); |
308 | } |
309 | |
310 | OpcUaStatus::Status OpcUaStatus::status() const |
311 | { |
312 | switch (static_cast<QOpcUa::UaStatusCode>(m_statusCode)) { |
313 | case QOpcUa::Good: |
314 | return Status::Good; |
315 | case QOpcUa::BadUnexpectedError: |
316 | return Status::BadUnexpectedError; |
317 | case QOpcUa::BadInternalError: |
318 | return Status::BadInternalError; |
319 | case QOpcUa::BadOutOfMemory: |
320 | return Status::BadOutOfMemory; |
321 | case QOpcUa::BadResourceUnavailable: |
322 | return Status::BadResourceUnavailable; |
323 | case QOpcUa::BadCommunicationError: |
324 | return Status::BadCommunicationError; |
325 | case QOpcUa::BadEncodingError: |
326 | return Status::BadEncodingError; |
327 | case QOpcUa::BadDecodingError: |
328 | return Status::BadDecodingError; |
329 | case QOpcUa::BadEncodingLimitsExceeded: |
330 | return Status::BadEncodingLimitsExceeded; |
331 | case QOpcUa::BadRequestTooLarge: |
332 | return Status::BadRequestTooLarge; |
333 | case QOpcUa::BadResponseTooLarge: |
334 | return Status::BadResponseTooLarge; |
335 | case QOpcUa::BadUnknownResponse: |
336 | return Status::BadUnknownResponse; |
337 | case QOpcUa::BadTimeout: |
338 | return Status::BadTimeout; |
339 | case QOpcUa::BadServiceUnsupported: |
340 | return Status::BadServiceUnsupported; |
341 | case QOpcUa::BadShutdown: |
342 | return Status::BadShutdown; |
343 | case QOpcUa::BadServerNotConnected: |
344 | return Status::BadServerNotConnected; |
345 | case QOpcUa::BadServerHalted: |
346 | return Status::BadServerHalted; |
347 | case QOpcUa::BadNothingToDo: |
348 | return Status::BadNothingToDo; |
349 | case QOpcUa::BadTooManyOperations: |
350 | return Status::BadTooManyOperations; |
351 | case QOpcUa::BadTooManyMonitoredItems: |
352 | return Status::BadTooManyMonitoredItems; |
353 | case QOpcUa::BadDataTypeIdUnknown: |
354 | return Status::BadDataTypeIdUnknown; |
355 | case QOpcUa::BadCertificateInvalid: |
356 | return Status::BadCertificateInvalid; |
357 | case QOpcUa::BadSecurityChecksFailed: |
358 | return Status::BadSecurityChecksFailed; |
359 | case QOpcUa::BadCertificateTimeInvalid: |
360 | return Status::BadCertificateTimeInvalid; |
361 | case QOpcUa::BadCertificateIssuerTimeInvalid: |
362 | return Status::BadCertificateIssuerTimeInvalid; |
363 | case QOpcUa::BadCertificateHostNameInvalid: |
364 | return Status::BadCertificateHostNameInvalid; |
365 | case QOpcUa::BadCertificateUriInvalid: |
366 | return Status::BadCertificateUriInvalid; |
367 | case QOpcUa::BadCertificateUseNotAllowed: |
368 | return Status::BadCertificateUseNotAllowed; |
369 | case QOpcUa::BadCertificateIssuerUseNotAllowed: |
370 | return Status::BadCertificateIssuerUseNotAllowed; |
371 | case QOpcUa::BadCertificateUntrusted: |
372 | return Status::BadCertificateUntrusted; |
373 | case QOpcUa::BadCertificateRevocationUnknown: |
374 | return Status::BadCertificateRevocationUnknown; |
375 | case QOpcUa::BadCertificateIssuerRevocationUnknown: |
376 | return Status::BadCertificateIssuerRevocationUnknown; |
377 | case QOpcUa::BadCertificateRevoked: |
378 | return Status::BadCertificateRevoked; |
379 | case QOpcUa::BadCertificateIssuerRevoked: |
380 | return Status::BadCertificateIssuerRevoked; |
381 | case QOpcUa::BadCertificateChainIncomplete: |
382 | return Status::BadCertificateChainIncomplete; |
383 | case QOpcUa::BadUserAccessDenied: |
384 | return Status::BadUserAccessDenied; |
385 | case QOpcUa::BadIdentityTokenInvalid: |
386 | return Status::BadIdentityTokenInvalid; |
387 | case QOpcUa::BadIdentityTokenRejected: |
388 | return Status::BadIdentityTokenRejected; |
389 | case QOpcUa::BadSecureChannelIdInvalid: |
390 | return Status::BadSecureChannelIdInvalid; |
391 | case QOpcUa::BadInvalidTimestamp: |
392 | return Status::BadInvalidTimestamp; |
393 | case QOpcUa::BadNonceInvalid: |
394 | return Status::BadNonceInvalid; |
395 | case QOpcUa::BadSessionIdInvalid: |
396 | return Status::BadSessionIdInvalid; |
397 | case QOpcUa::BadSessionClosed: |
398 | return Status::BadSessionClosed; |
399 | case QOpcUa::BadSessionNotActivated: |
400 | return Status::BadSessionNotActivated; |
401 | case QOpcUa::BadSubscriptionIdInvalid: |
402 | return Status::BadSubscriptionIdInvalid; |
403 | case QOpcUa::BadRequestHeaderInvalid: |
404 | return Status::BadRequestHeaderInvalid; |
405 | case QOpcUa::BadTimestampsToReturnInvalid: |
406 | return Status::BadTimestampsToReturnInvalid; |
407 | case QOpcUa::BadRequestCancelledByClient: |
408 | return Status::BadRequestCancelledByClient; |
409 | case QOpcUa::BadTooManyArguments: |
410 | return Status::BadTooManyArguments; |
411 | case QOpcUa::GoodSubscriptionTransferred: |
412 | return Status::GoodSubscriptionTransferred; |
413 | case QOpcUa::GoodCompletesAsynchronously: |
414 | return Status::GoodCompletesAsynchronously; |
415 | case QOpcUa::GoodOverload: |
416 | return Status::GoodOverload; |
417 | case QOpcUa::GoodClamped: |
418 | return Status::GoodClamped; |
419 | case QOpcUa::BadNoCommunication: |
420 | return Status::BadNoCommunication; |
421 | case QOpcUa::BadWaitingForInitialData: |
422 | return Status::BadWaitingForInitialData; |
423 | case QOpcUa::BadNodeIdInvalid: |
424 | return Status::BadNodeIdInvalid; |
425 | case QOpcUa::BadNodeIdUnknown: |
426 | return Status::BadNodeIdUnknown; |
427 | case QOpcUa::BadAttributeIdInvalid: |
428 | return Status::BadAttributeIdInvalid; |
429 | case QOpcUa::BadIndexRangeInvalid: |
430 | return Status::BadIndexRangeInvalid; |
431 | case QOpcUa::BadIndexRangeNoData: |
432 | return Status::BadIndexRangeNoData; |
433 | case QOpcUa::BadDataEncodingInvalid: |
434 | return Status::BadDataEncodingInvalid; |
435 | case QOpcUa::BadDataEncodingUnsupported: |
436 | return Status::BadDataEncodingUnsupported; |
437 | case QOpcUa::BadNotReadable: |
438 | return Status::BadNotReadable; |
439 | case QOpcUa::BadNotWritable: |
440 | return Status::BadNotWritable; |
441 | case QOpcUa::BadOutOfRange: |
442 | return Status::BadOutOfRange; |
443 | case QOpcUa::BadNotSupported: |
444 | return Status::BadNotSupported; |
445 | case QOpcUa::BadNotFound: |
446 | return Status::BadNotFound; |
447 | case QOpcUa::BadObjectDeleted: |
448 | return Status::BadObjectDeleted; |
449 | case QOpcUa::BadNotImplemented: |
450 | return Status::BadNotImplemented; |
451 | case QOpcUa::BadMonitoringModeInvalid: |
452 | return Status::BadMonitoringModeInvalid; |
453 | case QOpcUa::BadMonitoredItemIdInvalid: |
454 | return Status::BadMonitoredItemIdInvalid; |
455 | case QOpcUa::BadMonitoredItemFilterInvalid: |
456 | return Status::BadMonitoredItemFilterInvalid; |
457 | case QOpcUa::BadMonitoredItemFilterUnsupported: |
458 | return Status::BadMonitoredItemFilterUnsupported; |
459 | case QOpcUa::BadFilterNotAllowed: |
460 | return Status::BadFilterNotAllowed; |
461 | case QOpcUa::BadStructureMissing: |
462 | return Status::BadStructureMissing; |
463 | case QOpcUa::BadEventFilterInvalid: |
464 | return Status::BadEventFilterInvalid; |
465 | case QOpcUa::BadContentFilterInvalid: |
466 | return Status::BadContentFilterInvalid; |
467 | case QOpcUa::BadFilterOperatorInvalid: |
468 | return Status::BadFilterOperatorInvalid; |
469 | case QOpcUa::BadFilterOperatorUnsupported: |
470 | return Status::BadFilterOperatorUnsupported; |
471 | case QOpcUa::BadFilterOperandCountMismatch: |
472 | return Status::BadFilterOperandCountMismatch; |
473 | case QOpcUa::BadFilterOperandInvalid: |
474 | return Status::BadFilterOperandInvalid; |
475 | case QOpcUa::BadFilterElementInvalid: |
476 | return Status::BadFilterElementInvalid; |
477 | case QOpcUa::BadFilterLiteralInvalid: |
478 | return Status::BadFilterLiteralInvalid; |
479 | case QOpcUa::BadContinuationPointInvalid: |
480 | return Status::BadContinuationPointInvalid; |
481 | case QOpcUa::BadNoContinuationPoints: |
482 | return Status::BadNoContinuationPoints; |
483 | case QOpcUa::BadReferenceTypeIdInvalid: |
484 | return Status::BadReferenceTypeIdInvalid; |
485 | case QOpcUa::BadBrowseDirectionInvalid: |
486 | return Status::BadBrowseDirectionInvalid; |
487 | case QOpcUa::BadNodeNotInView: |
488 | return Status::BadNodeNotInView; |
489 | case QOpcUa::BadServerUriInvalid: |
490 | return Status::BadServerUriInvalid; |
491 | case QOpcUa::BadServerNameMissing: |
492 | return Status::BadServerNameMissing; |
493 | case QOpcUa::BadDiscoveryUrlMissing: |
494 | return Status::BadDiscoveryUrlMissing; |
495 | case QOpcUa::BadSempahoreFileMissing: |
496 | return Status::BadSempahoreFileMissing; |
497 | case QOpcUa::BadRequestTypeInvalid: |
498 | return Status::BadRequestTypeInvalid; |
499 | case QOpcUa::BadSecurityModeRejected: |
500 | return Status::BadSecurityModeRejected; |
501 | case QOpcUa::BadSecurityPolicyRejected: |
502 | return Status::BadSecurityPolicyRejected; |
503 | case QOpcUa::BadTooManySessions: |
504 | return Status::BadTooManySessions; |
505 | case QOpcUa::BadUserSignatureInvalid: |
506 | return Status::BadUserSignatureInvalid; |
507 | case QOpcUa::BadApplicationSignatureInvalid: |
508 | return Status::BadApplicationSignatureInvalid; |
509 | case QOpcUa::BadNoValidCertificates: |
510 | return Status::BadNoValidCertificates; |
511 | case QOpcUa::BadIdentityChangeNotSupported: |
512 | return Status::BadIdentityChangeNotSupported; |
513 | case QOpcUa::BadRequestCancelledByRequest: |
514 | return Status::BadRequestCancelledByRequest; |
515 | case QOpcUa::BadParentNodeIdInvalid: |
516 | return Status::BadParentNodeIdInvalid; |
517 | case QOpcUa::BadReferenceNotAllowed: |
518 | return Status::BadReferenceNotAllowed; |
519 | case QOpcUa::BadNodeIdRejected: |
520 | return Status::BadNodeIdRejected; |
521 | case QOpcUa::BadNodeIdExists: |
522 | return Status::BadNodeIdExists; |
523 | case QOpcUa::BadNodeClassInvalid: |
524 | return Status::BadNodeClassInvalid; |
525 | case QOpcUa::BadBrowseNameInvalid: |
526 | return Status::BadBrowseNameInvalid; |
527 | case QOpcUa::BadBrowseNameDuplicated: |
528 | return Status::BadBrowseNameDuplicated; |
529 | case QOpcUa::BadNodeAttributesInvalid: |
530 | return Status::BadNodeAttributesInvalid; |
531 | case QOpcUa::BadTypeDefinitionInvalid: |
532 | return Status::BadTypeDefinitionInvalid; |
533 | case QOpcUa::BadSourceNodeIdInvalid: |
534 | return Status::BadSourceNodeIdInvalid; |
535 | case QOpcUa::BadTargetNodeIdInvalid: |
536 | return Status::BadTargetNodeIdInvalid; |
537 | case QOpcUa::BadDuplicateReferenceNotAllowed: |
538 | return Status::BadDuplicateReferenceNotAllowed; |
539 | case QOpcUa::BadInvalidSelfReference: |
540 | return Status::BadInvalidSelfReference; |
541 | case QOpcUa::BadReferenceLocalOnly: |
542 | return Status::BadReferenceLocalOnly; |
543 | case QOpcUa::BadNoDeleteRights: |
544 | return Status::BadNoDeleteRights; |
545 | case QOpcUa::UncertainReferenceNotDeleted: |
546 | return Status::UncertainReferenceNotDeleted; |
547 | case QOpcUa::BadServerIndexInvalid: |
548 | return Status::BadServerIndexInvalid; |
549 | case QOpcUa::BadViewIdUnknown: |
550 | return Status::BadViewIdUnknown; |
551 | case QOpcUa::BadViewTimestampInvalid: |
552 | return Status::BadViewTimestampInvalid; |
553 | case QOpcUa::BadViewParameterMismatch: |
554 | return Status::BadViewParameterMismatch; |
555 | case QOpcUa::BadViewVersionInvalid: |
556 | return Status::BadViewVersionInvalid; |
557 | case QOpcUa::UncertainNotAllNodesAvailable: |
558 | return Status::UncertainNotAllNodesAvailable; |
559 | case QOpcUa::GoodResultsMayBeIncomplete: |
560 | return Status::GoodResultsMayBeIncomplete; |
561 | case QOpcUa::BadNotTypeDefinition: |
562 | return Status::BadNotTypeDefinition; |
563 | case QOpcUa::UncertainReferenceOutOfServer: |
564 | return Status::UncertainReferenceOutOfServer; |
565 | case QOpcUa::BadTooManyMatches: |
566 | return Status::BadTooManyMatches; |
567 | case QOpcUa::BadQueryTooComplex: |
568 | return Status::BadQueryTooComplex; |
569 | case QOpcUa::BadNoMatch: |
570 | return Status::BadNoMatch; |
571 | case QOpcUa::BadMaxAgeInvalid: |
572 | return Status::BadMaxAgeInvalid; |
573 | case QOpcUa::BadSecurityModeInsufficient: |
574 | return Status::BadSecurityModeInsufficient; |
575 | case QOpcUa::BadHistoryOperationInvalid: |
576 | return Status::BadHistoryOperationInvalid; |
577 | case QOpcUa::BadHistoryOperationUnsupported: |
578 | return Status::BadHistoryOperationUnsupported; |
579 | case QOpcUa::BadInvalidTimestampArgument: |
580 | return Status::BadInvalidTimestampArgument; |
581 | case QOpcUa::BadWriteNotSupported: |
582 | return Status::BadWriteNotSupported; |
583 | case QOpcUa::BadTypeMismatch: |
584 | return Status::BadTypeMismatch; |
585 | case QOpcUa::BadMethodInvalid: |
586 | return Status::BadMethodInvalid; |
587 | case QOpcUa::BadArgumentsMissing: |
588 | return Status::BadArgumentsMissing; |
589 | case QOpcUa::BadTooManySubscriptions: |
590 | return Status::BadTooManySubscriptions; |
591 | case QOpcUa::BadTooManyPublishRequests: |
592 | return Status::BadTooManyPublishRequests; |
593 | case QOpcUa::BadNoSubscription: |
594 | return Status::BadNoSubscription; |
595 | case QOpcUa::BadSequenceNumberUnknown: |
596 | return Status::BadSequenceNumberUnknown; |
597 | case QOpcUa::BadMessageNotAvailable: |
598 | return Status::BadMessageNotAvailable; |
599 | case QOpcUa::BadInsufficientClientProfile: |
600 | return Status::BadInsufficientClientProfile; |
601 | case QOpcUa::BadStateNotActive: |
602 | return Status::BadStateNotActive; |
603 | case QOpcUa::BadTcpServerTooBusy: |
604 | return Status::BadTcpServerTooBusy; |
605 | case QOpcUa::BadTcpMessageTypeInvalid: |
606 | return Status::BadTcpMessageTypeInvalid; |
607 | case QOpcUa::BadTcpSecureChannelUnknown: |
608 | return Status::BadTcpSecureChannelUnknown; |
609 | case QOpcUa::BadTcpMessageTooLarge: |
610 | return Status::BadTcpMessageTooLarge; |
611 | case QOpcUa::BadTcpNotEnoughResources: |
612 | return Status::BadTcpNotEnoughResources; |
613 | case QOpcUa::BadTcpInternalError: |
614 | return Status::BadTcpInternalError; |
615 | case QOpcUa::BadTcpEndpointUrlInvalid: |
616 | return Status::BadTcpEndpointUrlInvalid; |
617 | case QOpcUa::BadRequestInterrupted: |
618 | return Status::BadRequestInterrupted; |
619 | case QOpcUa::BadRequestTimeout: |
620 | return Status::BadRequestTimeout; |
621 | case QOpcUa::BadSecureChannelClosed: |
622 | return Status::BadSecureChannelClosed; |
623 | case QOpcUa::BadSecureChannelTokenUnknown: |
624 | return Status::BadSecureChannelTokenUnknown; |
625 | case QOpcUa::BadSequenceNumberInvalid: |
626 | return Status::BadSequenceNumberInvalid; |
627 | case QOpcUa::BadProtocolVersionUnsupported: |
628 | return Status::BadProtocolVersionUnsupported; |
629 | case QOpcUa::BadConfigurationError: |
630 | return Status::BadConfigurationError; |
631 | case QOpcUa::BadNotConnected: |
632 | return Status::BadNotConnected; |
633 | case QOpcUa::BadDeviceFailure: |
634 | return Status::BadDeviceFailure; |
635 | case QOpcUa::BadSensorFailure: |
636 | return Status::BadSensorFailure; |
637 | case QOpcUa::BadOutOfService: |
638 | return Status::BadOutOfService; |
639 | case QOpcUa::BadDeadbandFilterInvalid: |
640 | return Status::BadDeadbandFilterInvalid; |
641 | case QOpcUa::UncertainNoCommunicationLastUsableValue: |
642 | return Status::UncertainNoCommunicationLastUsableValue; |
643 | case QOpcUa::UncertainLastUsableValue: |
644 | return Status::UncertainLastUsableValue; |
645 | case QOpcUa::UncertainSubstituteValue: |
646 | return Status::UncertainSubstituteValue; |
647 | case QOpcUa::UncertainInitialValue: |
648 | return Status::UncertainInitialValue; |
649 | case QOpcUa::UncertainSensorNotAccurate: |
650 | return Status::UncertainSensorNotAccurate; |
651 | case QOpcUa::UncertainEngineeringUnitsExceeded: |
652 | return Status::UncertainEngineeringUnitsExceeded; |
653 | case QOpcUa::UncertainSubNormal: |
654 | return Status::UncertainSubNormal; |
655 | case QOpcUa::GoodLocalOverride: |
656 | return Status::GoodLocalOverride; |
657 | case QOpcUa::BadRefreshInProgress: |
658 | return Status::BadRefreshInProgress; |
659 | case QOpcUa::BadConditionAlreadyDisabled: |
660 | return Status::BadConditionAlreadyDisabled; |
661 | case QOpcUa::BadConditionAlreadyEnabled: |
662 | return Status::BadConditionAlreadyEnabled; |
663 | case QOpcUa::BadConditionDisabled: |
664 | return Status::BadConditionDisabled; |
665 | case QOpcUa::BadEventIdUnknown: |
666 | return Status::BadEventIdUnknown; |
667 | case QOpcUa::BadEventNotAcknowledgeable: |
668 | return Status::BadEventNotAcknowledgeable; |
669 | case QOpcUa::BadDialogNotActive: |
670 | return Status::BadDialogNotActive; |
671 | case QOpcUa::BadDialogResponseInvalid: |
672 | return Status::BadDialogResponseInvalid; |
673 | case QOpcUa::BadConditionBranchAlreadyAcked: |
674 | return Status::BadConditionBranchAlreadyAcked; |
675 | case QOpcUa::BadConditionBranchAlreadyConfirmed: |
676 | return Status::BadConditionBranchAlreadyConfirmed; |
677 | case QOpcUa::BadConditionAlreadyShelved: |
678 | return Status::BadConditionAlreadyShelved; |
679 | case QOpcUa::BadConditionNotShelved: |
680 | return Status::BadConditionNotShelved; |
681 | case QOpcUa::BadShelvingTimeOutOfRange: |
682 | return Status::BadShelvingTimeOutOfRange; |
683 | case QOpcUa::BadNoData: |
684 | return Status::BadNoData; |
685 | case QOpcUa::BadBoundNotFound: |
686 | return Status::BadBoundNotFound; |
687 | case QOpcUa::BadBoundNotSupported: |
688 | return Status::BadBoundNotSupported; |
689 | case QOpcUa::BadDataLost: |
690 | return Status::BadDataLost; |
691 | case QOpcUa::BadDataUnavailable: |
692 | return Status::BadDataUnavailable; |
693 | case QOpcUa::BadEntryExists: |
694 | return Status::BadEntryExists; |
695 | case QOpcUa::BadNoEntryExists: |
696 | return Status::BadNoEntryExists; |
697 | case QOpcUa::BadTimestampNotSupported: |
698 | return Status::BadTimestampNotSupported; |
699 | case QOpcUa::GoodEntryInserted: |
700 | return Status::GoodEntryInserted; |
701 | case QOpcUa::GoodEntryReplaced: |
702 | return Status::GoodEntryReplaced; |
703 | case QOpcUa::UncertainDataSubNormal: |
704 | return Status::UncertainDataSubNormal; |
705 | case QOpcUa::GoodNoData: |
706 | return Status::GoodNoData; |
707 | case QOpcUa::GoodMoreData: |
708 | return Status::GoodMoreData; |
709 | case QOpcUa::BadAggregateListMismatch: |
710 | return Status::BadAggregateListMismatch; |
711 | case QOpcUa::BadAggregateNotSupported: |
712 | return Status::BadAggregateNotSupported; |
713 | case QOpcUa::BadAggregateInvalidInputs: |
714 | return Status::BadAggregateInvalidInputs; |
715 | case QOpcUa::BadAggregateConfigurationRejected: |
716 | return Status::BadAggregateConfigurationRejected; |
717 | case QOpcUa::GoodDataIgnored: |
718 | return Status::GoodDataIgnored; |
719 | case QOpcUa::BadRequestNotAllowed: |
720 | return Status::BadRequestNotAllowed; |
721 | case QOpcUa::GoodEdited: |
722 | return Status::GoodEdited; |
723 | case QOpcUa::GoodPostActionFailed: |
724 | return Status::GoodPostActionFailed; |
725 | case QOpcUa::UncertainDominantValueChanged: |
726 | return Status::UncertainDominantValueChanged; |
727 | case QOpcUa::GoodDependentValueChanged: |
728 | return Status::GoodDependentValueChanged; |
729 | case QOpcUa::BadDominantValueChanged: |
730 | return Status::BadDominantValueChanged; |
731 | case QOpcUa::UncertainDependentValueChanged: |
732 | return Status::UncertainDependentValueChanged; |
733 | case QOpcUa::BadDependentValueChanged: |
734 | return Status::BadDependentValueChanged; |
735 | case QOpcUa::GoodCommunicationEvent: |
736 | return Status::GoodCommunicationEvent; |
737 | case QOpcUa::GoodShutdownEvent: |
738 | return Status::GoodShutdownEvent; |
739 | case QOpcUa::GoodCallAgain: |
740 | return Status::GoodCallAgain; |
741 | case QOpcUa::GoodNonCriticalTimeout: |
742 | return Status::GoodNonCriticalTimeout; |
743 | case QOpcUa::BadInvalidArgument: |
744 | return Status::BadInvalidArgument; |
745 | case QOpcUa::BadConnectionRejected: |
746 | return Status::BadConnectionRejected; |
747 | case QOpcUa::BadDisconnect: |
748 | return Status::BadDisconnect; |
749 | case QOpcUa::BadConnectionClosed: |
750 | return Status::BadConnectionClosed; |
751 | case QOpcUa::BadInvalidState: |
752 | return Status::BadInvalidState; |
753 | case QOpcUa::BadEndOfStream: |
754 | return Status::BadEndOfStream; |
755 | case QOpcUa::BadNoDataAvailable: |
756 | return Status::BadNoDataAvailable; |
757 | case QOpcUa::BadWaitingForResponse: |
758 | return Status::BadWaitingForResponse; |
759 | case QOpcUa::BadOperationAbandoned: |
760 | return Status::BadOperationAbandoned; |
761 | case QOpcUa::BadExpectedStreamToBlock: |
762 | return Status::BadExpectedStreamToBlock; |
763 | case QOpcUa::BadWouldBlock: |
764 | return Status::BadWouldBlock; |
765 | case QOpcUa::BadSyntaxError: |
766 | return Status::BadSyntaxError; |
767 | case QOpcUa::BadMaxConnectionsReached: |
768 | return Status::BadMaxConnectionsReached; |
769 | } |
770 | return Status::BadUnexpectedError; |
771 | } |
772 | |
773 | QT_END_NAMESPACE |
774 | |
775 | |