public final class StatusCode extends Object implements BitField
valueOf(UnsignedInteger) static factory method by passing in one of the constants from
StatusCodes.| Modifier and Type | Field and Description |
|---|---|
static StatusCode |
BAD
The StatusCode representing a bad status without a specific subcode.
|
static StatusCode[] |
EMPTY_ARRAY
An empty StatusCode array.
|
static StatusCode |
GOOD
The StatusCode representing a good status without a specific subcode.
|
static int |
HISTORIANBITS_CALCULATED
Indicates that the historical data value was calculated.
|
static int |
HISTORIANBITS_EXTRADATA
Indicates that additional historical data values exist.
|
static int |
HISTORIANBITS_INTERPOLATED
Indicates that the historical data value was interpolated.
|
static int |
HISTORIANBITS_MASK
These bits are set only when reading historical data.
|
static int |
HISTORIANBITS_MULTIVALUE
Indicates that multiple historical data values match the requested timestamp.
|
static int |
HISTORIANBITS_PARTIAL
Indicates that the historical data value represents a partial interval.
|
static int |
HISTORIANBITS_RAW
Indicates that the historical data value is raw data.
|
static int |
HISTORIANBITS_RESERVED
Reserved for future use.
|
static NodeId |
ID
Deprecated.
use
Identifiers.StatusCode instead. |
static int |
INFOBITS_MASK
Additional information bits that qualify the StatusCode.
|
static int |
INFOTYPE_DATAVALUE
The type of information is related to DataValue.
|
static int |
INFOTYPE_MASK
The type of information contained in the info bits.
|
static int |
LIMITBITS_CONSTANT
The value is constant and cannot change.
|
static int |
LIMITBITS_HIGH
The value is at the higher limit for the data source.
|
static int |
LIMITBITS_LOW
The value is at the lower limit for the data source.
|
static int |
LIMITBITS_MASK
The limit bits associated with the data value.
|
static int |
LIMITBITS_NONE
The value is free to change.
|
static int |
OVERFLOW_BIT
If this bit is set, not every detected change has been returned since the Server's queue buffer
for the MonitoredItem reached its limit and had to purge out data.
|
static int |
OVERFLOW_MASK
If these bits are set, not every detected change has been returned since the Server's queue
buffer for the MonitoredItem reached its limit and had to purge out data.
|
static int |
RES1_MASK
Reserved for future use.
|
static int |
RES2_MASK
Reserved for future use.
|
static int |
SEMANTICSCHANGED_MASK
Indicates that the semantics of the associated data value have changed.
|
static int |
SEVERITY_BAD
Indicates a bad StatusCode severity.
|
static int |
SEVERITY_GOOD
Indicates a good StatusCode severity.
|
static int |
SEVERITY_MASK
Indicates whether the StatusCode represents a good, bad or uncertain condition.
|
static int |
SEVERITY_UNCERTAIN
Indicates an uncertain StatusCode severity.
|
static int |
STRUCTURECHANGED_MASK
Indicates that the structure of the associated data value has changed since the last
Notification.
|
static int |
SUBCODE_MASK
The code is a numeric value assigned to represent different conditions.
|
| Constructor and Description |
|---|
StatusCode(UnsignedInteger value)
Deprecated.
use
valueOf(UnsignedInteger) instead. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
equalsStatusCode(StatusCode statusCode)
Returns
true if the given StatusCode has the same severity and subcode as this
StatusCode. |
String |
getDescription()
Returns the textual description of this StatusCode.
|
static StatusCode |
getFromBits(int value)
Returns a
StatusCode that matches the given raw 32-bit representation. |
int |
getHistorianBits()
Returns the historian bits that indicate the source and characteristics of historical data.
|
int |
getInfotype()
Returns the information type bits that indicate the type of additional information contained in
this StatusCode.
|
int |
getLimitBits()
Returns the limit bits that indicate whether the associated value has reached a limit.
|
String |
getName()
Returns the symbolic name of this StatusCode, such as
Bad_NodeIdUnknown. |
int |
getSeverity()
Returns the severity of this StatusCode, indicating whether the status is good, uncertain, or
bad.
|
int |
getSubcode()
Returns the subcode that identifies the specific status or condition represented by this
StatusCode.
|
UnsignedInteger |
getValue()
Returns the complete 32-bit value of this StatusCode as an
UnsignedInteger. |
int |
getValueAsIntBits()
Returns the complete raw 32-bit representation of this StatusCode as an
int. |
int |
hashCode() |
boolean |
isBad()
Returns
true if this status code is bad. |
boolean |
isBitSet(int position)
Is bit set in position.
|
boolean |
isGood()
Returns
true if this status code is good. |
boolean |
isNotBad()
Returns
true if this status code is not bad. |
boolean |
isNotGood()
Returns
true if this status code is not good. |
boolean |
isNotUncertain()
Returns
true if this status code is not uncertain. |
boolean |
isOverflow()
Returns
true if the overflow bit is set, indicating that not every detected change was
returned because the MonitoredItem queue reached its limit and data had to be discarded. |
boolean |
isSemanticsChanged()
Returns
true if the semantics changed bit is set, indicating that the semantics of the
associated data value have changed. |
boolean |
isStatusCode(UnsignedInteger statusCode)
Returns
true if the given status code has the same severity and subcode as this
StatusCode. |
boolean |
isStructureChanged()
Returns
true if the structure changed bit is set, indicating that the structure of the
associated data value has changed. |
boolean |
isUncertain()
Returns
true if this status code is uncertain. |
static StatusCode |
parseStatusCode(String string)
Parses a StatusCode from the given string.
|
String |
toString() |
static StatusCode |
valueOf(UnsignedInteger value)
Returns a
StatusCode that matches the given 32-bit unsigned value. |
@Deprecated public static final NodeId ID
Identifiers.StatusCode instead.public static final StatusCode[] EMPTY_ARRAY
public static final int SEVERITY_MASK
public static final int SEVERITY_GOOD
public static final int SEVERITY_UNCERTAIN
public static final int SEVERITY_BAD
public static final StatusCode GOOD
public static final StatusCode BAD
StatusCodes should be used instead.public static final int RES1_MASK
public static final int SUBCODE_MASK
public static final int STRUCTURECHANGED_MASK
public static final int SEMANTICSCHANGED_MASK
public static final int RES2_MASK
public static final int INFOTYPE_MASK
public static final int INFOTYPE_DATAVALUE
public static final int INFOBITS_MASK
public static final int LIMITBITS_MASK
public static final int LIMITBITS_NONE
public static final int LIMITBITS_LOW
public static final int LIMITBITS_HIGH
public static final int LIMITBITS_CONSTANT
public static final int OVERFLOW_MASK
INFOTYPE_DATAVALUE and OVERFLOW_BITpublic static final int OVERFLOW_BIT
OVERFLOW_MASK,
Constant Field Valuespublic static final int HISTORIANBITS_MASK
public static final int HISTORIANBITS_RAW
public static final int HISTORIANBITS_CALCULATED
public static final int HISTORIANBITS_INTERPOLATED
public static final int HISTORIANBITS_RESERVED
public static final int HISTORIANBITS_PARTIAL
public static final int HISTORIANBITS_EXTRADATA
public static final int HISTORIANBITS_MULTIVALUE
@Deprecated public StatusCode(UnsignedInteger value)
valueOf(UnsignedInteger) instead.public static StatusCode getFromBits(int value)
StatusCode that matches the given raw 32-bit representation. The input
int is treated as unsigned and the result is equivalent to
valueOf(UnsignedInteger) when used with UnsignedInteger.getFromBits(int). This
method may return a cached instance.public static StatusCode parseStatusCode(String string)
Bad_NodeIdUnknown. Throws
IllegalArgumentException if the string cannot be parsed. This method may return a
cached instance.public static StatusCode valueOf(UnsignedInteger value)
StatusCode that matches the given 32-bit unsigned value. This method may
return a cached instance.getFromBits(int)public boolean equalsStatusCode(StatusCode statusCode)
true if the given StatusCode has the same severity and subcode as this
StatusCode. Information bits are ignored when comparing the status codes.isStatusCode(UnsignedInteger)public String getDescription()
public int getHistorianBits()
HISTORIANBITS_MASKpublic int getInfotype()
INFOTYPE_MASKpublic int getLimitBits()
LIMITBITS_MASKpublic String getName()
Bad_NodeIdUnknown. Returns an
empty string if no name is known for this StatusCode.public int getSeverity()
SEVERITY_GOOD, SEVERITY_UNCERTAIN, or
SEVERITY_BAD. When checking for a specific severity, prefer using one of the
convenience methods listed below.isGood(),
isNotGood(),
isUncertain(),
isNotUncertain(),
isBad(),
isNotBad()public int getSubcode()
SUBCODE_MASKpublic UnsignedInteger getValue()
UnsignedInteger.getValueAsIntBits()public int getValueAsIntBits()
int. The
returned value should be interpreted as unsigned.getValue()public boolean isBad()
true if this status code is bad.public boolean isBitSet(int position)
BitFieldpublic boolean isGood()
true if this status code is good.public boolean isNotBad()
true if this status code is not bad.public boolean isNotGood()
true if this status code is not good.public boolean isNotUncertain()
true if this status code is not uncertain.public boolean isOverflow()
true if the overflow bit is set, indicating that not every detected change was
returned because the MonitoredItem queue reached its limit and data had to be discarded.OVERFLOW_MASK,
OVERFLOW_BITpublic boolean isSemanticsChanged()
true if the semantics changed bit is set, indicating that the semantics of the
associated data value have changed.SEMANTICSCHANGED_MASKpublic boolean isStatusCode(UnsignedInteger statusCode)
true if the given status code has the same severity and subcode as this
StatusCode. Information bits are ignored when comparing the status codes.equalsStatusCode(StatusCode)public boolean isStructureChanged()
true if the structure changed bit is set, indicating that the structure of the
associated data value has changed.STRUCTURECHANGED_MASKpublic boolean isUncertain()
true if this status code is uncertain.Copyright © 2026. All rights reserved.