QuickOPC User's Guide and Reference
EasyUAClientConfiguration Class
Members 



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA Namespace : EasyUAClientConfiguration Class
Allows static configuration of the EasyUAClient object.
Object Model
EasyUAClientConfiguration ClassEasyUAAdaptableParameters ClassEasyUAClient ClassEasyUASharedParameters Class
Syntax
'Declaration
 
<CLSCompliantAttribute(True)>
<ComDefaultInterfaceAttribute(OpcLabs.EasyOpc.UA.ComTypes._EasyUAClientConfiguration)>
<ComSourceInterfacesAttribute(OpcLabs.EasyOpc.UA.ComTypes.DEasyUAClientConfigurationEvents)>
<ComVisibleAttribute(True)>
<GuidAttribute("4F0F5C25-2E2B-406F-9526-75F35F90C87F")>
<TypeConverterAttribute(System.ComponentModel.ExpandableObjectConverter)>
<DesignerCategoryAttribute("Component")>
<SerializableAttribute()>
Public NotInheritable Class EasyUAClientConfiguration 
   Inherits OpcLabs.BaseLib.Widgets.Widget
   Implements OpcLabs.BaseLib.Instrumentation.ILoggingHandler, OpcLabs.BaseLib.Licensing.ILicensingContextHolder, OpcLabs.BaseLib.Widgets.ComTypes._Widget, OpcLabs.BaseLib.Widgets.IWidget, OpcLabs.EasyOpc.UA.ComTypes._EasyUAClientConfiguration, System.ComponentModel.IComponent, System.ICloneable, System.IDisposable, System.IServiceProvider, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable 
'Usage
 
Dim instance As EasyUAClientConfiguration
[CLSCompliant(true)]
[ComDefaultInterface(OpcLabs.EasyOpc.UA.ComTypes._EasyUAClientConfiguration)]
[ComSourceInterfaces(OpcLabs.EasyOpc.UA.ComTypes.DEasyUAClientConfigurationEvents)]
[ComVisible(true)]
[Guid("4F0F5C25-2E2B-406F-9526-75F35F90C87F")]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[DesignerCategory("Component")]
[Serializable()]
public sealed class EasyUAClientConfiguration : OpcLabs.BaseLib.Widgets.Widget, OpcLabs.BaseLib.Instrumentation.ILoggingHandler, OpcLabs.BaseLib.Licensing.ILicensingContextHolder, OpcLabs.BaseLib.Widgets.ComTypes._Widget, OpcLabs.BaseLib.Widgets.IWidget, OpcLabs.EasyOpc.UA.ComTypes._EasyUAClientConfiguration, System.ComponentModel.IComponent, System.ICloneable, System.IDisposable, System.IServiceProvider, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable  
[CLSCompliant(true)]
[ComDefaultInterface(OpcLabs.EasyOpc.UA.ComTypes._EasyUAClientConfiguration)]
[ComSourceInterfaces(OpcLabs.EasyOpc.UA.ComTypes.DEasyUAClientConfigurationEvents)]
[ComVisible(true)]
[Guid("4F0F5C25-2E2B-406F-9526-75F35F90C87F")]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[DesignerCategory("Component")]
[Serializable()]
public ref class EasyUAClientConfiguration sealed : public OpcLabs.BaseLib.Widgets.Widget, OpcLabs.BaseLib.Instrumentation.ILoggingHandler, OpcLabs.BaseLib.Licensing.ILicensingContextHolder, OpcLabs.BaseLib.Widgets.ComTypes._Widget, OpcLabs.BaseLib.Widgets.IWidget, OpcLabs.EasyOpc.UA.ComTypes._EasyUAClientConfiguration, System.ComponentModel.IComponent, System.ICloneable, System.IDisposable, System.IServiceProvider, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable  
Remarks

 

While the most information needed to perform OPC tasks is contained in arguments to method calls, there are some component-wide parameters that are not worth repeating in every method call, and also some that have wider effect that influences more than just a single method call. You can obtain and modify these parameters through properties on the EasyDAClient or EasyUAClient object.

For the EasyDAClient object, following are its instance properties, i.e. if you have created multiple EasyDAClient objects, each will have its own copy of them:

and

// This example shows how the OPC server can quickly be disconnected after writing a value into one of its OPC items.

