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
Moderator
Members

Moderators
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: 518

Currently Online:
23 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 680

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1