pub trait ViewService: Service {
// Required methods
fn browse(
&self,
nodes_to_browse: &[BrowseDescription],
) -> Result<Option<Vec<BrowseResult>>, StatusCode>;
fn browse_next(
&self,
release_continuation_points: bool,
continuation_points: &[ByteString],
) -> Result<Option<Vec<BrowseResult>>, StatusCode>;
fn translate_browse_paths_to_node_ids(
&self,
browse_paths: &[BrowsePath],
) -> Result<Vec<BrowsePathResult>, StatusCode>;
fn register_nodes(
&self,
nodes_to_register: &[NodeId],
) -> Result<Vec<NodeId>, StatusCode>;
fn unregister_nodes(
&self,
nodes_to_unregister: &[NodeId],
) -> Result<(), StatusCode>;
}Expand description
View Service set
Required Methods§
Sourcefn browse(
&self,
nodes_to_browse: &[BrowseDescription],
) -> Result<Option<Vec<BrowseResult>>, StatusCode>
fn browse( &self, nodes_to_browse: &[BrowseDescription], ) -> Result<Option<Vec<BrowseResult>>, StatusCode>
Discover the references to the specified nodes by sending a BrowseRequest to the server.
See OPC UA Part 4 - Services 5.8.2 for complete description of the service and error responses.
§Arguments
nodes_to_browse- A list ofBrowseDescriptiondescribing nodes to browse.
§Returns
Ok(Option<Vec<BrowseResult>)- A listBrowseResultcorresponding to each node to browse. A browse result may contain a continuation point, for use withbrowse_next().Err(StatusCode)- Request failed, status code is the reason for failure
Sourcefn browse_next(
&self,
release_continuation_points: bool,
continuation_points: &[ByteString],
) -> Result<Option<Vec<BrowseResult>>, StatusCode>
fn browse_next( &self, release_continuation_points: bool, continuation_points: &[ByteString], ) -> Result<Option<Vec<BrowseResult>>, StatusCode>
Continue to discover references to nodes by sending continuation points in a BrowseNextRequest
to the server. This function may have to be called repeatedly to process the initial query.
See OPC UA Part 4 - Services 5.8.3 for complete description of the service and error responses.
§Arguments
release_continuation_points- Flag indicating if the continuation points should be released by the servercontinuation_points- A list ofBrowseDescriptioncontinuation points
§Returns
Ok(Option<Vec<BrowseResult>)- A listBrowseResultcorresponding to each node to browse. A browse result may contain a continuation point, for use withbrowse_next().Err(StatusCode)- Request failed, status code is the reason for failure
Sourcefn translate_browse_paths_to_node_ids(
&self,
browse_paths: &[BrowsePath],
) -> Result<Vec<BrowsePathResult>, StatusCode>
fn translate_browse_paths_to_node_ids( &self, browse_paths: &[BrowsePath], ) -> Result<Vec<BrowsePathResult>, StatusCode>
Translate browse paths to NodeIds by sending a TranslateBrowsePathsToNodeIdsRequest request to the Server
Each BrowsePath is constructed of a starting node and a RelativePath. The specified starting node
identifies the node from which the RelativePath is based. The RelativePath contains a sequence of
ReferenceTypes and BrowseNames.
See OPC UA Part 4 - Services 5.8.4 for complete description of the service and error responses.
§Arguments
browse_paths- A list ofBrowsePathnode + relative path for the server to look up
§Returns
Ok(Vec<BrowsePathResult>>)- List ofBrowsePathResultfor the list of browse paths. The size and order of the list matches the size and order of thebrowse_pathsparameter.Err(StatusCode)- Request failed, status code is the reason for failure
Sourcefn register_nodes(
&self,
nodes_to_register: &[NodeId],
) -> Result<Vec<NodeId>, StatusCode>
fn register_nodes( &self, nodes_to_register: &[NodeId], ) -> Result<Vec<NodeId>, StatusCode>
Register nodes on the server by sending a RegisterNodesRequest. The purpose of this
call is server-dependent but allows a client to ask a server to create nodes which are
otherwise expensive to set up or maintain, e.g. nodes attached to hardware.
See OPC UA Part 4 - Services 5.8.5 for complete description of the service and error responses.
§Arguments
nodes_to_register- A list ofNodeIdnodes for the server to register
§Returns
Ok(Vec<NodeId>)- A list ofNodeIdcorresponding to size and order of the input. The server may return an alias for the inputNodeIdErr(StatusCode)- Request failed, status code is the reason for failure
Sourcefn unregister_nodes(
&self,
nodes_to_unregister: &[NodeId],
) -> Result<(), StatusCode>
fn unregister_nodes( &self, nodes_to_unregister: &[NodeId], ) -> Result<(), StatusCode>
Unregister nodes on the server by sending a UnregisterNodesRequest. This indicates to
the server that the client relinquishes any need for these nodes. The server will ignore
unregistered nodes.
See OPC UA Part 4 - Services 5.8.5 for complete description of the service and error responses.
§Arguments
nodes_to_unregister- A list ofNodeIdnodes for the server to unregister
§Returns
Ok(())- Request succeeded, server ignores invalid nodesErr(StatusCode)- Request failed, status code is the reason for failure
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.