What’s New in QuickOPC 5.32
From OPC Labs Knowledge Base
Previous: What’s New in QuickOPC 5.31
Key changes: COM targeting for OPC UA
- OPC UA object model is now exposed to COM, and it is therefore possible to integrate OPC UA client functionality into COM-based tools and languages with. As opposed to the current COM objects for OPC Classic (which are based on the same engine as the .NET objects, but exposed separately), the COM objects for OPC UA are implemented by exposing the objects written in .NET to COM. This means that the very same code runs in the COM and .NET worlds, and the API (interfaces) are either identical, or very closely similar. The Procedural Coding Model for OPC UA, including the User Interface objects, is exposed to COM, almost in full.
- Removed support for Windows XP and Windows Server 2003.
- Better organized the existing types into (newly created) namespace. Type names remained largely without change, but many types have been moved to different namespaces. Consequently, existing code may need namespace changes, or additional “using” or “Import” directives. The most important new namespaces are:
- OpcLabs.EasyOpc.Engine, .OperationModel
- OpcLabs.EasyOpc.AddressSpace, .Engine, .OperationModel
- OpcLabs.EasyOpc.AlarmsAndEvents.AddressSpace, .Engine, .OperationModel,
- OpcLabs.EasyOpc.DataAccess.AddressSpace, .Engine, .OperationModel,
- OpcLabs.EasyOpc.UA.AddressSpace, .Discovery, .Engine, .OperationModel
- It is now possible to specify the input argument types when calling OPC UA methods. This helps when the originating tool or language cannot directly supply the argument in a type that is required for the OPC UA method by the OPC UA server.
- The OPC UA components are now based on OPC Foundation UA .NET Stack 1.02.334.6, and LDS 1.02.334.5 Beta (the LDS also includes the Certificate Generator utility).
- All parameter objects now consistently derive from a Parameters base class. This class has a StandardName property (a string). The standard name identifies certain well-known combination of parameter values. When all the parameters correspond to a well-known combination, the StandardName property contains a symbolic name of such combination; otherwise, it contains an empty string. You can also set the StandardName property yourself, and the parameter values will change to reflect the name.
- A delegate type EasyUAMonitoredItemChangedEventHandler is now used instead of EventHandler<EasyUAMonitoredItemChangedEventArgs>, and a similar change has been done for the LogEntry event.
- The UANodeElementCollection, returned by the OPC UA browsing methods, is now a simple Collection<>, and not a KeyedCollection<>. This allows for returning multiple elements that share the same browse name.
- The UAUserIdentity object has been renamed to UserIdentity. The UAxxxxToken objects has been renamed to xxxxTokenInfo. All these objects have been moved to the OpcLabs.BaseLib.IdentityModel.User namespace.
- In addition to user identity configured in the session parameters object, it is now also possible to specify the user identity directly for a specific connection, i.e. on the UAEndpointDescriptor object. There is a UserIdentity property on the UAEndpointDescriptor as well, and the user token infos contained there are merged together with those coming from the session parameters, for each connection made on that endpoint.
- The ParallelDiscovery property has been moved from UAHostParameters to UADiscoveryParameters. The ‘parallel’ argument has been removed from IEasyUAClient.FindApplications (and the method is instead using the value of ParallelDiscovery property).
- Fixed problem with getting endpoints of some OPC-UA servers using HTTPS. The component now attempts to obtain the endpoints from the URL ending with “/discovery” (as before) as well as from the specified URL.
- In QuickOPC-UA, when the application name is not supplied by the developer, and attempting to use application assembly name yields a name that is too generic (such as ‘mscorlib’ in many hosted scenarios), other sources of information are used, such as the executable’s FileVersionInfo, or a main module name. This affects e.g. the application instance certificate subject name.
- EasyUAClient, by default, now first attempts to obtain the .NET Stack and SDK configuration from the “.config.xml” configuration file residing in application’s starting directory and named after the executable, or specified in the application’s main configuration file. Only if these attempts fail, the internally provided .NET Stack and SDK configuration is used.
- For backward compatibility, it is now possible to use “opc.http:” in place of “http:” scheme in OPC UA endpoint descriptors (for OPC Unified Architecture over SOAP/HTTP).
- In OPC-UA browsing dialogs and controls, the context menu (right-click) on an OPC UA endpoint node now provides a “User Identity” command, allowing the user to specify the identity (or identities) that should be used during the connection attempt to the server.
- In browsing dialogs and controls, the context menu (right-click) on the OPC UA endpoint nodes now provides a “TCP Connect Test” command. This command attempts to open a TCP socket to the selected endpoint (without any OPC UA-specific actions), in order to verify the network connectivity and the presence of the server.
- The “Ping Host Test” command in browsing dialogs and controls, previously available only on host and computer nodes, is now also available on the OPC UA endpoint nodes.
- Visual Studio integration: there is now an editor for UserIdentity that can be invoked from the property grid (the Properties window), e.g. in the UAEndpointDescriptor, or in UA session parameters.
- QuickOPC.NET now uses a different method to load the low-level assembly for a current processor architecture. The earlier method created a low-level assembly file in a temporary directory. The new method uses two new assemblies (OpcLabs.EasyOpcClassicRaw.amd64 and OpcLabs.EasyOpcClassicRaw.x86) that are dynamically loaded, but not directly referenced. The new method allows faster startup, and does not require access (permissions) to the temporary directory. Note that these new assemblies need not to (and should not be) directly referenced from your projects.
- Added a combined “Express install for .NET and COM development” option to the installation dashboard, and made it a default choice.
- The runtime assemblies are no longer installed into the GAC by default. The installation program can install the runtime assemblies into the GAC if you select the custom installation; it will then offer you this option near the end of the installation (doing so is not recommended unless you have a compelling reason for it). Design-time assemblies (for Visual Studio) are still installed into the GAC.
- When installing version 5.32 or later, it is strongly recommended that you first uninstall any version numbered between 5.00 and 5.31, instead of simply applying the installation over the previous version. The reason for this that the earlier versions installed the runtime assemblies into the Global Assembly Cache (GAC), whereas versions 5.32 and later do not do this by default. Having older assemblies in the GAC while developing with newer assemblies outside of the GAC is possible in principle, but without extra precautions, it can lead to all kinds of mix-ups and confusion.
- The OPC UA SDK 1.01 Redistributables Setup are no longer installed as such. For our purpose, their parts are installed in a different way, and also partly covered by the OPC UA Local Discovery Server installation.
- OPC UA Local Discovery Server 1.01 has been replaced by OPC UA Local Discovery Server 1.02.
- Shortened the list of optional components in custom install.
- The “OPC UA SDK 1.01 COM Interop Components Redistributables” are no longer installed by the setup program (not even in “Full” installation). They are, however, still included with the product, now placed under the Redist directory, and can be run from there when needed, or included in user’s installations. This change has been made due to the rare need for these components, and also because possible issues with their setup.
- The OPC Foundation White Papers have been moved from Documentation group to Bonus Material.
- In accordance with changes described under Packaging, for QuickOPC.NET, new/different assemblies need to be deployed on the target computer.
- In order to use the COM targeting for OPC UA, the relevant product assemblies need to be registered for COM interoperability using the REGASM tool.
- Installing runtime assemblies into the Global Assembly Cache (GAC) is no longer recommended.
Documentation and Help
- Modified and added documentation and help contents for COM targeting for OPC UA.
- Added examples for COM targeting for OPC UA, in C++, VB6, PHP, Delphi, VBA, Python, Perl, RealBasic (Xojo), Visual FoxPro, and more.
- OPC UA SDK 1.01 Test Applications have been replaced by (newer) OPC UA Sample Applications 1.02. This includes the sample OPC UA server that our examples use to connect to.
- Bonus material: The EasyOpcUAConsole application now shows windowed user interface where practical.