Errata exists for this version of the document.
A DiagnosticInfo structure is described in OPC 10000-4. It specifies a number of fields that could be missing. For that reason, the encoding uses a bit mask to indicate which fields are actually present in the encoded form.
As described in OPC 10000-4, the SymbolicId, NamespaceUri, LocalizedText and Locale fields are indexes in a string table which is returned in the response header. Only the index of the corresponding string in the string table is encoded. An index of −1 indicates that there is no value for the string.
DiagnosticInfo allows unlimited nesting which could result in stack overflow errors even if the message size is less than the maximum allowed. Decoders shall support at least 100 nesting levels. Decoders shall report an error if the number of nesting levels exceeds what it supports.
Table 11 – DiagnosticInfo Binary DataEncoding
Name |
Data Type |
Description |
||||||||||||||
Encoding Mask |
Byte |
A bit mask that indicates which fields are present in the stream. The mask has the following bits:
|
||||||||||||||
SymbolicId |
Int32 |
A symbolic name for the status code. |
||||||||||||||
NamespaceUri |
Int32 |
A namespace that qualifies the symbolic id. |
||||||||||||||
Locale |
Int32 |
The locale used for the localized text. |
||||||||||||||
LocalizedText |
Int32 |
A human readable summary of the status code. |
||||||||||||||
Additional Info |
String |
Detailed application specific diagnostic information. |
||||||||||||||
Inner StatusCode |
StatusCode |
A status code provided by an underlying system. |
||||||||||||||
Inner DiagnosticInfo |
DiagnosticInfo |
Diagnostic info associated with the inner status code. |