public class StatusCode
extends java.lang.Object
implements java.io.Serializable
A StatusCode is a 32-bit numerical value that is used to report the outcome of an operation the status of the information returned by that operation. See OPC-UA Spec Part 4 Section 7.33
Thep top 16 bits represent the numeric value of the code that shall be used for detecting specific errors or conditions. The bottom 16 bits are bit flags that contain additional information but do not affect the meaning of the StatusCode
Modifier and Type | Class and Description |
---|---|
static class |
StatusCode.InfoType |
static class |
StatusCode.Severity |
static class |
StatusCode.SubCode |
Constructor and Description |
---|
StatusCode(int value) |
StatusCode(StatusCode.SubCode subcode)
Creates a new status code with the given SubCode and false for the datavalue flag.
|
StatusCode(StatusCode.SubCode subcode,
boolean datavalue)
Creates a new status code based on the given SubCode
|
StatusCode(StatusCode.SubCode subCode,
StatusCode.Severity severity) |
StatusCode(StatusCode.SubCode subCode,
StatusCode.Severity severity,
boolean dataValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
short |
getInfoBits()
Returns the InfoBits of the StatusCode (bits 0:9).
|
StatusCode.InfoType |
getInfoType() |
java.lang.String |
getName() |
short |
getRawSubCode() |
int |
getRawValue() |
StatusCode.Severity |
getSeverity() |
StatusCode.SubCode |
getSubCode() |
int |
hashCode() |
boolean |
isGood() |
boolean |
isSemanticsChanged() |
boolean |
isStructureChanged() |
static void |
main(java.lang.String[] args) |
java.lang.String |
toString() |
static StatusCode |
worstOf(StatusCode q1,
StatusCode q2)
Returns the 'worst' or 'most severe' of the two qualities.
|
static StatusCode |
worstOfAll(StatusCode... q) |
public static final StatusCode GOOD
public static final StatusCode GOOD_VALUE
public static final StatusCode BAD
public static final StatusCode BAD_VALUE
public static final StatusCode BAD_VALUE_UNAVAILABLE
public static final StatusCode BAD_STALE
public static final StatusCode BAD_CONFIG_ERROR
public static final StatusCode BAD_NOT_FOUND
public static final StatusCode BAD_INTERNAL_ERROR
public static final StatusCode BAD_SECURITY_CHECK_FAILED
public static final StatusCode BAD_NOT_READABLE
public static final StatusCode BAD_NOT_WRITABLE
public static final StatusCode BAD_TIMEOUT
public static final StatusCode BAD_UNKNOWN
public static final StatusCode BAD_WAITING_FOR_INITIAL_DATA
public static final StatusCode BAD_SERVER_NOT_CONNECTED
public static final StatusCode BAD_CONNECTION_CLOSED
public static final StatusCode BAD_CONNECTION_REJECTED
public static final StatusCode BAD_NOT_CONNECTED
public static final StatusCode BAD_NODEID_UNKNOWN
public static final StatusCode BAD_NOMATCH
public static final StatusCode BAD_SESSION_NOT_ACTIVATED
public static final StatusCode BAD_SESSION_ID_INVALID
public static final StatusCode BAD_USER_ACCESS_DENIED
public static final StatusCode BAD_TRIAL_TIMEOUT
public static final StatusCode BAD_OUT_OF_RANGE
public static final StatusCode BAD_DEMO_EXPIRED
public static final int STRUCTURE_CHANGED_MASK
public static final int SEMANTICS_CHANGED_MASK
protected int value
public StatusCode(int value)
public StatusCode(StatusCode.SubCode subCode, StatusCode.Severity severity)
public StatusCode(StatusCode.SubCode subCode, StatusCode.Severity severity, boolean dataValue)
public StatusCode(StatusCode.SubCode subcode)
subcode
- public StatusCode(StatusCode.SubCode subcode, boolean datavalue)
public static void main(java.lang.String[] args)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public StatusCode.Severity getSeverity()
public boolean isGood()
public short getRawSubCode()
public StatusCode.SubCode getSubCode()
public boolean isStructureChanged()
public boolean isSemanticsChanged()
public StatusCode.InfoType getInfoType()
public short getInfoBits()
public int getRawValue()
public static StatusCode worstOf(StatusCode q1, StatusCode q2)
q1
- q2
- public static StatusCode worstOfAll(StatusCode... q)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()