pub struct DataValue {
    pub value: Option<Variant>,
    pub status: Option<u32>,
    pub source_timestamp: Option<DateTime>,
    pub source_picoseconds: Option<i16>,
    pub server_timestamp: Option<DateTime>,
    pub server_picoseconds: Option<i16>,
}
Expand description

A data value is a value of a variable in the OPC UA server and contains information about its value, status and change timestamps.

Fields§

§value: Option<Variant>

The value. BaseDataType Not present if the Value bit in the EncodingMask is False.

§status: Option<u32>

The status associated with the value. Not present if the StatusCode bit in the EncodingMask is False Note we don’t use StatusCode enum because extra bits can be set on the value

§source_timestamp: Option<DateTime>

The source timestamp associated with the value. Not present if the SourceTimestamp bit in the EncodingMask is False.

§source_picoseconds: Option<i16>

The number of 10 picosecond intervals for the SourceTimestamp. Not present if the SourcePicoSeconds bit in the EncodingMask is False. If the source timestamp is missing the picoseconds are ignored.

§server_timestamp: Option<DateTime>

The Server timestamp associated with the value. Not present if the ServerTimestamp bit in the EncodingMask is False.

§server_picoseconds: Option<i16>

The number of 10 picosecond intervals for the ServerTimestamp. Not present if the ServerPicoSeconds bit in the EncodingMask is False. If the Server timestamp is missing the picoseconds are ignored.

Implementations§

Creates a data value from the supplied value

Creates an empty DataValue

Sets the value of the data value, updating the timestamps at the same point

Returns the status code as a u32

Test if the value held by this data value is known to be good Anything other than Good is assumed to be invalid.

Trait Implementations§

Returns the byte length of the structure. This calculation should be exact and as efficient as possible. Read more
Encodes the instance to the write stream.
Decodes an instance from the read stream. The decoding limits are restrictions set by the server / client on the length of strings, arrays etc. If these limits are exceeded the implementation should return with a BadDecodingError as soon as possible. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.