11:41, EEST
August 12, 2020
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 ?
8:48, EEST
Moderators
February 11, 2020
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.
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, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1