Struct opcua_server::config::ServerConfig
source · pub struct ServerConfig {Show 14 fields
pub application_name: String,
pub application_uri: String,
pub product_uri: String,
pub pki_dir: PathBuf,
pub create_sample_keypair: bool,
pub discovery_server_url: Option<String>,
pub tcp_config: TcpConfig,
pub user_tokens: BTreeMap<String, ServerUserToken>,
pub discovery_url: String,
pub endpoints: BTreeMap<String, ServerEndpoint>,
pub max_subscriptions: u32,
pub max_array_length: u32,
pub max_string_length: u32,
pub max_byte_string_length: u32,
}Fields§
§application_name: StringAn id for this server
application_uri: StringA description for this server
product_uri: StringProduct url
pki_dir: PathBufpki folder, either absolute or relative to executable
create_sample_keypair: boolAutocreates public / private keypair if they don’t exist. For testing/samples only since you do not have control of the values
discovery_server_url: Option<String>Url to a discovery server - adding this string causes the server to assume you wish to register the server with a discovery server.
tcp_config: TcpConfigtcp configuration information
user_tokens: BTreeMap<String, ServerUserToken>User tokens
discovery_url: Stringdiscovery endpoint url which may or may not be the same as the service endpoints below.
endpoints: BTreeMap<String, ServerEndpoint>Endpoints supported by the server
max_subscriptions: u32Maximum number of subscriptions in a session
max_array_length: u32Max array length in elements
max_string_length: u32Max string length in characters
max_byte_string_length: u32Max bytestring length in bytes
Implementations§
source§impl ServerConfig
impl ServerConfig
pub fn new<T>(
application_name: T,
user_tokens: BTreeMap<String, ServerUserToken>,
endpoints: BTreeMap<String, ServerEndpoint>
) -> Selfwhere
T: Into<String>,
pub fn decoding_limits(&self) -> DecodingLimits
pub fn add_endpoint(&mut self, id: &str, endpoint: ServerEndpoint)
sourcepub fn base_endpoint_url(&self) -> String
pub fn base_endpoint_url(&self) -> String
Returns a opc.tcp://server:port url that paths can be appended onto
sourcepub fn find_endpoint(
&self,
endpoint_url: &str,
security_policy: SecurityPolicy,
security_mode: MessageSecurityMode
) -> Option<&ServerEndpoint>
pub fn find_endpoint(
&self,
endpoint_url: &str,
security_policy: SecurityPolicy,
security_mode: MessageSecurityMode
) -> Option<&ServerEndpoint>
Find the first endpoint that matches the specified url, security policy and message security mode.
Trait Implementations§
source§impl Clone for ServerConfig
impl Clone for ServerConfig
source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more