What’s New in QuickOPC-Classic 5.12
Jump to navigation Jump to search
Previous: What’s New in QuickOPC-Classic 5.11
Key changes: Assorted Enhancements
- Minimum platform requirement is now unified to .NET Framework 3.5 Service Pack 1 (Client Profile or Full).
- In most scenarios, it is now possible to use the QuickOPC.NET assemblies from .NET Framework 4 CLR without extra precautions (i.e. without setting useLegacyV2RuntimeActivationPolicy in the configuration file).
- Using a special technique, mixed-mode assemblies (containing native code, separate for x86 and x64 platforms) have been merged into a single assembly that appears as MSIL assembly to the consumers. You can now reference the same assemblies without regard for the target platform.
- Applications with QuickOPC.NET can now be built for “Any CPU” platform, without differentiating between 32-bit and 64-bit targets.
- The Visual Studio designer limitation (allowing only 32-bit components be loaded to the designer) no longer matters, also as result of the above assembly merging.
- Assemblies have been restructured (i.e. the product is now made of different assemblies as compared to Version 5.11), and assembly names have been made consistent, now always starting with “OpcLabs” prefix.
- Added possibility to use callback methods instead of (or in addition to) event handlers to EasyDAClient and EasyAEClient objects. This allows receiving notifications without hooking up event handlers, and directing them to different methods for different purposes easily. The callback methods can also be specified using anonymous delegates and lambda expressions, resulting in more concise and readable code.
- Added possibility to serialize and deserialize practically all objects (and their collections and dictionaries) using Serializable attribute and/or ISerializable interface. This serialization type is typically used with BinaryFormatter for storing objects in a binary format.
- Added possibility to serialize and deserialize practically all objects (and their collections and dictionaries) using XmlSerializer and IXmlSerializable. This serialization provides objects storage in XML format.
- Added DefaultInstance property to EasyDAClient and EasyAEClient objects. This property contains a default, shared instance of the client object, and allows writing shorter code, mainly for testing and non-library application code.
- Added BrowsePath property to DANodeElement. This property contains a string made of “short” item names starting from the root of the address space, up to the current node. Value of ItemId property of DANodeElement can now be a null reference; this can happen with some non-compliant OPC servers if they fail to return the full Item ID, typically for a branch.
- Added new DANodeDescriptor object which can be passed to BrowseBranches, BrowseLeaves and BrowseNodes and specifies the parent node for browsing. The DANodeDescriptor can describe the node either using the Item ID, or using the browse path, or both. DANodeDescriptor objects can be easily created from strings (Item IDs will directly convert to DANodeDescriptor-s), or from DANodeElement objects that are returned from the browsing methods.
- Added ErrorCode property to OperationResult class, and to EasyDAItemChangedEventArgs and EasyAENotificationEventArgs classes. Application code can obtain the error code associated with the operation or event notifications without inspecting the Exception property.
- Added Succeeded property to OperationResult class.
- Added EasyOPC.NET Extensions (EasyOpcClassicNetExtensions assembly), with many new features (some listed below).
- All symbols have been annotated using ReSharper custom attributes for Code Analysis. This means that developers using ReSharper will immediately benefit from code inspection warnings, such as that possibly a null reference is given to an argument that must not be null, and others.
- Added named types for generic dictionaries returned by methods, and in some appropriate cases, changed them to be based on keyed collections instead. This is potentially a breaking change, mainly for applications that use browsing and querying, but the incurred code changes are not difficult. These changes have been made to comply with .NET recommendations and for serialization support.
- SubscribeMultipleItems method now returns simply an array of integers, not an array of HandleResult-s. The HandleResult class has been completely removed. This is a breaking change for applications that use SubscribeMultipleItems method, but the incurred code change is not difficult, and the resulting code is smaller.
- For each primitive type, added type-safe methods that allow reading an item value already converted to the specified type, and type-safe methods that allow writing an item value with a specified type. Corresponding set of methods also exists for one-dimensional arrays of primitive types.
- For each primitive type, and one-dimensional arrays of primitive types, added type-safe methods that allow obtaining a value of an OPC property already converted to the specified type.
- Added methods that allow obtaining values of well-known OPC property directly, without specifying its property Id, and already converted to proper type.
- It is now possible to obtain all well-known OPC properties of an OPC item into a structure for easy access, in a single method call. It is also possible to obtain just a specified subset of OPC properties, and commonly used subsets come pre-defined with the component. It is also possible to combine the property sets (union operation).
- Added methods that obtain OPC properties of an OPC item into a dictionary, allowing easy retrieval of the property values without indexing an array.
- Proper browsing for OPC nodes is now possible even with non-compliant OPC servers that fail to return Item IDs for branches.
Documentation and Help
- .NET: Help content now integrates with Microsoft Visual Studio 2008 Help (Microsoft Help 2 format).
- .NET: Help content now integrates with Visual Studio 2010 Help (Microsoft Help Viewer 1.0 format).
- .NET: Added a new chapter on EasyOPC.NET Extensions into the Concepts documents.
- Improved format of the Help.
- Added SubscribeFromXml example for .NET: Loads list of OPC items from an XML file and subscribes to them.
- Added XmlEventLogger example for .NET: Logs OPC Alarms and Events notifications into an XML file.
- Added XmlLogger example for .NET: Logs OPC Data Access item changes into an XML file.
- Added examples for EasyOPC.NET extensions.
- Added many other examples for .NET.
- COM: Added ReadMultipleItems and WriteMultipleItemValues examples in Visual C++.
- COM: Added example in Xbase++.
- Significantly improved performance of SubscribeMultipleItems, UnsubscribeMultipleItems, ChangeMultipleItemsSubscriptions and UnsubscribeAllItems method with large number of items.
- The installation program now attempts to un-block the .CHM help files by registering them.
- .NET: Resolved a problem when placing a component onto a designer surface in a project targeting .NET Framework 4 generated an incorrect instantiation of SynchronizationContext that lead to inability to build initially, and a necessity of referencing the WindowsBase assembly.
- In QuickOPC.NET Reference, provided missing documentation to many elements.
- Properly included examples into QuickOPC.NET Reference.