pub struct VariableType { /* private fields */ }Expand description
A VariableType is a type of node within the AddressSpace.
Implementations§
Source§impl VariableType
impl VariableType
Sourcepub fn new(
node_id: &NodeId,
browse_name: impl Into<QualifiedName>,
display_name: impl Into<LocalizedText>,
data_type: NodeId,
is_abstract: bool,
value_rank: i32,
) -> VariableType
pub fn new( node_id: &NodeId, browse_name: impl Into<QualifiedName>, display_name: impl Into<LocalizedText>, data_type: NodeId, is_abstract: bool, value_rank: i32, ) -> VariableType
Create a new variable type node.
Sourcepub fn new_full(
base: Base,
data_type: NodeId,
is_abstract: bool,
value_rank: i32,
value: Option<DataValue>,
array_dimensions: Option<Vec<u32>>,
) -> Self
pub fn new_full( base: Base, data_type: NodeId, is_abstract: bool, value_rank: i32, value: Option<DataValue>, array_dimensions: Option<Vec<u32>>, ) -> Self
Create a new variable type with all attributes, may change if new attributes are added to the OPC-UA standard.
Sourcepub fn from_attributes(
node_id: &NodeId,
browse_name: impl Into<QualifiedName>,
attributes: VariableTypeAttributes,
) -> Result<Self, FromAttributesError>
pub fn from_attributes( node_id: &NodeId, browse_name: impl Into<QualifiedName>, attributes: VariableTypeAttributes, ) -> Result<Self, FromAttributesError>
Create a new variable type from VariableTypeAttributes.
Sourcepub fn set_data_type(&mut self, data_type: impl Into<NodeId>)
pub fn set_data_type(&mut self, data_type: impl Into<NodeId>)
Set the data type of this variable type.
Sourcepub fn is_abstract(&self) -> bool
pub fn is_abstract(&self) -> bool
Get the IsAbstract attribute for this variable type.
Sourcepub fn set_is_abstract(&mut self, is_abstract: bool)
pub fn set_is_abstract(&mut self, is_abstract: bool)
Set the IsAbstract attribute for this variable type.
Sourcepub fn value_rank(&self) -> i32
pub fn value_rank(&self) -> i32
Get the value rank of this variable type.
Sourcepub fn set_value_rank(&mut self, value_rank: i32)
pub fn set_value_rank(&mut self, value_rank: i32)
Set the value rank of this variable type.
Sourcepub fn array_dimensions(&self) -> Option<Vec<u32>>
pub fn array_dimensions(&self) -> Option<Vec<u32>>
Get the array dimensions of this type.
Sourcepub fn set_array_dimensions(&mut self, array_dimensions: &[u32])
pub fn set_array_dimensions(&mut self, array_dimensions: &[u32])
Set the array dimensions of this type.
Sourcepub fn set_value(&mut self, value: impl Into<Variant>)
pub fn set_value(&mut self, value: impl Into<Variant>)
Set the default value for instances of this type.
Sourcepub fn set_data_value(&mut self, value: DataValue)
pub fn set_data_value(&mut self, value: DataValue)
Set the default value for instances of this type to a full data value.
Trait Implementations§
Source§impl Debug for VariableType
impl Debug for VariableType
Source§impl Default for VariableType
impl Default for VariableType
Source§impl From<VariableType> for NodeType
impl From<VariableType> for NodeType
Source§fn from(value: VariableType) -> Self
fn from(value: VariableType) -> Self
Converts to this type from the input type.
Source§impl Node for VariableType
impl Node for VariableType
Source§fn get_attribute_max_age(
&self,
timestamps_to_return: TimestampsToReturn,
attribute_id: AttributeId,
index_range: &NumericRange,
data_encoding: &DataEncoding,
max_age: f64,
) -> Option<DataValue>
fn get_attribute_max_age( &self, timestamps_to_return: TimestampsToReturn, attribute_id: AttributeId, index_range: &NumericRange, data_encoding: &DataEncoding, max_age: f64, ) -> Option<DataValue>
Finds the attribute and value. The param
max_age is a hint in milliseconds: Read moreSource§fn set_attribute(
&mut self,
attribute_id: AttributeId,
value: Variant,
) -> Result<(), StatusCode>
fn set_attribute( &mut self, attribute_id: AttributeId, value: Variant, ) -> Result<(), StatusCode>
Sets the attribute with the new value
Source§fn get_attribute(
&self,
timestamps_to_return: TimestampsToReturn,
attribute_id: AttributeId,
index_range: &NumericRange,
data_encoding: &DataEncoding,
) -> Option<DataValue>
fn get_attribute( &self, timestamps_to_return: TimestampsToReturn, attribute_id: AttributeId, index_range: &NumericRange, data_encoding: &DataEncoding, ) -> Option<DataValue>
Finds the attribute and value.
Source§impl NodeBase for VariableType
impl NodeBase for VariableType
Source§fn node_class(&self) -> NodeClass
fn node_class(&self) -> NodeClass
Returns the node class - Object, ObjectType, Method, DataType, ReferenceType, Variable, VariableType or View
Source§fn browse_name(&self) -> &QualifiedName
fn browse_name(&self) -> &QualifiedName
Returns the node’s browse name
Source§fn display_name(&self) -> &LocalizedText
fn display_name(&self) -> &LocalizedText
Returns the node’s display name
Source§fn set_display_name(&mut self, display_name: LocalizedText)
fn set_display_name(&mut self, display_name: LocalizedText)
Sets the node’s display name
Source§fn description(&self) -> Option<&LocalizedText>
fn description(&self) -> Option<&LocalizedText>
Get the description of this node.
Source§fn set_description(&mut self, description: LocalizedText)
fn set_description(&mut self, description: LocalizedText)
Set the description of this node.
Source§fn write_mask(&self) -> Option<WriteMask>
fn write_mask(&self) -> Option<WriteMask>
Get the write mask of this node.
Source§fn set_write_mask(&mut self, write_mask: WriteMask)
fn set_write_mask(&mut self, write_mask: WriteMask)
Set the write mask of this node.
Source§fn user_write_mask(&self) -> Option<WriteMask>
fn user_write_mask(&self) -> Option<WriteMask>
Get the user write mask for this node.
Source§fn set_user_write_mask(&mut self, user_write_mask: WriteMask)
fn set_user_write_mask(&mut self, user_write_mask: WriteMask)
Set the user write mask for this node.
Auto Trait Implementations§
impl Freeze for VariableType
impl !RefUnwindSafe for VariableType
impl Send for VariableType
impl Sync for VariableType
impl Unpin for VariableType
impl UnsafeUnpin for VariableType
impl !UnwindSafe for VariableType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more