[−][src]Struct opcua_server::address_space::variable::Variable
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]
node_id: &NodeId,
browse_name: R,
display_name: S,
value: V
) -> Variable where
R: Into<QualifiedName>,
S: Into<LocalizedText>,
V: Into<Variant>,
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]
node_id: &NodeId,
browse_name: S,
attributes: VariableAttributes
) -> Result<Self, ()> where
S: Into<QualifiedName>,
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]
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>,
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]
&self,
timestamps_to_return: TimestampsToReturn,
index_range: NumericRange,
data_encoding: &QualifiedName,
max_age: f64
) -> DataValue
pub fn set_value<V>(
&mut self,
index_range: NumericRange,
value: V
) -> Result<(), StatusCode> where
V: Into<Variant>, [src]
&mut self,
index_range: NumericRange,
value: V
) -> Result<(), StatusCode> where
V: Into<Variant>,
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]
&mut self,
value: Variant,
index_range: NumericRange,
status_code: StatusCode,
server_timestamp: &DateTime,
source_timestamp: &DateTime
) -> Result<(), StatusCode>
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]
&mut self,
value: V,
status_code: StatusCode,
server_timestamp: &DateTime,
source_timestamp: &DateTime
) -> Result<(), StatusCode> where
V: Into<Variant>,
Sets the variable's DataValue
pub fn set_value_getter(
&mut self,
value_getter: Arc<Mutex<dyn AttributeGetter + Send>>
)[src]
&mut self,
value_getter: Arc<Mutex<dyn AttributeGetter + Send>>
)
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]
&mut self,
value_setter: Arc<Mutex<dyn AttributeSetter + Send>>
)
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]
T: Into<NodeId>,
Trait Implementations
impl Debug for Variable[src]
impl Default for Variable[src]
impl Into<NodeType> for Variable[src]
impl Node for Variable[src]
fn get_attribute_max_age(
&self,
timestamps_to_return: TimestampsToReturn,
attribute_id: AttributeId,
index_range: NumericRange,
data_encoding: &QualifiedName,
max_age: f64
) -> Option<DataValue>[src]
&self,
timestamps_to_return: TimestampsToReturn,
attribute_id: AttributeId,
index_range: NumericRange,
data_encoding: &QualifiedName,
max_age: f64
) -> Option<DataValue>
fn set_attribute(
&mut self,
attribute_id: AttributeId,
value: Variant
) -> Result<(), StatusCode>[src]
&mut self,
attribute_id: AttributeId,
value: Variant
) -> Result<(), StatusCode>
fn get_attribute(
&self,
timestamps_to_return: TimestampsToReturn,
attribute_id: AttributeId,
index_range: NumericRange,
data_encoding: &QualifiedName
) -> Option<DataValue>[src]
&self,
timestamps_to_return: TimestampsToReturn,
attribute_id: AttributeId,
index_range: NumericRange,
data_encoding: &QualifiedName
) -> Option<DataValue>
impl NodeBase for Variable[src]
fn node_class(&self) -> NodeClass[src]
fn node_id(&self) -> NodeId[src]
fn browse_name(&self) -> QualifiedName[src]
fn display_name(&self) -> LocalizedText[src]
fn set_display_name(&mut self, display_name: LocalizedText)[src]
fn description(&self) -> Option<LocalizedText>[src]
fn set_description(&mut self, description: LocalizedText)[src]
fn write_mask(&self) -> Option<WriteMask>[src]
fn set_write_mask(&mut self, write_mask: WriteMask)[src]
fn user_write_mask(&self) -> Option<WriteMask>[src]
fn set_user_write_mask(&mut self, user_write_mask: WriteMask)[src]
Auto Trait Implementations
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnwindSafe for Variable
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> 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, U> TryInto<U> 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,