Crate opcua_server

source ·
Expand description

The OPC UA Server module contains all server side functionality - address space, services, server security, session management, local discovery server registration and subscriptions.

Usage

An implementation will usually start by building a ServerConfig, either from a configuration file, or through code. Then it will construct a Server, initialise its address space, and then run it.

Example

This is a minimal server which runs with the default address space on the default port.

extern crate opcua_types;
extern crate opcua_core;
extern crate opcua_server;

use opcua_server::prelude::*;

fn main() {
    let server: Server = ServerBuilder::new_sample().server().unwrap();
    server.run();
}

Modules

Provides functionality to create an address space, find nodes, add nodes, change attributes and values on nodes.
Provides communication services for the server such as the transport layer and secure channel implementation
Provides configuration settings for the server including serialization and deserialization from file.
Provides constants that govern the internal workings of the server implementation.
Provides a browse continuation point type for tracking a browse operation initiated by a client.
Provides diagnostics structures and functions for gathering information about the running state of a server.
Provides debug metric of server state that can be used by anything that wants to see what is happening in the server. State is updated by the server as sessions are added, removed, and when subscriptions / monitored items are added, removed.
Provides a way to use most types and functions commonly used by server implementations from a single use statement.
Provides the Server type and functionality related to it.
Provides server state information, such as status, configuration, running servers and so on.
Provides utility routines for things that might be used in a number of places elsewhere.

Macros

See register_runtime_component
This macro is for debugging purposes - code register a running component (e.g. tokio task) when it starts and calls the corresponding deregister macro when it finishes. This enables the code to print out a list of components in existence at any time to ensure they were properly cleaned up.
Returns a vector of all currently existing runtime components as a vector of strings.