[][src]Struct opcua_server::address_space::variable::Variable

pub struct Variable { /* fields omitted */ }

A Variable is a type of node within the AddressSpace.

Implementations

impl Variable[src]

pub fn new<R, S, V>(
    node_id: &NodeId,
    browse_name: R,
    display_name: S,
    value: V
) -> Variable where
    R: Into<QualifiedName>,
    S: Into<LocalizedText>,
    V: Into<Variant>, 
[src]

Creates a new variable. Note that data type, value rank and historizing are mandatory attributes of the Variable but not required by the constructor. The data type and value rank are inferred from the value. Historizing is not supported so is always false. If the inferred types for data type or value rank are wrong, they may be explicitly set, or call new_data_value() instead.

pub fn from_attributes<S>(
    node_id: &NodeId,
    browse_name: S,
    attributes: VariableAttributes
) -> Result<Self, ()> where
    S: Into<QualifiedName>, 
[src]

pub fn new_data_value<S, R, N, V>(
    node_id: &NodeId,
    browse_name: R,
    display_name: S,
    data_type: N,
    value_rank: Option<i32>,
    array_dimensions: Option<u32>,
    value: V
) -> Variable where
    R: Into<QualifiedName>,
    S: Into<LocalizedText>,
    N: Into<NodeId>,
    V: Into<Variant>, 
[src]

Constructs a new variable with the specified id, name, type and value

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

pub fn value(
    &self,
    timestamps_to_return: TimestampsToReturn,
    index_range: NumericRange,
    data_encoding: &QualifiedName,
    max_age: f64
) -> DataValue
[src]

pub fn set_value<V>(
    &mut self,
    index_range: NumericRange,
    value: V
) -> Result<(), StatusCode> where
    V: Into<Variant>, 
[src]

Sets the variable's Variant value. The timestamps for the change are updated to now.

pub fn set_value_range(
    &mut self,
    value: Variant,
    index_range: NumericRange,
    status_code: StatusCode,
    server_timestamp: &DateTime,
    source_timestamp: &DateTime
) -> Result<(), StatusCode>
[src]

pub fn set_value_direct<V>(
    &mut self,
    value: V,
    status_code: StatusCode,
    server_timestamp: &DateTime,
    source_timestamp: &DateTime
) -> Result<(), StatusCode> where
    V: Into<Variant>, 
[src]

Sets the variable's DataValue

pub fn set_value_getter(
    &mut self,
    value_getter: Arc<Mutex<dyn AttributeGetter + Send>>
)
[src]

Sets a getter function that will be called to get the value of this variable.

pub fn set_value_setter(
    &mut self,
    value_setter: Arc<Mutex<dyn AttributeSetter + Send>>
)
[src]

Sets a setter function that will be called to set the value of this variable.

pub fn minimum_sampling_interval(&self) -> Option<f64>[src]

Gets the minimum sampling interval, if the attribute was set

pub fn set_minimum_sampling_interval(&mut self, minimum_sampling_interval: f64)[src]

Sets the minimum sampling interval

Specifies in milliseconds how fast the server can reasonably sample the value for changes

The value 0 means server is to monitor the value continuously. The value -1 means indeterminate.

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

Test if the variable is readable. This will be called by services before getting the value of the node.

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

Test if the variable is writable. This will be called by services before setting the value on the node.

pub fn set_writable(&mut self, writable: bool)[src]

Sets the variable writable state.

pub fn access_level(&self) -> AccessLevel[src]

Returns the access level of the variable.

pub fn set_access_level(&mut self, access_level: AccessLevel)[src]

Sets the access level of the variable.

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

Test if the variable is user readable.

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

Test if the variable is user writable.

pub fn user_access_level(&self) -> UserAccessLevel[src]

Returns the user access level of the variable.

pub fn set_user_access_level(&mut self, user_access_level: UserAccessLevel)[src]

Set the user access level of the variable.

pub fn value_rank(&self) -> i32[src]

pub fn set_value_rank(&mut self, value_rank: i32)[src]

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

pub fn set_historizing(&mut self, historizing: bool)[src]

pub fn array_dimensions(&self) -> Option<Vec<u32>>[src]

pub fn set_array_dimensions(&mut self, array_dimensions: &[u32])[src]

pub fn data_type(&self) -> NodeId[src]

pub fn set_data_type<T>(&mut self, data_type: T) where
    T: Into<NodeId>, 
[src]

Trait Implementations

impl Debug for Variable[src]

impl Default for Variable[src]

impl Into<NodeType> for Variable[src]

impl Node for Variable[src]

impl NodeBase for Variable[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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<V, T> VZip<V> for T where
    V: MultiLane<T>,