ViewService

Trait ViewService 

Source
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§

Source

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
§Returns
  • Ok(Option<Vec<BrowseResult>) - A list BrowseResult corresponding to each node to browse. A browse result may contain a continuation point, for use with browse_next().
  • Err(StatusCode) - Request failed, status code is the reason for failure
Source

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 server
  • continuation_points - A list of BrowseDescription continuation points
§Returns
  • Ok(Option<Vec<BrowseResult>) - A list BrowseResult corresponding to each node to browse. A browse result may contain a continuation point, for use with browse_next().
  • Err(StatusCode) - Request failed, status code is the reason for failure
Source

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 of BrowsePath node + relative path for the server to look up
§Returns
  • Ok(Vec<BrowsePathResult>>) - List of BrowsePathResult for the list of browse paths. The size and order of the list matches the size and order of the browse_paths parameter.
  • Err(StatusCode) - Request failed, status code is the reason for failure
Source

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 of NodeId nodes for the server to register
§Returns
  • Ok(Vec<NodeId>) - A list of NodeId corresponding to size and order of the input. The server may return an alias for the input NodeId
  • Err(StatusCode) - Request failed, status code is the reason for failure
Source

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 of NodeId nodes for the server to unregister
§Returns
  • Ok(()) - Request succeeded, server ignores invalid nodes
  • Err(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.

Implementors§