using System;
using OpcLabs.EasyOpc.DataAccess;
using OpcLabs.EasyOpc.OperationModel;

namespace DocExamples.DataAccess._EasyDAClientHoldPeriods
{
    class TopicWrite
    {
        public static void Main1()
        {
            var client = new EasyDAClient();

            client.InstanceParameters.HoldPeriods.TopicWrite = 100; // in milliseconds

            try
            {
                client.WriteItemValue("", "OPCLabs.KitServer.2", "Simulation.Register_I4", 12345);
            }
            catch (OpcException opcException)
            {
                Console.WriteLine("*** Failure: {0}", opcException.GetBaseException().Message);
            }
        }
    }
}
' This example shows how the OPC server can quickly be disconnected after writing a value into one of its OPC items.

Imports OpcLabs.EasyOpc.DataAccess
Imports OpcLabs.EasyOpc.OperationModel

Namespace DocExamples.DataAccess._EasyDAClientHoldPeriods
    Friend Class TopicWrite
        Public Shared Sub Main1()
            Dim client = New EasyDAClient()

            client.InstanceParameters.HoldPeriods.TopicWrite = 100 ' in milliseconds

            Try
                client.WriteItemValue("", "OPCLabs.KitServer.2", "Simulation.Register_I4", 12345)
            Catch opcException As OpcException
                Console.WriteLine("*** Failure: {0}", opcException.GetBaseException().Message)
            End Try
        End Sub
    End Class
End Namespace

 

For the EasyUAClient object, following are its instance properties, i.e. if you have created multiple EasyUAClient objects, each will have its own copy of them:

Instance properties can be modified from your code.

In QuickOPC.NET and QuickOPC-UA, if you have placed the EasyDAClient, EasyAEClient or EasyUAClient object on the designer surface, most instance properties can also be directly edited in the Properties window in Visual Studio.

In QuickOPC-COM, your code can override the defaults if needed, by setting the properties accordingly.

 

Following properties are static, i.e. shared among all instances of EasyDAClient object:

Following properties are static, i.e. shared among all instances of EasyUAClient object:

Following properties are static unless the EasyUAClient is configured as isolated:

Please use the Reference documentation for details on meaning of various properties and their use.

Static properties can be modified from your code. If you want to modify any of the static properties, you must do it before the first instance of EasyDAClientEasyAEClient or EasyUAObject object is created.

You can also use the following components to set the static properties:

Configuration Component Sets Static Properties of
EasyAEClientConfiguration component - EasyAEClient class
EasyDAClientConfiguration component - EasyDAClient class
EasyUAClientConfiguration component - EasyUAClient class

In Visual Studio, drag the corresponding component from the Toolbox to the designer surface, select it, and you can then view and modify the settings in the Properties window.

Note that the EasyXXClientConfiguration (where XX is either AE/DA/UA) components are just a “peek” to properties of the EasyXXClient that are static in nature. For this reason, you should normally have just one instance of the EasyXXClientConfiguration component in your application, and you should place it in such a way that it gets instantiated before the first operations on the EasyXXClient object take place. You can achieve this easily e.g. by placing the EasyXXClientConfiguration component onto the main (first) form of your application.

The EasyUAClientConfiguration component also has a LogEntry event, which functions as a “projection” of the static EasyUAClient.LogEntry event. You can easily hook an event handler to this event to process log entries generated by the EasyUAClient component.

When Multiple Implementations are available (such as for OPC Data Access, with native and NET API client), not all parameters apply to (are used with) all implementations. In such case, the reference documentation for the affected parameter (property) specifies the circumstances under which the parameter is used.

As the Alarms & Conditions support for OPC UA uses the same EasyUAClient object, the same properties and objects are used for setting the parameters as for OPC Data. Please refer to the “Setting Parameters” chapter under “Imperative Programming Model for OPC Data (Class and UA)” for all necessary information.

 

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         OpcLabs.BaseLib.Widgets.Widget
            OpcLabs.EasyOpc.UA.EasyUAClientConfiguration

Requirements

Target Platforms: .NET Framework: Windows 10, Windows Server 2012; .NET Core: Linux, macOS, Microsoft Windows

See Also

Reference

EasyUAClientConfiguration Members
OpcLabs.EasyOpc.UA Namespace