5.2.2.12 DiagnosticInfo

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 is recursive and unlimited recursion could result in stack overflow errors even if the message size is less than the maximum allowed. Decoders shall support at least 4 recursion levels and are not expected to support more than 10. Decoders shall report an error if the number of recursion levels exceeds what it supports.

Table 22 – DiagnosticInfo Binary DataEncoding
NameData TypeDescription
Encoding MaskByte

A bit mask that indicates which fields are present in the stream.

The mask has the following bits:

SymbolicIdInt32A symbolic name for the status code.
NamespaceUriInt32A namespace that qualifies the symbolic id.
LocaleInt32The locale used for the localized text.
LocalizedTextInt32A human readable summary of the status code.
Additional InfoStringDetailed application specific diagnostic information.
Inner StatusCodeStatusCodeA status code provided by an underlying system.
Inner DiagnosticInfoDiagnosticInfoDiagnostic info associated with the inner status code.