QuickOPC User's Guide and Reference
Services
Features > Services
In This Topic

QuickOPC services are functionality sets that are complementary to the main task of the component. They provide features that are not directly derived from the underlying communication methods of the component, but rather have to do with its integration to the environment, instrumentation (such as configuration), licensing etc.

The term service is quite overloaded. It can mean different things in different context. For example, there are OPC UA services, which are basically method calls on the OPC UA protocol level. And there are Windows services, processes that run in background on the Windows operating system. There are other uses for the term service as well. Try not to confuse the different concepts. This article is about QuickOPC services, which are neither OPC UA services nor Windows services nor anything else. In this document, we strive to consistently qualify the term service with additional words, wherever needed to avoid ambiguity.

Obtaining Service Interfaces

You can obtain services from a service provider object, which is any type that derives, directly or indirectly, from the IServiceProvider interface. The major QuickOPC components, such as EasyDAClientEasyAEClient or EasyUAClient, and some other components, are all service providers as well.

The QuickOPC services are identified by service type, which a .NET Type object, usually an interface. In order to obtain a service from a service provider, call its GetService method, passing it the type of service of you want to obtain. In most cases, the returned object is of the type you have specified (unless documented otherwise). You would therefore normally cast the received Object to the expected service type. In order to make the coding easier (in .NET), you can use the GetService<T> extension method, which saves you from using the typeof operator (in C#, or its equivalent in other languages) and from casting the result.

When developing on the COM platform, you would have troubles obtaining the .NET Type object to pass into the GetService method. In order to overcome these difficulties, we have provided a GetServiceByName method on each COM interface that represents a service provider. The argument to this method is a string instead. The string represent a fully qualified name of the service type you want to obtain. Use the name of the .NET interface, not the name of the COM interface. For example, in order to obtain the _EasyUAClientApplication service from the _EasyUAClient, call its GetServiceByName method, passing it a string "OpcLabs.EasyOpc.UA.Application.IEasyUAClientServerApplication, OpcLabs.EasyOpcUA".

The GetService (or GetServiceByName) method returns a null reference when the specified interface type is not available. The set of services may depend on the various factors, such as the client object used, its configuration, software version etc. Unless you are sure that the service is available, your code should be able to handle the null result well, e.g. by gracefully degrading its functionality.

Service Catalog

Different objects provide different types of services. The following paragraphs provide an overview of the types of services available from each major QuickOPC component.

EasyDAClient Services 

The EasyDAClient object can provide following services:

Service Type (.NET) Service Type (COM) Title/Purpose Description
IDisposable IDisposable Disposable Object Provides a mechanism for releasing unmanaged resources. Useful when you deal with a client interface already downcast to IServiceProvider.
IEasyDAClient _EasyDAClient OPC-DA Client The client itself. Useful when you deal with a client interface already downcast to IServiceProvider.
IEasyDAClientSettings

OPC-DA Client Settings Provides access to settings for IEasyDAClient objects.
ILicenseInfoProvider

License Info Provider Provides information about the licensed object. Example: Examples - Licensing - Obtain serial number.

EasyAEClient Services

The EasyAEClient object can provide following services:

Service Type (.NET) Service Type (COM) Title/Purpose Description
IDisposable IDisposable Disposable Object Provides a mechanism for releasing unmanaged resources. Useful when you deal with a client interface already downcast to IServiceProvider.
IEasyAEClient _EasyAEClient OPC A&E Client The client itself. Useful when you deal with a client interface already downcast to IServiceProvider.
IEasyAEClientSettings

OPC A&E Client Settings Provides access to settings for IEasyAEClient objects.
ILicenseInfoProvider

License Info Provider Provides information about the licensed object. Example: Examples - Licensing - Obtain serial number.

EasyUAClient Services

The EasyUAClient object can provide following services:

Service Type (.NET) Service Type (COM) Title/Purpose Description
IDisposable IDisposable Disposable Object Provides a mechanism for releasing unmanaged resources. Useful when you deal with a client interface already downcast to IServiceProvider.
IEasyUAClient _EasyUAClient OPC UA Client The client itself. Useful when you deal with a client interface already downcast to IServiceProvider.
IEasyUAClientServerApplication _EasyUAClientApplication OPC UA Client-Server Application Allows management of the OPC UA Client-Server Application Service.
IEasyUAClientComplexData _EasyUAClientComplexData OPC UA Complex Data Gives advanced access to OPC UA Complex Data Extension. Only available if the corresponding plug-in is enabled. For more information, see also Navigation in the OPC UA data model and Adding or removing data type dictionaries to or from the OPC UA data type system in  Advanced OPC UA Complex Data Tasks.
IEasyUAClientConnectionControl _EasyUAClientConnectionControl OPC UA Client Connection Control Provides methods to control the OPC UA client connections to the server.
IEasyUAClientConnectionMonitoring _EasyUAClientConnectionMonitoring OPC UA Client Connection Monitoring Provides methods and events to monitor the OPC UA client connections to the server.
IEasyUAClientNodeRegistration _EasyUAClientNodeRegistration OPC UA Client Node registration Provides methods to register repeatedly accessed nodes.
IEasyUAClientSettings

OPC UA Client Settings Provides access to settings for IEasyUAClient objects.
ILicenseInfoProvider

License Info Provider Provides information about the licensed object. Example: Examples - Licensing - Obtain serial number.

EasyUAAlarmsAndConditionsClient Services

The EasyUAAlarmsAndConditionsClient object can provide following services:

Service Type (.NET) Service Type (COM) Title/Purpose Description
IDisposable IDisposable Disposable Object Provides a mechanism for releasing unmanaged resources. Useful when you deal with a client interface already downcast to IServiceProvider.
IEasyUAAlarmsAndConditionsClient _EasyUAAlarmsAndConditionsClient OPC UA Alarms and Conditions Client The specialized client itself. Useful when you deal with a client interface already downcast to IServiceProvider.
ILicenseInfoProvider

License Info Provider Provides information about the licensed object. Example: Examples - Licensing - Obtain serial number.

EasyUACertificateManagementClient Services

The EasyUACertificateManagementClient object can provide following services:

Service Type (.NET) Service Type (COM) Title/Purpose Description
IDisposable IDisposable Disposable Object Provides a mechanism for releasing unmanaged resources. Useful when you deal with a client interface already downcast to IServiceProvider.
IEasyUACertificateManagementClient _EasyUACertificateManagementClient OPC UA Certificate Management Client The specialized client itself. Useful when you deal with a client interface already downcast to IServiceProvider.
ILicenseInfoProvider

License Info Provider Provides information about the licensed object. Example: Examples - Licensing - Obtain serial number.

EasyUAGlobalDiscoveryClient Services

The EasyUAGlobalDiscoveryClient object can provide following services:

Service Type (.NET) Service Type (COM) Title/Purpose Description
IDisposable IDisposable Disposable Object Provides a mechanism for releasing unmanaged resources. Useful when you deal with a client interface already downcast to IServiceProvider.
IEasyUAGlobalDiscoveryClient _EasyUAGlobalDiscoveryClient OPC UA Global Discovery Client The specialized client itself. Useful when you deal with a client interface already downcast to IServiceProvider.
ILicenseInfoProvider

License Info Provider Provides information about the licensed object. Example: Examples - Licensing - Obtain serial number.

 

 

The features discussed here, or some of them, may not be available in all editions of the product. Check the Product Editions page for differences between the editions. The trial license has all features enabled (and is limited in period for which it provides valid data), but licenses for specific commercial editions may have functionality limitations.

See Also

Examples - Licensing

Examples - OPC UA Services