public final class StatusCode extends Object implements BitField
StatusCodes,
StatusCodeDescriptions| Modifier and Type | Field and Description |
|---|---|
static StatusCode |
BAD |
static StatusCode[] |
EMPTY_ARRAY |
static StatusCode |
GOOD |
static int |
HISTORIANBITS_CALCULATED |
static int |
HISTORIANBITS_EXTRADATA |
static int |
HISTORIANBITS_INTERPOLATED |
static int |
HISTORIANBITS_MASK
These bits are set only when reading historical data.
|
static int |
HISTORIANBITS_MULTIVALUE |
static int |
HISTORIANBITS_PARTIAL |
static int |
HISTORIANBITS_RAW |
static int |
HISTORIANBITS_RESERVED |
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 |
static int |
SEVERITY_GOOD |
static int |
SEVERITY_MASK
Indicates whether the StatusCode represents a good, bad or uncertain condition.
|
static int |
SEVERITY_UNCERTAIN |
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)
Check if the status codes equal to severity and subcode, ignoring the lowest bits of the code.
|
String |
getDescription()
getDescription.
|
static StatusCode |
getFromBits(int value)
getFromBits.
|
int |
getHistorianBits()
getHistorianBits.
|
int |
getInfotype()
getInfotype.
|
int |
getLimitBits()
getLimitBits.
|
String |
getName()
getName.
|
int |
getSeverity()
getSeverity.
|
int |
getSubcode()
getSubcode.
|
UnsignedInteger |
getValue()
Getter for the field
value. |
int |
getValueAsIntBits()
getValueAsIntBits.
|
int |
hashCode() |
boolean |
isBad()
Tests if this status code is bad.
|
boolean |
isBitSet(int position)
Is bit set in position.
|
boolean |
isGood()
Tests if this status code is good.
|
boolean |
isNotBad()
tests if a status code is not bad.
|
boolean |
isNotGood()
Tests if this status code is not good.
|
boolean |
isNotUncertain()
Tests if this status code is not uncertain.
|
boolean |
isOverflow()
isOverflow.
|
boolean |
isSemanticsChanged()
isSemanticsChanged.
|
boolean |
isStatusCode(UnsignedInteger statusCode)
Matches argument against subcode and severity.
|
boolean |
isStructureChanged()
isStructureChanged.
|
boolean |
isUncertain()
Tests if this status code is not uncertain.
|
static StatusCode |
parseStatusCode(String string)
Parse a StatusCode value from a string.
|
String |
toString() |
static StatusCode |
valueOf(UnsignedInteger value)
Constructs a StatusCode that has the given
UnsignedInteger as the 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
public static final int RES1_MASK
public static final int SUBCODE_MASK
public static final int STRUCTURECHANGED_MASK
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 shall also set this bit if the ArrayDimensions or the ValueRank Attribute or the EnumStrings Property of the DataType of the 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 has meaning only for StatusCodes returned as part of a data change Notification or the HistoryRead. StatusCodes used in other contexts shall always set this bit to zero.
public static final int SEMANTICSCHANGED_MASK
Servers should set this bit if the metadata has changed in way that could cause 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.
Part 8 defines the conditions where a Server shall 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 has meaning only for StatusCodes returned as part of a data change Notification or the HistoryRead. StatusCodes used in other contexts shall always set this bit to zero.
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
Consists of the INFOTYPE_DATAVALUE and OVERFLOW_BIT
public static final int OVERFLOW_BIT
Must be used with the INFOTYPE_DATAVALUE.
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.Constructor for StatusCode.
value - a UnsignedInteger object.public static StatusCode getFromBits(int value)
getFromBits.
value - a int.StatusCode object.public static StatusCode parseStatusCode(String string)
string - the string to parse, assumed to contain a n UsignedInteger value or hexadecimal
code corresponding to the status or a string identifier, such as 'Bad_NodeIdUnknown'.public static StatusCode valueOf(UnsignedInteger value)
UnsignedInteger as the value. This method
may return a cached instance.public boolean equalsStatusCode(StatusCode statusCode)
statusCode - the StatusCode to compare this one topublic int getHistorianBits()
getHistorianBits.
public int getInfotype()
getInfotype.
public int getLimitBits()
getLimitBits.
public int getSeverity()
getSeverity.
public int getSubcode()
getSubcode.
public UnsignedInteger getValue()
Getter for the field value.
UnsignedInteger object.public int getValueAsIntBits()
getValueAsIntBits.
public boolean isBad()
public boolean isBitSet(int position)
BitFieldpublic boolean isGood()
public boolean isNotBad()
public boolean isNotGood()
public boolean isNotUncertain()
public boolean isOverflow()
isOverflow.
public boolean isSemanticsChanged()
isSemanticsChanged.
public boolean isStatusCode(UnsignedInteger statusCode)
StatusCodes.statusCode - a UnsignedInteger object.equalsStatusCode(StatusCode)public boolean isStructureChanged()
isStructureChanged.
public boolean isUncertain()
Copyright © 2026. All rights reserved.