Record Class StatusCode
java.lang.Object
java.lang.Record
org.eclipse.milo.opcua.stack.core.types.builtin.StatusCode
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAdditional information bits that qualify the StatusCode when theStatusCode.InfoTypeisStatusCode.InfoType.DataValue.static interfaceAdditional information bits that qualify the StatusCode.static enumDescribes the type of information contained in the info bits. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StatusCodestatic final StatusCodestatic final StatusCode -
Constructor Summary
ConstructorsConstructorDescriptionStatusCode(int value) StatusCode(long value) Creates an instance of aStatusCoderecord class.StatusCode(UInteger value) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Get the type of information contained in the info bits.longgetValue()final inthashCode()Returns a hash code value for this object.booleanisBad()booleanisGood()booleanbooleanbooleanstatic StatusCodeof(long value) Create a new StatusCode with the given value.@NonNull StringtoString()Returns a string representation of this record class.longvalue()Returns the value of thevaluerecord component.Set the DataValue InfoType bits.Clear the DataValue InfoType bits.Clear the DataValue InfoType and Overflow InfoBits.Set the DataValue InfoType and Overflow InfoBits.
-
Field Details
-
GOOD
-
BAD
-
UNCERTAIN
-
-
Constructor Details
-
StatusCode
public StatusCode(int value) -
StatusCode
-
StatusCode
public StatusCode(long value) Creates an instance of aStatusCoderecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
getValue
public long getValue() -
isGood
public boolean isGood() -
isBad
public boolean isBad() -
isUncertain
public boolean isUncertain() -
withDataValueInfoType
Set the DataValue InfoType bits.- Returns:
- a new
StatusCodewith DataValue InfoType bits set.
-
withoutDataValueInfoType
Clear the DataValue InfoType bits.- Returns:
- a new
StatusCodewith DataValue InfoType bits cleared.
-
withOverflow
Set the DataValue InfoType and Overflow InfoBits.- Returns:
- a new
StatusCodeDataValue and Overflow bits set.
-
withoutOverflow
Clear the DataValue InfoType and Overflow InfoBits.- Returns:
- a new
StatusCodewith DataValue and Overflow bits cleared.
-
isOverflowSet
public boolean isOverflowSet()- Returns:
trueif DataValue and Overflow bits are set.
-
isSecurityError
public boolean isSecurityError()- Returns:
trueif the StatusCode is considered security-related for the purpose of diagnostics.
-
getInfoType
Get the type of information contained in the info bits.- Returns:
- the
StatusCode.InfoType.
-
getDataValueInfoBits
- Returns:
StatusCode.DataValueInfoBitsif theStatusCode.InfoTypeisStatusCode.InfoType.DataValue.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
of
Create a new StatusCode with the given value.- Parameters:
value- the value of the StatusCode.- Returns:
- a new StatusCode.
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
value
public long value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-