pub struct Variable { /* private fields */ }
Expand description

A Variable is a type of node within the AddressSpace.

Implementations

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.

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

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

Sets the variable’s DataValue

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

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

Gets the minimum sampling interval, if the attribute was set

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.

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

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

Sets the variable writable state.

Returns the access level of the variable.

Sets the access level of the variable.

Test if the variable is user readable.

Test if the variable is user writable.

Returns the user access level of the variable.

Set the user access level of the variable.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Finds the attribute and value. The param max_age is a hint in milliseconds: Read more

Sets the attribute with the new value

Finds the attribute and value.

Returns the node class - Object, ObjectType, Method, DataType, ReferenceType, Variable, VariableType or View

Returns the node’s NodeId

Returns the node’s browse name

Returns the node’s display name

Sets the node’s display name

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.