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
Best way to update the status code
August 12, 2020
11:41, EEST
Avatar
VeroB
New Member
Members
Forum Posts: 1
Member Since:
August 12, 2020
sp_UserOfflineSmall Offline

Hello,

I’m using the 3.2.0-690 version of prosys SDK for my OPC server and I use the following method to update the status code of an UaVariable ‘UaVariableNode.setStatus(StatusCode newStatus)’.

However, the status update seems not detected by my connected uaClient (uaExpert or the ProsysSampleClient) (using a subscription on Value attribute). And if the new status is BAD, the value seems not be reset to null (unlike said in the setStatus method javadoc).

All work well if I use the method ‘UaVariableNode.setValue(DataValue newDataValue)’ but i’m not sure is it the right way…

So what is the best way to update the StatusCode of an UaVariable and ensure it is well detected by the Uaclient ?

August 17, 2020
8:48, EEST
Avatar
Matti Siponen
Moderator
Members

Moderators
Forum Posts: 346
Member Since:
February 11, 2020
sp_UserOfflineSmall Offline

Hello,

UaVariableNode.setStatus(StatusCode newStatus) is a convenience method that calls UaVariableNode.setValue(DataValue newDataValue) with a new DataValue based on the current DataValue. While this isn’t mentioned in the Javadoc, setStatus method does nothing if the current DataValue is null. The logging output of the method could be improved to inform the user when this happens.

setStatus method isn’t tested in integration tests, which means that there might be conditions that cause it to not work as intended. In the meantime, I would recommend using UaVariableNode.setValue(DataValue newDataValue) method instead as that method has been tested in multiple integration tests.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
34 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: 735

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1523

Posts: 6449

Newest Members:

rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16

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

Administrators: admin: 1