Struct opcua_server::prelude::DataValue
source · 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§
source§impl DataValue
impl DataValue
sourcepub fn new<V>(value: V) -> DataValuewhere
V: Into<Variant>,
pub fn new<V>(value: V) -> DataValuewhere
V: Into<Variant>,
Creates a data value from the supplied value
Trait Implementations§
source§impl BinaryEncoder<DataValue> for DataValue
impl BinaryEncoder<DataValue> for DataValue
source§fn byte_len(&self) -> usize
fn byte_len(&self) -> usize
source§fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode>where
S: Write,
fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode>where
S: Write,
source§fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<DataValue, StatusCode>where
S: Read,
fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<DataValue, StatusCode>where
S: Read,
BadDecodingError as soon as possible. Read more