21:28, EEST
August 7, 2018
Hi,
I am having problems to read the value of specific node, this is from Server side.
I am sending “myNodeManager” like parameter to other class when I am going to make the call, this is the code:
IoManagerUaNode ioManagerUaNode = new IoManagerUaNode(myNodeManager);
NodeId nodeIdName = new NodeId(2,”Name”); //This is the node I am going to read the value, and it has value!!
try {
DataValue data = ioManagerUaNode.readAttribute(nodeIdName, Attributes.Value, null, null);
String name = data.getValue().toString();
System.out.println(name);
} catch (StatusException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
But, I am getting this error:
ServiceFault: Bad_InternalError (0x80020000) “An internal error occurred as a result of a programming or configuration error.”
Diagnostic Info: java.lang.NullPointerException
at com.prosysopc.ua.server.IoManagerUaNode.readValue(SourceFile:119)
at com.prosysopc.ua.server.IoManager.readAttribute(SourceFile:870)
at com.prosysopc.ua.server.IoManager.readAttribute(SourceFile:439)
I am getting null value, but the node has value!
I was looking the documentation and there is others methods like readValue or other readAttribute (with more parameters) but I can not see them on my IoManager.
Thank you.
13:03, EEST
April 17, 2013
Hi,
I/O managers are used to handle read and write calls from the client applications. It’s not supposed to be used internally by the server application.
In the context of the example above, where you already have access to the NodeManagerUaNode object (myNodeManager), you can access the UaNode objects by calling
If you would not have access to the NodeManager object, you could also call getNode method of the NodeManagerTable:
You can then access the different attributes of the node with getXxx methods. As an example, the DataValue of the value attribute can be obtained with getValue() method. As a more complete example, please see the below code for obtaining the value attribute in the above scenario:
DataValue dv = nameNode.getValue();
All this being said, the server side SDK documentation might need some improvement regarding these aspects. You can find documentation about these methods in the Javadoc, but the tutorial documents don’t offer much help.
Most Users Ever Online: 1919
Currently Online:
16 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: 730
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech KubalaModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1