EasyUA Reference
StatusCode Structure
Members  See Also  Send Feedback
Opc.Ua.Core.Net4 Assembly > Opc.Ua Namespace : StatusCode Structure

Glossary Item Box

A numeric code that describes the result of a service or operation.

Object Model

StatusCode Structure

Syntax

Visual Basic (Usage)Copy Code
Dim instance As StatusCode
C# 
[DataContractAttribute(Namespace="http://opcfoundation.org/UA/2008/02/Types.xsd", 
   IsNamespaceSetExplicitly=true, 
   Name="StatusCode", 
   IsNameSetExplicitly=true)]
public struct StatusCode : System.ValueType 

Remarks

The StatusCode is defined in OPC UA Specifications Part 4: Services, section 7.22 titled StatusCode.

A numeric code that is used to describe the result of a service or operation. The StatusCode uses bit-assignments, which are described below.

The StatusCode is a 32-bit number, with the top 16-bits (high word) representing the numeric value of an error or condition, whereas the bottom 16-bits (low word) represents additional flags to provide more information on the meaning of the status code.

The following list shows the bit-assignments, i.e. 0-7 means bit 0 to bit 7.

  1. 0 - 7:
    InfoBits. Additional information bits that qualify the status code.
  2. 8 - 9:
    The type of information contained in the info bits. These bits have the following meanings:
    • Binary Representation 00:
      The info bits are not used and must be set to zero.
    • Binary Representation 01:
      The status code and its info bits are associated with a data value returned from the Server.
    • Binary Representation 10 or 11:
      Reserved for future use. The info bits must be ignored.

  3. 10 - 13:
    Reserved for future use. Must always be zero.
  4. 14: Indicates that the semantics of the associated data value have changed. Clients should not process the data value until they re-read the metadata associated with the Variable. Servers should set this bit if the metadata has changed in way that could case application errors if the Client does not re-read the metadata. For example, a change to the engineering units could create problems if the Client uses the value to perform calculations. [UA Part 8] defines the conditions where a Server must set this bit for a DA Variable. Other specifications may define additional conditions. A Server may define other conditions that cause this bit to be set. This bit only has meaning for status codes returned as part of a data change Notification. Status codes used in other contexts must always set this bit to zero.
  5. 15:
    Indicates that the structure of the associated data value has changed since the last Notification. Clients should not process the data value unless they re-read the metadata. Servers must set this bit if the DataTypeEncoding used for a Variable changes. Clause 7.14 describes how the DataTypeEncoding is specified for a Variable. The bit is also set if the data type Attribute of the Variable changes. A Variable with data type BaseDataType does not require the bit to be set when the data type changes. Servers must also set this bit if the length of a fixed length array Variable changes. This bit is provided to warn Clients that parse complex data values that their parsing routines could fail because the serialized form of the data value has changed. This bit only has meaning for status codes returned as part of a data change Notification. Status codes used in other contexts must always set this bit to zero.
  6. 16 - 27:
    The code is a numeric value assigned to represent different conditions. Each code has a symbolic name and a numeric value. All descriptions in the UA specification refer to the symbolic name. [UA Part 6] maps the symbolic names onto a numeric value.
  7. 28 - 29:
    Reserved for future use. Must always be zero.
  8. 30 - 31:
    Indicates whether the status code represents a good, bad or uncertain condition. These bits have the following meanings:
    • Binary Represntation 00:
      Indicates that the operation was successful and the associated results may be used.
    • Binary Represntation 01:
      Indicates that the operation was partially successful and that associated results may not be suitable for some purposes.
    • Binary Represntation 10:
      Indicates that the operation failed and any associated results cannot be used.
    • Binary Represntation 11:
      Reserved for future use. All Clients should treat a status code with this severity as �Bad�.

Inheritance Hierarchy

System.Object
   System.ValueType
      Opc.Ua.StatusCode

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2015, .NET4.x

See Also

Copyright © 2018 Advosol Inc. All Rights Reserved.