Skip to content

Reference

OpcApplicationConfiguration Members

Represents the configuration of an OPC UA application, which completes missing settings using the defaults of the SDK.

Reference

OpcApplicationConfiguration Members ​

Type
OpcApplicationConfiguration
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Constructors ​

OpcApplicationConfiguration ​

2 overloads

OverloadDescription
OpcApplicationConfiguration()Initializes a new instance of the OpcApplicationConfiguration class using the defaults of the SDK.
OpcApplicationConfiguration(OpcApplicationType)since v2.7Initializes a new instance of the OpcApplicationConfiguration class for an application of the type specified using the defaults of the SDK.

OpcApplicationConfiguration() ​

Initializes a new instance of the OpcApplicationConfiguration class using the defaults of the SDK.

csharp
public OpcApplicationConfiguration()
vbnet
Public Sub New()

Remarks

The application name is the title or the product of the entry assembly, otherwise "OPC Application". The product URI is built from the company and the product of the entry assembly ("urn:company:product" if one of them is missing). Untrusted certificates are accepted automatically (see AutoAcceptUntrustedCertificates).

OpcApplicationConfiguration(OpcApplicationType) ​

since v2.7

Initializes a new instance of the OpcApplicationConfiguration class for an application of the type specified using the defaults of the SDK.

csharp
public OpcApplicationConfiguration(OpcApplicationType applicationType)
vbnet
Public Sub New(applicationType As OpcApplicationType)

Parameters

NameTypeDescription
applicationTypeOpcApplicationTypeThe type of the application.

Remarks

See OpcApplicationConfiguration. The settings the type requires (e.g. the client configuration of a client) are created as well.

Methods ​

LoadClientConfig ​

static

Loads the configuration of a client from the configuration file named after the configSectionName specified.

csharp
public static OpcApplicationConfiguration LoadClientConfig(
    string configSectionName)
