[−][src]Struct opcua_server::prelude::data_value::DataValue
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]
V: Into<Variant>,
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]
&mut self,
value: V,
source_timestamp: &DateTime,
server_timestamp: &DateTime
) where
V: Into<Variant>,
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 byte_len(&self) -> usize[src]
fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode> where
S: Write, [src]
S: Write,
fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<DataValue, StatusCode> where
S: Read, [src]
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<DataValue, StatusCode> where
S: Read,
fn to_vec(&self) -> Vec<u8>[src]
impl Clone for DataValue[src]
fn clone(&self) -> 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]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer, [src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
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]
fn deserialize<__D>(
__deserializer: __D
) -> Result<DataValue, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>, [src]
__deserializer: __D
) -> Result<DataValue, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Debug for DataValue[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>, [src]
T: Deserialize<'de>,