Skip to content

Reference

IOpcApplicationInstance Members

Defines a concrete application of one of the possible OPC UA application types available.

Reference

IOpcApplicationInstance Members ​

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

Properties ​

ApplicationName ​

Gets or sets the name of the application instance.

csharp
string ApplicationName { get; set; }
vbnet
Property ApplicationName As String

Property value

String

The name of the application. The default value is "OPC Application" in case there is no entry assembly available; otherwise the value of the AssemblyTitleAttribute of the entry assembly.

Remarks

The name does not have to be unique. The value of this property is also used as the SubjectName of the application certificate whenever an application certificate is to be created/looked-up (from the application certificates store).

ApplicationState ​

since v2.50

Gets the current state of the application instance.

csharp
OpcApplicationState ApplicationState { get; }
vbnet
ReadOnly Property ApplicationState As OpcApplicationState

Property value

OpcApplicationState

One of the members defined by the OpcApplicationState enumeration.

ApplicationType ​

Gets the type of application the instance represents.

csharp
OpcApplicationType ApplicationType { get; }
vbnet
ReadOnly Property ApplicationType As OpcApplicationType

Property value

OpcApplicationType

One of the members defined by the OpcApplicationType enumeration. Each member identifies a specific type of OPC UA application and its usage within the OPC UA environment.

ApplicationUri ​

Gets or sets the URI of the application instance.

csharp
Uri ApplicationUri { get; set; }
vbnet
Property ApplicationUri As Uri

Property value

Uri

The Uri or a null reference (Nothing in Visual Basic) which uniquely identifies the application instance.

Remarks

In case there the value of this property is a null reference (Nothing in Visual Basic) the URI of the application is determined by the subject alternate name of the application certificate used. In case there an application certificate is to be created, this value is used to define the certificates subject alternate name.

Certificate ​

Gets or sets the application certificate representing the applications identity.

csharp
X509Certificate2 Certificate { get; set; }
vbnet
Property Certificate As X509Certificate2

Property value

X509Certificate2

An instance of the X509Certificate2 class used to identify the application instance.

CertificateStores ​

Gets the OpcCertificateStores instance used to maintain the different certificate stores used by the application instance.

csharp
OpcCertificateStores CertificateStores { get; }
vbnet
ReadOnly Property CertificateStores As OpcCertificateStores

Property value

OpcCertificateStores

An instance of the OpcCertificateStores class used by the instance to setup and maintain the certificate stores and their certificates used by the application instance.

Configuration ​

Gets or sets an instance of the OpcApplicationConfiguration class which is used as a low-level representation of the code/file based application instance configuration.

csharp
OpcApplicationConfiguration Configuration { get; set; }
vbnet
Property Configuration As OpcApplicationConfiguration

Property value

OpcApplicationConfiguration

An instance of the OpcApplicationConfiguration class configured with the instance specific setup to use. An assignment of a null reference (Nothing in Visual Basic) will lead to the creation of a new instance of the OpcApplicationConfiguration class with all defaults typically used by the type of application instance.

Namespaces ​

since v2.12

Gets a read-only collection of namespaces used by the application instance.

csharp
OpcReadOnlyNamespaceCollection Namespaces { get; }
vbnet
ReadOnly Property Namespaces As OpcReadOnlyNamespaceCollection

Property value

OpcReadOnlyNamespaceCollection

An instance of the OpcReadOnlyNamespaceCollection class with OpcNamespace items for each 'NamespaceUri' known/used.

ProductUri ​

since v2.10

Gets or sets the URI of the product.

csharp
Uri ProductUri { get; set; }
vbnet
Property ProductUri As Uri

Property value

Uri

The Uri or a null reference (Nothing in Visual Basic) which uniquely identifies the product.

Remarks

In case there the value of this property is a null reference (Nothing in Visual Basic) the URI of the product is determined by the AssemblyCompanyAttribute and AssemblyProductAttribute used.

Security ​

since v2.6

Gets the OpcSecurity instance used to maintain the different security options used by the application instance.

csharp
OpcSecurity Security { get; }
vbnet
ReadOnly Property Security As OpcSecurity

Property value

OpcSecurity

An instance of the OpcSecurity class used by the IOpcApplicationInstance to setup and maintain the different security options.

SystemContext ​

since v2.11

Gets the OpcContext which is used to store the context sensitive data and configuration used by the current application instance.

csharp
OpcContext SystemContext { get; }
vbnet
ReadOnly Property SystemContext As OpcContext

Property value

OpcContext

An instance of the OpcContext class which might be at least Empty.

Transport ​

since v2.6

Gets the OpcTransport instance used to maintain the different transport options used by the application instance.

csharp
OpcTransport Transport { get; }
vbnet
ReadOnly Property Transport As OpcTransport

Property value

OpcTransport

An instance of the OpcTransport class used by the IOpcApplicationInstance to setup and maintain the different transport options.

Methods ​

QueryCertificate ​

Requests the certificate to use for this application instance in case there the certificate could not automatically determined using the information of this application instance or there are any issues with the Certificate.

csharp
X509Certificate2 QueryCertificate(OpcCertificateValidationResult reason)
vbnet
Function QueryCertificate(
    reason As OpcCertificateValidationResult) As X509Certificate2

Parameters

NameTypeDescription
reasonOpcCertificateValidationResultOne of the members defined by the OpcCertificateValidationResult enumeration indicating the reason upon that the certificate could not automatically determined or indicating which issue with the Certificate exists.

Returns

X509Certificate2

An instance of the X509Certificate2 class indicating the application instance certificate to use or a null reference (Nothing in Visual Basic) in case there the framework shall create a new certificate by its own using the application information of this instance.

Events ​

CertificateRequested ​

Occurs when the certificate of this application instance could not automatically determined using the information of this IOpcApplicationInstance. This event is when used to query the certificate to use for the application instance. Additionally use this event to determine the case that an appropriate instance certificate is missing and in case there AutoCreateCertificate of CertificateStores is equals true a new certificate is being created automatically after the event has been processed (and this may take some time).

csharp
event OpcCertificateRequestedEventHandler CertificateRequested
vbnet
Event CertificateRequested As OpcCertificateRequestedEventHandler

Event type

OpcCertificateRequestedEventHandler

Remarks

The event occurs when a server starts or a client connects, with one of the following Reason values:

A certificate which is not trusted yet does not raise the event; it is added to the TrustedPeerStore.

CertificateValidationFailed ​

since v2.6

Occurs when the validation of a opponent application instance certificate does not fulfill the requirements for valid and trusted certificates.

csharp
event OpcCertificateValidationFailedEventHandler CertificateValidationFailed
vbnet
Event CertificateValidationFailed As OpcCertificateValidationFailedEventHandler

Event type

OpcCertificateValidationFailedEventHandler

Remarks

This event can be used to complement the default validation of opponent application instance certificates. Using the event arguments it is possible to accept the certificate using different/custom circumstances.