Prosys OPC UA Java SDK 1.4.0
This is a new minor release, with some important changes and improvements.
Highlights
- The most important new feature is support for importing information models from XML files that adhere to the new UaNodeSet.xsd schema defined in UA Spec. v.1.02 (Part 5). UaServer is now initialized by default with the types in the Opc.Ua.NodeSet2.xml, which is defined by the OPC Foundation and included in the setup. The information model definitions are still being worked on. The latest published NodeSet files are available at http://www.opcfoundation.org/UA/schemas/1.02/, but we have included a fixed version of the current draft of the basic information model (Opc.Ua.NodeSet2.xml), already.
- History Access methods, both on the client and server side, are now supporting continuation points: this leads to interafce changes on the server side!
- There are also several important performance improvements, especially to the Subscription management on the client side, which has a new implementation for incoming notification queue handling, but also on the server side.
- Note also that the Variant will now decode ExtensionObjects and arrays of ExtensionObject automatically and it may break your client application, especially, if you have expected ExtensionObject data without checking it.
OPC Foundation Java Stack changes
- Stack Build 324.4
- Changed: Variant will decode ExtesionObject arrays automatically
- Changed: NodeId & ExpandedNodeId hashCode() calculated when used, not in constructor (Performance issue)
- Changed: UaTcpServer to use a shared (static) SecureChannelId for all server addresses
- Changed: UaTcpConnection to use ConcurrentHashMap instead of synchronizedMap for SecureChannels (seemed to cause some minor issues)
- Changed: ExpandedNodeId.serverIndex defaults to UnsignedInteger.ZERO instead of null
- New: StatusCode.equalsStatusCode
- New: XMLDecoder (used for parsing UaNodeSet2.xml and decoding xml enconded ExtensionObjects)
- New: UriTable (common base for NamespaceTable & ServerTable (which was changed)
- New: UriTable.addAll()
- New: ServerTable.createFromArray()
- New: NodeId & ExpandedNodeId implement Comparable
- New: QualifiedName.parseQualifiedName()
- Fixed: CreateSessionRequest did not include Timestamp
- Fixed: Variant.toNumber() with Boolean values
- Fixed: Memory leak in UATcpServer - connections were not released. The root cause was in TimerUtil
Changes to both SDK Client and Server
- New: ModelParserBase; common implementation for both sides of the Nodeset XML reader
- New: ModelException
- Fixed: DataTypeConverter: use convertValue in parseVariant for boolean values to make string values work as defined by OPC UA
Changes to SDK Client
- Changed: UaClient uses a PublishTask thread instead of a timer task to run the publish requests: this can be notified to proceed immediately, when new subscriptions are added or notification data becomes available, which leads to much faster response
- Changed: The subscription notifications are now recorded in an internal buffer, which is emptied by the PublishTask thread (which sends the PubishRequests, checks server status and triggers automatic reconnect when necessary). This enables several synchronizations to be removed, making the client more reliable (reconnection could even lead to a deadlock) and more performant in general. However, if more data is coming in than the client can handle, the buffer may overflow. This is notified with the above mentioned new interface method.
- Changed: 'final' keyword removed from UaClient
- Changed: UaClient.autoReconnect defined as 'volatile' to enable changing on the fly
- Changed: MethodCallStatusException.toString() to display the argument errors
- Changed: Subscription keeps the MonitoredItems internally in a SkipList instead of HashMap, to ensure they are ordered by the Id, when retrieved from getItems()
- Changed: UaClient.historyReadXxx to perform subsequent reads until no continuationPoint is returned
- Changed: UaClient to also auto reconnect for Bad_SecureChannelIdInvalid (which should not normally occur, though)
- New (INTERFACE CHANGE): SubscriptionNotificationListener.onBufferOverflow to notify the (new) internal notification buffer overflow
- New: Subscription.readAll()
- New: MonitoredEventItem.createBrowsePath()
- New: MonitoredEventItem.get/setDefaultEventFields()
- New: MonitoredEventItem to use a default filter (with the DefaultEventFields) by default - to ensure it will monitor events, not data changes.
- New: Subscription.getAliveListeners()
- New: Subscription.getNotificationListeners()
- New: MonitoredDataItem.getDataChangeListeners()
- New: MonitoredEventItem.getEventListeners()
- New: UaClient.getServerTable()
- New: AddressSpace.loadModel()
- New: ModelParser (implementing the above mentioned loadModel() internally)
- New: AddressSpace.getServerTable()
- New: AddressSpace.addNode(),addNodes(),addReference(),addReferences() and the respective delete methods
- Fixed: Do not send a new PublishRequest immediately if the response is not good (to avoid a busy loop)
- Fixed: Bad_SessionClosed did not trigger reconnect attempt
- Fixed: UaClient.connect() declared to throw ConnectException
Changes to SDK Server
- INTERFACE CHANGE: HistoryManager & HistoryManagerListener to support userContinuationPoint of type Object instead of the "protocol" version of type byte[] and also enable returning any object; method parameters and return types changed accordingly. This will help dealing with the continuationPOints freely in the application
- INTERFACE CHANGE: Method signature of NodeManager/IoManager.getVariableDataType(NodeId nodeId, UaVariable variable) changed (new param variable)
- Changed: Data type of SessionManager.maxBrowseContinuationPoints from UnsignedShort to int
- Changed: Session.getSessionTimeout() return type from Double to double
- Changed: Session.getMaxBrowseContinuationPoints() returns int instead of UnsignedShort
- Renamed: ContinuationPoint to BrowseContinuationPoint
- Changed; NodeMapUaNode to use ConcurrentSkipListMap by default to keep the nodes in order
- Changed: Default AccessLevel for UaVariableNode is now READWRITE (no history by default)
- Changed: NO_LOCALE used for standard nodes (also when initialized out of the xml)
- Removed: ServerType.updateServerArray and updateNamespaceTable from the public interface - use UaServer.addToServerArray() instead
- New: Type data initialized from UaNodeSet2.xml, which is the new XML format defined by the OPC Foundation for data models
- New: HistoryContinuationPoint & AbstractContinuationPoint (used internally)
- New: SessionManager.get/setMaxHistoryContinuationPoints
- New: ServiceContext.equals()
- New: SubscriptionManager.get/setMaxNotificationsPerPublish()
- New: MonitoredDataItem.get/setEuRange() & MonitoredDataItem.get/setEuRangeProperty() - for implementing support for Deadband.Percent
- New: MonitoredDataItem sets the OverflowBit of DataValues, if the sampling queue overflows
- New: MonitoredDataItem.notifyDataChange(DataValue) replacing the old onDataChange() which takes more arguments that were never used (it is marked deprecated now)
- New: MonitoredEventItem.notifyEvent(EventData) replacing the old onEvent which takes more arguments that were never used (it is marked deprecated now)
- New: MonitoredDataItem will do it's best to ensure SamplingInterval in case samples are actually provided at a faster rate
- New: NodeManagerTable.getServerTable()
- New: NodeManagerTable.loadModel() to enable loading information models according to the new UaNodeSet.xsd schema defined in UA Spec v.1.02 (Part 5)
- New: ModelParser (implementing the above mentioned loadModel() internally)
- Fixed: Subscription.MaxNotificationsPerPublish was not handled perfectly for Subscription notifications making it possible to miss some changes, if this parameter was defined by a client
- Fixed: MethodManager.checkInputArguments to enable "null" as expected type (to omit the check)
- Fixed: More 'volatile' keywords to Session & Subscription fields to improve possible threading issues
- Fixed: NodeManager.browseNode NPE, if the NodeManager can return null for getReferences()
- Fixed: MonitoredItem to initialize timestampsToReturn (just in case)
- Fixed: SubscriptionManager to set other params of a new MonitoredDataItem before the queueSize is set
- Fixed: HistoryManager.historyRead to verify the AccessLevel for HistoryRead
- Fixed: activateSession was not checking the secureChannel correctly.
- Fixed: Memory leak in Session -> diagnostics node is always added to the NodeManager but never removed, leading to increasing mem usage for a big number of sessions.
Changes to the Sample applications
- Changed: SampleConsoleClient to be instantiated as a class, instead of using all static members - enables inheritance
- Fixed: MyBigNodeManager.MyBigIoManager.readNonValue to define ArrayDimensions.Scalar instead of OneDimension for the DataItems
- Fixed: SampleConsoleClient: Check AccessLevel instead of Historizing whether the node has history (Historizing is defined to tell if the node is currently collecting history, AccessLevel defined whether history is available)
05.10.12