open62541pp 0.16.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
opcua::ServerConfig Class Reference

#include <server.hpp>

Inheritance diagram for opcua::ServerConfig:
[legend]

Detailed Description

Server configuration.

See also
UA_ServerConfig
Examples
server.cpp, server_accesscontrol.cpp, and server_logger.cpp.

Definition at line 38 of file server.hpp.

Public Member Functions

 ServerConfig ()
 
 ServerConfig (uint16_t port, const ByteString &certificate={})
 
 ServerConfig (uint16_t port, const ByteString &certificate, const ByteString &privateKey, Span< const ByteString > trustList, Span< const ByteString > issuerList, Span< const ByteString > revocationList={})
 
 ServerConfig (UA_ServerConfig &&native)
 
 ~ServerConfig ()
 
 ServerConfig (const ServerConfig &)=delete
 
 ServerConfig (ServerConfig &&other) noexcept
 
ServerConfigoperator= (const ServerConfig &)=delete
 
ServerConfigoperator= (ServerConfig &&other) noexcept
 
void setLogger (LogFunction func)
 
void setBuildInfo (BuildInfo buildInfo)
 
void setApplicationUri (std::string_view uri)
 
void setProductUri (std::string_view uri)
 
void setApplicationName (std::string_view name)
 
void setAccessControl (AccessControlBase &accessControl)
 
void setAccessControl (std::unique_ptr< AccessControlBase > &&accessControl)
 
- Public Member Functions inherited from opcua::Wrapper< UA_ServerConfig >
constexpr Wrapper ()=default
 
constexpr Wrapper (const UA_ServerConfig &native)
 
constexpr Wrapper (UA_ServerConfig &&native) noexcept
 
constexpr operator UA_ServerConfig & () noexcept
 
constexpr operator const UA_ServerConfig & () const noexcept
 
constexpr UA_ServerConfigoperator-> () noexcept
 
constexpr const UA_ServerConfigoperator-> () const noexcept
 
constexpr UA_ServerConfighandle () noexcept
 
constexpr const UA_ServerConfighandle () const noexcept
 

Additional Inherited Members

- Public Types inherited from opcua::Wrapper< UA_ServerConfig >
using NativeType
 
- Protected Member Functions inherited from opcua::Wrapper< UA_ServerConfig >
constexpr const UA_ServerConfignative () const noexcept
 
constexpr UA_ServerConfignative () noexcept
 

Constructor & Destructor Documentation

◆ ServerConfig() [1/6]

opcua::ServerConfig::ServerConfig ( )

Create server config with default configuration.

Security policies:

◆ ServerConfig() [2/6]

opcua::ServerConfig::ServerConfig ( uint16_t port,
const ByteString & certificate = {} )
explicit

Create server config with minimal configuration.

Security policies:

Parameters
portPort number
certificateOptional X.509 v3 certificate in DER encoded format

◆ ServerConfig() [3/6]

opcua::ServerConfig::ServerConfig ( uint16_t port,
const ByteString & certificate,
const ByteString & privateKey,
Span< const ByteString > trustList,
Span< const ByteString > issuerList,
Span< const ByteString > revocationList = {} )

Create server config with encryption enabled (PKI).

Security policies:

Parameters
portPort number
certificateX.509 v3 certificate in DER encoded format
privateKeyPrivate key in PEM encoded format
trustListList of trusted certificates in DER encoded format
issuerListList of issuer certificates (i.e. CAs) in DER encoded format
revocationListCertificate revocation lists (CRL) in DER encoded format
See also
https://reference.opcfoundation.org/Core/Part2/v105/docs/8
https://reference.opcfoundation.org/Core/Part4/v105/docs/6.1
https://reference.opcfoundation.org/Core/Part6/v105/docs/6.2

◆ ServerConfig() [4/6]

opcua::ServerConfig::ServerConfig ( UA_ServerConfig && native)
explicit

◆ ~ServerConfig()

opcua::ServerConfig::~ServerConfig ( )

◆ ServerConfig() [5/6]

opcua::ServerConfig::ServerConfig ( const ServerConfig & )
delete

◆ ServerConfig() [6/6]

opcua::ServerConfig::ServerConfig ( ServerConfig && other)
noexcept

Member Function Documentation

◆ operator=() [1/2]

ServerConfig & opcua::ServerConfig::operator= ( const ServerConfig & )
delete

◆ operator=() [2/2]

ServerConfig & opcua::ServerConfig::operator= ( ServerConfig && other)
noexcept

◆ setLogger()

void opcua::ServerConfig::setLogger ( LogFunction func)

◆ setBuildInfo()

void opcua::ServerConfig::setBuildInfo ( BuildInfo buildInfo)

◆ setApplicationUri()

void opcua::ServerConfig::setApplicationUri ( std::string_view uri)

Set application URI, default: urn:open62541.server.application.

Examples
server.cpp.

Referenced by opcua::Server::setApplicationUri().

◆ setProductUri()

void opcua::ServerConfig::setProductUri ( std::string_view uri)

Set product URI, default: http://open62541.org.

Examples
server.cpp.

Referenced by opcua::Server::setProductUri().

◆ setApplicationName()

void opcua::ServerConfig::setApplicationName ( std::string_view name)

Set application name, default: open62541-based OPC UA Application.

Examples
server.cpp.

Referenced by opcua::Server::setApplicationName().

◆ setAccessControl() [1/2]

void opcua::ServerConfig::setAccessControl ( AccessControlBase & accessControl)

Set custom access control.

Examples
server_accesscontrol.cpp.

Referenced by opcua::Server::setAccessControl(), and opcua::Server::setAccessControl().

◆ setAccessControl() [2/2]

void opcua::ServerConfig::setAccessControl ( std::unique_ptr< AccessControlBase > && accessControl)

Set custom access control (transfer ownership to Server).