

13:04, EEST

November 27, 2018

Hello,
We have a 4.4.0-1240 version of the Java SDK , and tested the sample code of the Pub/Sub.
In the samplepubsubpublisherserver project, has the below code.
variableDataSetConf.addPublishedVariables(UaNodeId.fromLocal(myNodeManager.myLevel.getNodeId(), server.getNamespaceTable()));
variableDataSetConf .addPublishedVariables(PubSubPublishedVariableConf.builder().setAttributeId(Attributes.DisplayName) .setPublishedVariable(UaNodeId.fromLocal(myNodeManager.myLevel.getNodeId(), server.getNamespaceTable())).build());
and got the output message from the samplepubsubsubscriberserver project
Received DataSetMessage from DataSetWriter 432
MyLevel: PubSubDataValue [ encodingType=DataValue serverTimestamp=-1000000000-01-01T00:00:00Z sourceTimestamp=-1000000000-01-01T00:00:00Z statusCode=Bad_WaitingForInitialData (0x80320000) “Waiting for the server to obtain values from the underlying data source.” value=(null)]
MyLevelDisplayName: PubSubDataValue [ encodingType=DataValue serverTimestamp=-1000000000-01-01T00:00:00Z sourceTimestamp=-1000000000-01-01T00:00:00Z statusCode=GOOD (0x00000000) “” value=MyLevel]
MyLevel: PubSubDataValue [ encodingType=DataValue serverTimestamp=-1000000000-01-01T00:00:00Z sourceTimestamp=2020-10-07T09:57:03.542Z statusCode=GOOD (0x00000000) “” value=2.0]
MyLevelDisplayName: PubSubDataValue [ encodingType=DataValue serverTimestamp=-1000000000-01-01T00:00:00Z sourceTimestamp=2020-10-07T09:57:03.542Z statusCode=GOOD (0x00000000) “” value=2.0]
…
Received DataSetMessage from DataSetWriter 432
MyLevel: PubSubDataValue [ encodingType=DataValue serverTimestamp=-1000000000-01-01T00:00:00Z sourceTimestamp=2020-10-07T09:57:15.543Z statusCode=GOOD (0x00000000) “” value=14.0]
MyLevelDisplayName: PubSubDataValue [ encodingType=DataValue serverTimestamp=-1000000000-01-01T00:00:00Z sourceTimestamp=2020-10-07T09:57:15.543Z statusCode=GOOD (0x00000000) “” value=14.0]
First, the value of MyLevelDisplayName is the right value (MyLevel string), but after it’s values are wrong.
Please help to figure out the problem, thanks.
Best regards,
jelan
14:33, EEST

November 28, 2018

Hello Jelan and sorry for a delayed answer.
We investigated the issue, found a bug in our Publisher code and fixed it for Java SDK version 4.4.2-1266. We just released this new version, please download it and try that it works for your needs. Obviously, we are still at a beta phase with the PubSub code, so thank you for informing us about the issue and helping us improve the SDK.
1 Guest(s)
