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
New Member
Members
Forum Posts: 1
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: 267

Currently Online:
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 103

pramanj: 86

ibrahim: 70

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 38

Rainer Versteeg: 32

Thomas Reuther: 31

Member Stats:

Guest Posters: 0

Members: 1118

Moderators: 14

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1034

Posts: 4352

Newest Members:

aldayr, Python techie, emanuel45q, Patrick, sammycontrols, hellema, linoy, subranna, ray, richN9177

Moderators: Jouni Aro: 853, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 559, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 21, Markus Johansson: 24, Matti Siponen: 64, Lusetti: 0

Administrators: admin: 1