public class DataValue
extends java.lang.Object
implements java.io.Serializable
A DataValue represents an attribute value at a point in time. It contains timestamps about when the value was valid, and a StatusCode that defines the Server's ability to access/provide the value. See OPC-UA Spec Part 4 Section 7.7.
This implementation of DataValue does not support the picoseconds resolution feature, and those field will always be encoded/decoded as zero
Modifier and Type | Field and Description |
---|---|
protected UtcTime |
serverTimestamp
The timestamp that this DataValue was recieved by the server
|
protected UtcTime |
sourceTimestamp
The timestamp that this DataValue was recieved from the underlying datasource.
|
protected StatusCode |
statusCode
Indicates the status conditions under which this DataValue's value was generated.
|
protected Variant |
value
The value that the DataValue represents
|
Constructor and Description |
---|
DataValue(StatusCode.SubCode code)
Creates a DataValue with a null variant value, and the given status code, and now for the
server timestamp
|
DataValue(StatusCode code)
Creates a DataValue with a null variant value, and the given status code, and now for the
server timestamp
|
DataValue(Variant object)
Creates a new DataValue for the given object, with a GOOD status code and current timestamps
|
DataValue(Variant object,
StatusCode.SubCode status)
Creates a new DataValue for the given object, with the given status code and current
timestamps
|
DataValue(Variant object,
StatusCode status)
Creates a new DataValue for the given object, with the given status code and current
timestamps
|
DataValue(Variant value,
StatusCode statusCode,
UtcTime sourceTimestamp,
UtcTime serverTimestamp) |
Modifier and Type | Method and Description |
---|---|
UtcTime |
getServerTimestamp() |
UtcTime |
getSourceTimestamp() |
StatusCode |
getStatusCode() |
Variant |
getValue() |
java.lang.String |
toString() |
protected Variant value
protected StatusCode statusCode
protected UtcTime sourceTimestamp
protected UtcTime serverTimestamp
public DataValue(StatusCode.SubCode code)
public DataValue(StatusCode code)
public DataValue(Variant value, StatusCode statusCode, UtcTime sourceTimestamp, UtcTime serverTimestamp)
public DataValue(Variant object)
public DataValue(Variant object, StatusCode.SubCode status)
public DataValue(Variant object, StatusCode status)
public Variant getValue()
public StatusCode getStatusCode()
public UtcTime getSourceTimestamp()
public UtcTime getServerTimestamp()
public java.lang.String toString()
toString
in class java.lang.Object