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
| Overload | Description |
|---|---|
| Opc | Initializes a new instance of the Opc |
| Opc | Initializes a new instance of the Opc |
OpcApplicationConfiguration()
Initializes a new instance of the OpcApplicationConfiguration class using the defaults of the SDK.
public OpcApplicationConfiguration()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)
Initializes a new instance of the OpcApplicationConfiguration class for an application of the type specified using the defaults of the SDK.
public OpcApplicationConfiguration(OpcApplicationType applicationType)Public Sub New(applicationType As OpcApplicationType)Parameters
| Name | Type | Description |
|---|---|---|
applicationType | Opc | The 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
Loads the configuration of a client from the configuration file named after the configSectionName specified.
public static OpcApplicationConfiguration LoadClientConfig(
string configSectionName)Public Shared Function LoadClientConfig(
configSectionName As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
config | String | The name of the configuration, which is the path of the file without the extension ". |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The config is equals Empty. |
| Argument | The config is a null reference ( |
Remarks
See LoadFromConfig.
LoadClientConfigFile
Loads the configuration of a client from the file specified.
public static OpcApplicationConfiguration LoadClientConfigFile(string filePath)Public Shared Function LoadClientConfigFile(
filePath As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
filePath | String | The path of the configuration file. |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The filePath is equals Empty. |
| Argument | The filePath is a null reference ( |
Remarks
See LoadFromConfigFile.
LoadClientServerConfig
Loads the configuration of an application which is a client and a server from the configuration file named after the configSectionName specified.
public static OpcApplicationConfiguration LoadClientServerConfig(
string configSectionName)Public Shared Function LoadClientServerConfig(
configSectionName As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
config | String | The name of the configuration, which is the path of the file without the extension ". |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The config is equals Empty. |
| Argument | The config is a null reference ( |
Remarks
See LoadFromConfig.
LoadClientServerConfigFile
Loads the configuration of an application which is a client and a server from the file specified.
public static OpcApplicationConfiguration LoadClientServerConfigFile(
string filePath)Public Shared Function LoadClientServerConfigFile(
filePath As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
filePath | String | The path of the configuration file. |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The filePath is equals Empty. |
| Argument | The filePath is a null reference ( |
Remarks
See LoadFromConfigFile.
LoadDiscoveryServerConfig
Loads the configuration of a discovery server from the configuration file named after the configSectionName specified.
public static OpcApplicationConfiguration LoadDiscoveryServerConfig(
string configSectionName)Public Shared Function LoadDiscoveryServerConfig(
configSectionName As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
config | String | The name of the configuration, which is the path of the file without the extension ". |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The config is equals Empty. |
| Argument | The config is a null reference ( |
Remarks
See LoadFromConfig.
LoadDiscoveryServerConfigFile
Loads the configuration of a discovery server from the file specified.
public static OpcApplicationConfiguration LoadDiscoveryServerConfigFile(
string filePath)Public Shared Function LoadDiscoveryServerConfigFile(
filePath As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
filePath | String | The path of the configuration file. |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The filePath is equals Empty. |
| Argument | The filePath is a null reference ( |
Remarks
See LoadFromConfigFile.
LoadFromConfig
Loads an application configuration from the configuration file named after the configSectionName specified.
public static OpcApplicationConfiguration LoadFromConfig(
ApplicationType applicationType,
string configSectionName)Public Shared Function LoadFromConfig(
applicationType As ApplicationType,
configSectionName As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
applicationType | ApplicationType | The type of the application the configuration is validated for. |
config | String | The name of the configuration, which is the path of the file without the extension ". |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The config is equals Empty. |
| Argument | The config is a null reference ( |
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
Loads an application configuration from the file specified.
public static OpcApplicationConfiguration LoadFromConfigFile(
ApplicationType applicationType,
string filePath)Public Shared Function LoadFromConfigFile(
applicationType As ApplicationType,
filePath As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
applicationType | ApplicationType | The type of the application the configuration is validated for. |
filePath | String | The path of the configuration file. |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The filePath is equals Empty. |
| Argument | The filePath is a null reference ( |
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
Loads the configuration of a server from the configuration file named after the configSectionName specified.
public static OpcApplicationConfiguration LoadServerConfig(
string configSectionName)Public Shared Function LoadServerConfig(
configSectionName As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
config | String | The name of the configuration, which is the path of the file without the extension ". |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The config is equals Empty. |
| Argument | The config is a null reference ( |
Remarks
See LoadFromConfig.
LoadServerConfigFile
Loads the configuration of a server from the file specified.
public static OpcApplicationConfiguration LoadServerConfigFile(string filePath)Public Shared Function LoadServerConfigFile(
filePath As String) As OpcApplicationConfigurationParameters
| Name | Type | Description |
|---|---|---|
filePath | String | The path of the configuration file. |
Returns
The configuration loaded, or a null reference (Nothing in Visual Basic) if the file could not be loaded.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The filePath is equals Empty. |
| Argument | The filePath is a null reference ( |
Remarks
See LoadFromConfigFile.
Validate
| Overload | Description |
|---|---|
| Validate() | Ensures that the application configuration is valid. |
| Validate( | Ensures that the application configuration is valid. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| OpcException | The configuration is invalid. |
Validate()
Ensures that the application configuration is valid.
public void Validate()Public Sub Validate()Validate(OpcContext)
Ensures that the application configuration is valid.
public void Validate(OpcContext context)Public Sub Validate(context As OpcContext)Parameters
| Name | Type | Description |
|---|---|---|
context | OpcContext |

