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

The AddressSpace describes all of the nodes managed by the server and the references between them. Usually it will be populated with the default OPC UA node set plus any that have been added by the server.

The AddressSpace enforces minimal modelling rules - the implementation is expected to abide by rules when adding nodes. To aid with adding nodes to the address space, each node is a NodeType which can be one of DataType, Object, ObjectType, ReferenceType, Method, Variable, VariableType or View. Each node type has various mandatory and optional attributes that can be set with function calls. In addition, each node type has a corresponding builder, e.g. VariableBuilder that can be used to simplify adding nodes.

Some of the methods in AddressSpace are liable to change over time especially as more of the heavy lifting is done via builders.

Implementations

Constructs a default address space consisting of all the nodes and references in the OPC UA default nodeset.

Returns the last modified date for the address space

Registers a namespace described by a uri with address space. The return code is the index of the newly added namespace / index. The index is used with NodeId. Registering a namespace that is already registered will return the index to the previous instance. The last registered namespace becomes the default namespace unless you explcitly call set_default_namespace() after this.

Finds the namespace index of a given namespace

Sets the service level 0-255 worst to best quality of service

Sets values for nodes representing the server.

Sets the history server capabilities based on the supplied flags

Returns the root folder

Returns the objects folder

Returns the types folder

Returns the views folder

Sets the default namespace

Gets the default namespace

Get the default namespace for audit events

Get the internal namespace

Inserts a node into the address space node map and its references to other target nodes. The tuple of references is the target node id, reference type id and a bool which is false for a forward reference and indicating inverse

Adds the standard nodeset to the address space

Inserts a single reference between two nodes in the address space

Adds a folder with a specified id

Adds a folder using a generated node id

Adds a list of variables to the specified parent node

Deletes a node by its node id, and all of its properties and optionally any references to or from it it in the address space.

Finds the matching reference and deletes it

Find node by something that can be turned into a node id and return a reference to it.

Find node by something that can be turned into a node id and return a mutable reference to it.

Finds a node by its node id and returns a reference to it.

Finds a node by its node id and returns a mutable reference to it.

Find and return a variable with the specified node id or return None if it cannot be found or is not a variable

Find and return a variable with the specified node id or return None if it cannot be found or is not a variable

Find and return a variable with the specified node id or return None if it cannot be found or is not a variable

Find and return a variable with the specified node id or return None if it cannot be found or is not a variable

Set a variable value from its NodeId. The function will return false if the variable does not exist, or the node is not a variable.

Set a variable value from its NodeId. The function will return false if the variable does not exist, or the node is not a variable.

Gets a variable value with the supplied NodeId. The function will return Err if the NodeId does not exist or is not a variable.

Registers a method callback on the specified object id and method id

Test if the type definition is defined and valid for a class of the specified type. i.e. if we have a Variable or Object class that the type is a VariableType or ObjectType respectively.

Test if a reference relationship exists between one node and another node

Calls a method node with the supplied request and expecting a result.

Calls require a registered handler to handle the method. If there is no handler, or if the request refers to a non existent object / method, the function will return an error.

Recursive function tries to find if a type is a subtype of another type by looking at its references. Function will positively match a type against itself.

Finds all child propertiesof the parent node. i.e. Aggregates or any subtype

Finds hierarchical references of the parent node, i.e. children, event sources, organizes etc from the parent node to other nodes. This function will return node ids even if the nodes themselves do not exist in the address space.

Finds forward references from the specified node. The reference filter can optionally filter results by a specific type and subtypes.

Finds inverse references, it those that point to the specified node. The reference filter can optionally filter results by a specific type and subtypes.

Finds references for optionally forwards, inverse or both and return the references. The usize represents the index in the collection where the inverse references start (if applicable)

Returns the references

Trait Implementations

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

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.