[][src]Struct opcua_server::prelude::data_value::DataValue

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>,
}

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.

Methods

impl DataValue[src]

pub fn new<V>(value: V) -> DataValue where
    V: Into<Variant>, 
[src]

Creates a data value from the supplied value

pub fn null() -> DataValue[src]

Creates an empty DataValue

pub fn set_value<V>(
    &mut self,
    value: V,
    source_timestamp: &DateTime,
    server_timestamp: &DateTime
) where
    V: Into<Variant>, 
[src]

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

pub fn status(&self) -> u32[src]

Returns the status code as a u32

pub fn is_valid(&self) -> bool[src]

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

impl BinaryEncoder<DataValue> for DataValue[src]

fn to_vec(&self) -> Vec<u8>[src]

impl Clone for DataValue[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Serialize for DataValue[src]

impl From<DataValue> for Variant[src]

impl From<Variant> for DataValue[src]

impl<'a> From<(Variant, &'a DateTime)> for DataValue[src]

impl<'a> From<(Variant, &'a DateTime, &'a DateTime)> for DataValue[src]

impl PartialEq<DataValue> for DataValue[src]

impl<'de> Deserialize<'de> for DataValue[src]

impl Debug for DataValue[src]

Auto Trait Implementations

impl Send for DataValue

impl Sync for DataValue

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T