Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
The problem of the OPC UA Pub/Sub sample code
October 7, 2020
13:04, EEST
Avatar
jelan
Member
Members
Forum Posts: 3
Member Since:
November 27, 2018
sp_UserOfflineSmall Offline

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

October 9, 2020
14:33, EEST
Avatar
Teppo Uimonen
Member
Members
Forum Posts: 21
Member Since:
November 28, 2018
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
20 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 727

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1