vbnet
Public Shared Function LoadClientConfig(
    configSectionName As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
configSectionNameStringThe name of the configuration, which is the path of the file without the extension ".Config.xml".

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe configSectionName is equals Empty.
ArgumentNullExceptionThe configSectionName is a null reference (Nothing in Visual Basic).

Remarks

See LoadFromConfig.

LoadClientConfigFile ​

static

Loads the configuration of a client from the file specified.

csharp
public static OpcApplicationConfiguration LoadClientConfigFile(string filePath)
vbnet
Public Shared Function LoadClientConfigFile(
    filePath As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
filePathStringThe path of the configuration file.

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is equals Empty.
ArgumentNullExceptionThe filePath is a null reference (Nothing in Visual Basic).

Remarks

See LoadFromConfigFile.

LoadClientServerConfig ​

static

Loads the configuration of an application which is a client and a server from the configuration file named after the configSectionName specified.

csharp
public static OpcApplicationConfiguration LoadClientServerConfig(
    string configSectionName)
vbnet
Public Shared Function LoadClientServerConfig(
    configSectionName As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
configSectionNameStringThe name of the configuration, which is the path of the file without the extension ".Config.xml".

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe configSectionName is equals Empty.
ArgumentNullExceptionThe configSectionName is a null reference (Nothing in Visual Basic).

Remarks

See LoadFromConfig.

LoadClientServerConfigFile ​

static

Loads the configuration of an application which is a client and a server from the file specified.

csharp
public static OpcApplicationConfiguration LoadClientServerConfigFile(
    string filePath)
vbnet
Public Shared Function LoadClientServerConfigFile(
    filePath As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
filePathStringThe path of the configuration file.

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is equals Empty.
ArgumentNullExceptionThe filePath is a null reference (Nothing in Visual Basic).

Remarks

See LoadFromConfigFile.

LoadDiscoveryServerConfig ​

static

Loads the configuration of a discovery server from the configuration file named after the configSectionName specified.

csharp
public static OpcApplicationConfiguration LoadDiscoveryServerConfig(
    string configSectionName)
vbnet
Public Shared Function LoadDiscoveryServerConfig(
    configSectionName As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
configSectionNameStringThe name of the configuration, which is the path of the file without the extension ".Config.xml".

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe configSectionName is equals Empty.
ArgumentNullExceptionThe configSectionName is a null reference (Nothing in Visual Basic).

Remarks

See LoadFromConfig.

LoadDiscoveryServerConfigFile ​

static

Loads the configuration of a discovery server from the file specified.

csharp
public static OpcApplicationConfiguration LoadDiscoveryServerConfigFile(
    string filePath)
vbnet
Public Shared Function LoadDiscoveryServerConfigFile(
    filePath As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
filePathStringThe path of the configuration file.

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is equals Empty.
ArgumentNullExceptionThe filePath is a null reference (Nothing in Visual Basic).

Remarks

See LoadFromConfigFile.

LoadFromConfig ​

static

Loads an application configuration from the configuration file named after the configSectionName specified.

csharp
public static OpcApplicationConfiguration LoadFromConfig(
    ApplicationType applicationType,
    string configSectionName)
vbnet
Public Shared Function LoadFromConfig(
    applicationType As ApplicationType,
    configSectionName As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
applicationTypeApplicationTypeThe type of the application the configuration is validated for.
configSectionNameStringThe name of the configuration, which is the path of the file without the extension ".Config.xml".

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe configSectionName is equals Empty.
ArgumentNullExceptionThe configSectionName is a null reference (Nothing in Visual Basic).

Remarks

A relative path is resolved against the current directory. An error while loading or validating the file (e.g. a missing file) is written to the trace and results in a null reference. Settings missing in the file are completed using the defaults of the SDK.

LoadFromConfigFile ​

static

Loads an application configuration from the file specified.

csharp
public static OpcApplicationConfiguration LoadFromConfigFile(
    ApplicationType applicationType,
    string filePath)
vbnet
Public Shared Function LoadFromConfigFile(
    applicationType As ApplicationType,
    filePath As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
applicationTypeApplicationTypeThe type of the application the configuration is validated for.
filePathStringThe path of the configuration file.

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is equals Empty.
ArgumentNullExceptionThe filePath is a null reference (Nothing in Visual Basic).

Remarks

An error while loading or validating the file (e.g. a missing file) is written to the trace and results in a null reference. Settings missing in the file are completed using the defaults of the SDK (e.g. the certificate stores); the defaults set by the constructors (e.g. accepting untrusted certificates automatically) are not applied.

LoadServerConfig ​

static

Loads the configuration of a server from the configuration file named after the configSectionName specified.

csharp
public static OpcApplicationConfiguration LoadServerConfig(
    string configSectionName)
vbnet
Public Shared Function LoadServerConfig(
    configSectionName As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
configSectionNameStringThe name of the configuration, which is the path of the file without the extension ".Config.xml".

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe configSectionName is equals Empty.
ArgumentNullExceptionThe configSectionName is a null reference (Nothing in Visual Basic).

Remarks

See LoadFromConfig.

LoadServerConfigFile ​

static

Loads the configuration of a server from the file specified.

csharp
public static OpcApplicationConfiguration LoadServerConfigFile(string filePath)
vbnet
Public Shared Function LoadServerConfigFile(
    filePath As String) As OpcApplicationConfiguration

Parameters

NameTypeDescription
filePathStringThe path of the configuration file.

Returns

OpcApplicationConfiguration

The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.

Exceptions

ExceptionCondition
ArgumentExceptionThe filePath is equals Empty.
ArgumentNullExceptionThe filePath is a null reference (Nothing in Visual Basic).

Remarks

See LoadFromConfigFile.

Validate ​

2 overloads

OverloadDescription
Validate()Ensures that the application configuration is valid.
Validate(OpcContext)since v2.11Ensures that the application configuration is valid.

Exceptions (all overloads)

ExceptionCondition
OpcExceptionThe configuration is invalid.

Validate() ​

Ensures that the application configuration is valid.

csharp
public void Validate()
vbnet
Public Sub Validate()

Validate(OpcContext) ​

since v2.11

Ensures that the application configuration is valid.

csharp
public void Validate(OpcContext context)
vbnet
Public Sub Validate(context As OpcContext)

Parameters

NameTypeDescription
contextOpcContext