What's new in QuickOPC 2022.2: Difference between revisions

From OPC Labs Knowledge Base
Line 74: Line 74:
* It is now possible to subscribe to an MQTT broker, while storing a copy of the received message into a file system at the same time, e.g. for troubleshooting. For more information, see [[File-based MQTT emulation#Implicit_Usage_in_MQTT_Transport|File-based MQTT emulation - Implicit Usage in MQTT Transport]] and [[File-based MQTT emulation#Examples|File-based MQTT emulation - Examples]].
* It is now possible to subscribe to an MQTT broker, while storing a copy of the received message into a file system at the same time, e.g. for troubleshooting. For more information, see [[File-based MQTT emulation#Implicit_Usage_in_MQTT_Transport|File-based MQTT emulation - Implicit Usage in MQTT Transport]] and [[File-based MQTT emulation#Examples|File-based MQTT emulation - Examples]].
* When specifying custom properties on PubSub objects, it is possible to shorten the commonly used namespace http://opclabs.com/OpcUA/PubSub to {OpcLabs}, using a pre-defined replacement variable.
* When specifying custom properties on PubSub objects, it is possible to shorten the commonly used namespace http://opclabs.com/OpcUA/PubSub to {OpcLabs}, using a pre-defined replacement variable.
* Using the 'keyPartsDirectory' named value in the 'static' security key source URI, it is now possible to specify the directory where files defining the static key (signingKey.key, encryptKey.key, keyNonce.key) reside (key storage format used by Systerel).
* Using the 'keyPartsDirectory' named value in the 'static' security key source URI, it is now possible to specify the directory where files defining the static key (signingKey.key, encryptKey.key, keyNonce.key) reside (key storage format used by Systerel S2OPC).
<!--
<!--
== COM Components ==
== COM Components ==

Revision as of 15:07, 1 September 2022

See also: Versions; Previous version: What's new in QuickOPC 2022.1

Internal version number: 5.70

Key changes:

  • Changes in packaging


Targeting

  • Minimum supported .NET Framework version is now 4.7.2 (was 4.7).
  • .NET 5.0 is no longer supported (.NET Core 3.1 and .NET 6 remain).
  • The primary development tool is now Visual Studio 2022. Designer integration (such as toolbox controls, and Live Binding design mode) is only available for Visual Studio 2022.

Technology

  • In both the .NET Framework and .NET Standard targetings, the OPC UA code is now based on OPC Foundation .NET Stack and SDK version 1.4.368.53. The "legacy" OPC Foundation .NET stack is no longer used (previously, the .NET Framework targeting has used the "legacy" stack, while the .NET Standard targeting has used the new stack).
  • Consequently, .NET Framework targeting gains more modern and secure codebase. There are, however, several less-frequently used features that are no longer available:
    • "User Token - Issued Token Windows Server Facet" Security Policy is not supported (basically, Windows authentication for users).
    • Plain HTTP protocol for OPC UA is no longer supported (HTTPS is supported, though).
  • The OPC UA Certificate Generator, a standalone executable that has been invoked in .NET Framework behind the scenes (and automatically "boxed" with the library so that the users do not have to install it separately), is no longer used.
  • Security policies Aes128-Sha256-RsaOaep and Aes256-Sha256-RsaPss are now also available when targeting .NET Framework, and for COM and Excel development.

Licensing

  • Since the new OPC Foundation UA stack is now always used (also in .NET Framework and for COM development), be prepared for the fact that there is a higher number of dependent packages, and you need to review and accept their licenses.
  • When validity check fails (LicenseException), the component now writes a warning entry into the Windows event log, with details about the failure. This helps troubleshoot licensing problems in case the application itself does not provide good enough means to observe the error message.

Packaging

  • In .NET, you can no longer reference individual QuickOPC assemblies, which has been a possibility when targeting .NET Framework. Same as when targeting .NET Standard, QuickOPC is now only referenced in form of NuGet packages. As an exception, individual assemblies can be referenced from PowerShell or C++/CLI. If you are upgrading from earlier QuickOPC versions, remove the individual assembly references, and add NuGet package references instead (see User's Guide).
  • The installation program now also installs (and uninstalls) a QuickOPC Visual Studio extension. The extension implements the functionality of Visual Studio Toolbox items for QuickOPC components and controls. The extension is not necessary if you write the code manually, nor is it needed to build or run the code. It is only used for design-time features of QuickOPC, such as Live Binding, or the ability to instantiate components and place controls onto designer surface by dragging them from the Toolbox. The version and build of the Visual Studio extension must match precisely the version and build of QuickOPC components used; the installation program normally takes care of this. The Visual Studio extension only supports Visual Studio 2022, version 17.2 or later (32- or 64-bit).
  • There is one new assembly: OpcLabs.EasyOpcClassicCore.dll, containing parts of what has originally been in OpcLabs.EasyOpcClassic.dll. Because your projects will now reference the NuGet package(s) and not the individual assemblies (see above), in most cases you do not need to be concerned about this change in particular, because referencing the NuGet package will automatically take care of referencing the necessary assemblies, including this one.
  • For COM developers, there is one new type library, OpcLabs.EasyOpcClassicCore.tlb, which needs to be used in addition to OpcLabs.EasyOpcClassic.tlb.
  • Assembly binding redirection for COM components, in Excel Option, and for PowerShell development, is achieved through Assemblies.config files.
  • The OpcLabs.UAPubSubJson package is no longer necessary and no longer exists. The JSON message mapping for OPC UA PubSub is now always included automatically.
  • ZIP packages are no longer available (only NuGet packages are supported now).

Delivery

  • The NuGet packages, besides being available on https://www.nuget.org as before, are now also installed by the Setup program, and can be used to set up a local NuGet feed.

Installation and Uninstallation

  • The option to install the assemblies into GAC (Global Assembly Cache) is no longer available.

Component Improvements

OPC Classic

  • The EasyDAClient and EasyAEClient now support a limited form of cache persistency. The information cached for browse path and item Id resolution, which is normally kept in memory and is thus lost when the program is restarted, can now be persisted to disk and retrieved again, improving performance. This functionality is turned off by default, but can be enabled using the InstanceParameters.EnableCachePersistence property. The information is persisted per-user, and the storage place can further be distinguished by setting the InstanceParameters.PersistenceKey property.

OPC UA Client-Server

  • The component now keeps data related to a session in memory for some time after the session has been closed ("dormant session"). This allows faster reconnection later. The period for which the session data is kept in memory after the session is closed is configurable by the UASmartSessionParameters.DormancyPeriod property. The maximum count of sessions that can be kept in the dormant state is configurable in the UASmartEngineParameters.MaximumDormantSessions property.
  • The preselected endpoint data are kept for some period in memory and reused, resulting in faster reconnections, because the OPC UA GetEndpoint service call is not repeated. The period defaults to 1 minute and is configurable in the UAClientSessionParameters.PreselectedEndpointValidityPeriod property.
  • Made the connection process quicker by delaying the creation of status subscription (used for monitoring the server status).
  • Optimized the number of Read service calls needed upon a connection to an OPC UA server.
  • Added ConfiguredTokenInfoCount to the UserIdentity class (returns the number of configured token infos in the given user identity).

OPC UA PubSub

  • With MQTT transport protocol mapping, it is no longer necessary to specify whether UADP or JSON will be used as message mapping. QuickOPC will automatically recognize the message mapping, and is able to receive both UADP and JSON messages on the same connection. For more information, see OPC UA PubSub Automatic Message Mapping Recognition and OPC UA PubSub Transport Profiles.
  • The MQTT transport now automatically recognizes GZipped messages (in both JSON and UADP message mappings), and uncompresses them. This feature is not in the currently released OPC UA specifications, but some publishers are using it nevertheless.
  • The JSON message mapping now also accepts transport messages that are (incorrectly) formatted as an array of network messages, in order to better cope with non-standard publishers like Azure Industrial IoT Platform.
  • Added a boolean Retain property to the UADataSetHeader class. Determines whether the dataset message is retained by the server (MQTT).
  • Retained messages (MQTT) are now automatically "replayed" on all new subscriptions (and not just the first one), even if the MQTT subscription to a particular topic is shared among multiple readers.
  • The key/delta frame assembly algorithm has been improved. If dataset metadata is available, the algorithm can now release a dataset message even when no key frame has been received, but it recognizes that the data from received delta frames make up a full frame.
  • Added OriginPattern property to the UASubscribeDataSetFilter class. It allows to specify a filtering pattern for the origin of the dataset message. The origin is e.g. a MAC address in the Ethernet transport, the IP address in the UDP transport, or the topic name in the MQTT transport.
  • Added MessageMappingName property to the UADataSetHeader class. Contains the name of the message mapping ("Json" or "Uadp"), if known.
  • Added Signed and Encrypted properties to the UADataSetHeader class. The properties determine whether the received data was signed and/or encrypted.
  • Added Compressed property to the UADataSetHeader class. The property determines whether the received data was compressed (GZip in MQTT transport).
  • Added HasDataSetMetaData property to the UADataSetData class, and extended its string format so that it contains an indication whether the metadata is present or not.
  • The UAPublisherId and UADataSetHeader classes now implement the IComparable<> interface.
  • It is now possible to subscribe to an MQTT broker, while storing a copy of the received message into a file system at the same time, e.g. for troubleshooting. For more information, see File-based MQTT emulation - Implicit Usage in MQTT Transport and File-based MQTT emulation - Examples.
  • When specifying custom properties on PubSub objects, it is possible to shorten the commonly used namespace http://opclabs.com/OpcUA/PubSub to {OpcLabs}, using a pre-defined replacement variable.
  • Using the 'keyPartsDirectory' named value in the 'static' security key source URI, it is now possible to specify the directory where files defining the static key (signingKey.key, encryptKey.key, keyNonce.key) reside (key storage format used by Systerel S2OPC).

Performance

  • The EasyDAClient and EasyUAClient components perform a hidden internal "warm-up" operation upon their first instantiation, improving performance of a subsequent user-initiated operation in some cases.

Development Productivity

Code Analysis

  • When the Visual Studio extension is installed, it provides additional code analysis specifically aimed at the proper usage of QuickOPC APIs, and OPC in general. Affected places are marked up with "squiggles" directly in the code, and also appear as warnings (or other message severities) in the Error List window.

Visual Studio Integration

  • The Toolbox items that previously appeared in a single "QuickOPC" toolbox category are now divided into two categories: "QuickOPC Components" (non-visual, but including Live Binding support), and "QuickOPC Windows Forms" (controls for Windows Forms, and dialogs usable from Windows Forms and WPF).

Application Deployment

  • The Production Installer is no longer intended to be used for .NET applications (.NET Framework, .NET Core, .NET 6+); it is meant to be used for COM applications or Excel Option deployment. This is because the assembly referencing model has been abandoned in favor of NuGet package references (see Packaging), and the set of assemblies required is no longer static, including their versions, and the binding redirects needed to support them. The only usable part from the Production installer for .NET applications is the LMConsole utility, and that can be invoked separately, which means that the use of Production Installer would be an overkill.
  • Installing QuickOPC assemblies into the GAC is no longer supported and we recommend against it.
  • When deploying the COM component files (for COM applications or Excel Option), an additional assemblies.config file (provided together with the assembly .dll-s) has to be deployed alongside the assembly .dll-s.

Tools and Online Services

Connectivity Explorer

  • OPC UA discovery endpoints with unsupported scheme (http) are displayed with strike-through font. The reason for the strike-out is explained in the node tooltip.
  • OPC UA session endpoints with obsolete security policies (such as Basic128Rsa15 or Basic256) are displayed with strike-through font. The reason for the strike-out is explained in the node tooltip.
  • The Connectivity Explorer is now able to collect anonymous usage data that we use to improve the product. On the first run, the user is asked for consent with data collection. The consent can also be withdrawn at any time.
  • Cache persistency (see above in this article) is turned on in Connectivity Explorer.

Demo Servers and Publishers

OpcCmd Utility

  • The new uaSubscriber getService uaPubSubSniffer subscribeCapture command allows the user to "sniff" on OPC UA PubSub traffic on a PubSub connection (on a higher level than e.g. WireShark), and obtain captures indicating types of PubSub message flowing on the network, and their crucial characteristics such as publisher, writer group and dataset writer Ids. More information: Using OpcCmd Utility as OPC UA PubSub Sniffer.
  • The --ShowCaptureData option of the uaPubSubSniffer subscribeCapture command allows to display the actual binary (UADP) or textual (JSON) data received by the transport mechanism.
  • Using a "[]" after the type code, and with element list in '{' and '}', it is now possible specify array values (e.g. for writing).
  • Added --EndpointSecurityPolicyDisplayName (-espdn) option to all OPC UA commands that have an endpoint as an argument. It allows to specify the security policy using a shorter form (display name), rather than its full (and often lengthy) URL. For example, you can use -espdn None instead of -espu http://opcfoundation.org/UA/SecurityPolicy#None.
  • Added --EndpointServerCertificateByteArray (-escba) option to all OPC UA commands that have an endpoint as an argument. It allows to specify the "raw data" (as hexadecimal string) of the server certificate, when using a synthesized endpoint.
  • The table of dataset header statistics, displayed at the end of uaSubscriber subscribeDataSet command execution, now also shows the rate (in messages per second) of the incoming messages.
  • The table of dataset header statistics, displayed at the end of uaSubscriber subscribeDataSet command execution, is now ordered by publisher Id, writer group dataset writer Id&name, dataset class Id, and origin.
  • The new -Aggregates (-a) command option, available with uaSubscriber subscribeDataSet and uaPubSubSniffer subscribeCapture commands, allows to select which of the predefined aggregates will be calculated, and displayed at the end of command execution. Available aggregates are currently CaptureHeaderStatistics, DataSetHeaderStatistics, DataSetWriterStatistics, GroupByOrigin, OriginStatistics, and PublisherStatistics.
  • Added --DistinctHeadersOnly (-dho) option to the uaSubscriber subscribeDataSet command. The options changes the command output so that only dataset header information is displayed, and only when a dataset with a new, distinct header is received. With this option, you can easily collect information about "who is publishing" over a period of time.
  • Added --OriginPattern (-op) option to the uaSubscriber subscribeDataSet command. It allows to specify a filtering pattern for the origin of the dataset message. The origin is e.g. a MAC address in the Ethernet transport, the IP address in the UDP transport, or the topic name in the MQTT transport.
  • It is now possible to subscribe to an MQTT broker, while storing a copy of the received message into a file system at the same time, e.g. for troubleshooting. For more information, see File-based MQTT emulation - Implicit Usage in MQTT Transport and File-based MQTT emulation - Examples.
  • For table output (sequences etc.), it is now possible to specify maximum key column width and maximum value width, using the 'K' and 'V' format specifiers.
  • The OpcCmd Utility now outputs a symbolic error Id with all operation errors, before the error's message text.
  • The OpcCmd Utility is now able to collect anonymous usage data that we use to improve the product. On the first run, the user is asked for consent with data collection. The consent can also be withdrawn at any time.
  • Cache persistency (see above in this article) is turned on in the OpcCmd Utility.
  • There is an indication in the output when the executing command has been terminated by the user.

OPC UA PubSub Formatter

  • Allowed public access to updates resulting from OPC UA specification 1.05.01 (new DataSetWriterName and ReversibleFieldEncoding flags).
  • Split the output pane to Data and Metadata tabs. The new Metadata tab shows the formatted JSON metadata (discovery) messages that would be generated for the selected datasets.

Product Options

StreamInsight Option

  • The StreamInsight Option is no longer available as a separate product option. The functionality is, however, preserved in the product, and the supporting classes have been moved to product core assemblies. StreamInsight development no longer requires a dedicated license for the product option, but can now be done with any license that supports Reactive Programming Model. The documentation topics related to the former StreamInsight Option have been moved into a "StreamInsight Extensions" chapter under the "Layered Extensions for .NET" part of the User's Guide.

Examples

  • Examples in Visual Studio 2019 have been converted to Visual Studio 2022 (Visual Studio 2019 may still work, but we do not test for that).

Platform: .NET

  • Separate example solutions for .NET Framework and .NET Core/.NET 6+ have been merged. Inside the merged solutions, some projects target .NET Framework, some projects target .NET Core/.NET 6+, and some target both.

OPC Classic

  • Added C# example showing how to read OPC DA items while being subscribed.

OPC UA Client-Server

  • Added C# and VB.NET examples showing how to write a value that is an array.
  • Added VBScript example showing how to lock and unlock a connection to an OPC UA server.

Excel Option

  • The demo worksheet for the Excel Option now contains "error cells". In case of an error, they show the associated error message - one for each OPC specification supported.