Prosys OPC UA Java SDK 3.0.0
This is a new major release of the SDK. It has some major modifications and changes to the previous version 2.x, but old projects
can be migrated with little effort to this version. Please see the Migration Guide for details.
Feature Highlights:
- Support for OPC UA version 1.03
- Rewritten, improved Code Generator
OPC Foundation Java Stack changes
- Version: 1.3.343
- Changed: OPC UA ByteString is now mapped to org.opcfoundation.ua.builtintypes.ByteString instead of byte[] in all interfaces.
- New: DefaultCertificateValidator & PkiDirectoryCertificateStore (replacing the PkiFileBasedCertificateValidator in the SDK)
Changes to both the Client and Server SDKs
- New: ApplicationIdentity.getHostNameWithoutDomain().
- New: Support for (a subset of) OPC UA Aggregates (UaClient.getAggregateCalculator() and UaServer.getAggregateCalculator()).
- New: Support for the Global Discovery Server (GDS) information model.
- Changed: Using OPC UA 1.03 information model.
- Changed: AnalogItemType.getEuRange() changed to .getEURange().
- Fixed: UaType.getJavaClass() for StatusCode.
- Fixed: UaType.getJavaClass() for Structures (assuming they are code generated with the new Code Generator).
- Deprecated: PkiFileBasedCertificateValidator and UaCertificateValidator; replaced by the stack classes DefaultCertificateValidator & PkiDirectoryCertificateStore (see the Tutorials for details).
Changes to Client SDK
- New: TypeDictionary class, which can be used to decode custom Structure types that are not known at compile time. NOTE: Custom Enumeration fields not supported, yet.
- New: AddressSpace.getNodes(); Similar to getNode() but offers better performance when retrieving several nodes at once.
- Changed: UaClient.doRead() is now protected (was public unintentionally)
- Changed: UaNodeImpl.getForwardReferences() and getInverseReferences() return all References instead of no References when empty varargs parameter is passed.
- Fixed: Recovery of Subscriptions after a connection break longer of than the keepAlive time but shorter than lifeTime
- Removed: FileSyncClient (see end of the notes for details).
Changes to Server SDK
- Improved: Node instantiation has been improved along wit the new code generation. This enables handling of more complex situations also in future.
- New: TypeDefinitionBasedNodeBuilderConfiguration class. An alternative and improved way for configuring InstanceDeclarations with Optional ModellingRules for instantiation.
- New: Updating CurrentTime in ServerStatus once per second (required for clients that create a MonitoredItem instead of using a periodic read).
- New: Support for the new ConditionRefresh2 Method defined in the OPC UA Specification.
- New: UaNodeId, UaBrowsePath and UaQualifiedName that use a NamespaceURI instead of a NamespaceIndex (that is used by NodeId, BrowsePath and QualifiedName).
- New: IoManagerAdapter.
- New: UaNode.addReference(ExpandedNodeId) enabling external references
- Changed: AddNodes service call from clients creates full instances for Object and Variable NodeClasses (using the NodeBuilder of the respective NodeManagerUaNode).
- Changed: Bundled NodeSet2 XML files are now located in the same package as the generated ServerInformationModel class is.
- Changed: Passing an empty array instead of null for CallableListeners of MethodManagerUaNode.
- Changed: UaServer logs the message "UaServer closed." during server close to logger instead of system out.
- Removed: NodeManagerTable.historyRead(ServiceContext, ...) and historyUpdate(ServiceContext, ...)
- Changed: All instantiation related classes (NodeBuilder and related classes) are moved to the package 'com.prosysopc.ua.server.instantiation'.
- Fixed: NPE problems and data errors related to Diagnostics.
- Fixed: Default ValueRank while loading NodeSet2 XML files (using the default ValueRank Scalar (-1) as defined in the XML schema instead of Any (-2)).
- Fixed: Loading of IsAbstract Attribute for ReferenceTypes from NodeSet2 XMLs.
- Fixed: Possible memory leak in LocalizedTextMap.
- Fixed: Writing to Condition node properties didn't work.
- Changed/Fixed: LocalizedTextMap. Empty locale is treated the same as null locale. Fixed situation where LocalizedText with null or empty locale could not be replaced. Using overwrite rules of the Specification (v1.03) Part 4 section 5.10.4.1.
- Changed/Fixed: StructureChanged bit not set anymore on DataType, ValueRank or ArrayDimensions change (changed in OPC UA 1.01 -> 1.02).
- Moved: FileNodeManager and FileFolderType to SampleConsoleServer example.
- Moved: Compliance nodes moved to SampleConsoleServer
- Changed: FileFolderType extends new FileDirectoryType (introduced in OPC UA 1.03)
Code Generator
- New completely rewritten version; generated classes are mostly similar to the old ones, but there are some additions and changes so a regeneration is required.
- IMPORTANT: the new Code Generator overrides any existing file it generates.
- IMPORTANT: Running the Code Generator requires Java 7 (generated classes compile and work on Java 6).
- New: Generated Ids contain NodeIds for ReferenceTypes.
- New: Generated Ids contain NodeIds for all sub-nodes of the types.
- New: Support copying the source XML next to the generated classes.
- New: An optional prefix to use for the generated class names of Ids, ClientInformationModel and ServerInformationModel (for example to generate DiIds, etc.).
- New: Enable implementation of UA methods and initialization external to the generated classes (to avoid editing the generated classes).
- New: Support for Unions and Optional Structures.
- New: Experimental Maven plugin.
- Changed: Using Prefixes Di, Adi, Plc, Gds for the bundled companion specifications (the standard namespace does not have a prefix).
- Changed: InformationModel classes renamed to ClientInformationModel on the client side and ServerInformationModel on the server side.
- Changed: Generating Parameter Objects for UA Methods having more than one OutputArgument.
- Changed: Client-side async method calls return correct generic parameter (AsyncResult for methods returning none).
- Changed: getter and setter names for type components use actual names: e.g. AnalogItemType.getEuRange() changed to .getEURange().
Changes to SampleConsoleClient
- Fixed: Problems initializing logging if log file path contained spaces.
- Changed: Uses certificate validation from the Stack classes.
Changes to SampleConsoleServer
- Fixed: Problems initializing logging if log file path contained spaces.
- Moved: The compliance nodes are now directly a part of the samples instead of the SDK.
- Moved: FileNodeManager and FileFolderType moved as sample implementation out of the main SDK
- Changed: Uses certificate validation from the Stack classes.
- Removed: MyLevelAlarmType class (was not used anywhere).
More
The SDK and Stack jar names have changed slightly due to changes in build processes.
Compliance nodes that were used in the SampleConsoleServer are moved from the SDK to the samples.
The original idea was that you could just include ComplianceNodeManager for your server in order to
help for the certification process, however in practice that only works for the samples as you need
to use the actual nodes of your server. Therefore the related classes are moved to samples.
FileNodeManager and related classes are also moved to be a part of the SampleConsoleServer as the
implementation is too application specific and serves better as a sample and a starting point
for servers requiring similar functionality.
FileSyncClient class is removed due to the functionality being too unreliable and application specific.
If the removal is a problem, let us know.
13.03.18