17:05, EEST
March 16, 2017
Hi there,
I’ve observed something strange with an OpcUa server.
On this server there is a node, which has a NodeClass Variable, but when I look at the DataType, it shows me:
v DataType
….> NamespaceIndex 0
….> NamespaceURI http://opcfoundation.org/UA/
….> IdentifierType 0 (Numeric)
….> Identifier 0
When checking the Types, there is no Type with NodeId 0 in Namespace 0. Is this something which is valid?
Thanks!
9:21, EEST
Moderators
February 11, 2020
Hello,
A NodeId with NamespaceIndex 0 and Numeric value 0 is a null NodeId. It doesn’t (or at least it shouldn’t) refer to any Node in the Server’s AddressSpace.
A Server returning such NodeId for a DataType Attribute of a Variable means that the Server doesn’t specify the DataType for that Variable. The OPC UA Specification states that the DataType Attribute shall be a valid non-null NodeId (https://reference.opcfoundation.org/Core/Part3/v105/docs/5.6), but we have seen Servers return null NodeId for DataType Attribute before.
10:08, EEST
March 16, 2017
12:14, EEST
March 16, 2017
12:34, EEST
Moderators
February 11, 2020
Hello,
Yes, it is possible to set value of the DataType Attribute of a Variable Node to null NodeId in the SDK.
If the Variable is UaVariableNode, you can use the setDataTypeId(NodeId) method to set its DataType to null NodeId (which is NodeId.NULL in the SDK). In the MyNodeManager of SampleConsoleServer, you could use that method to set the DataType to null NodeId for MySwitch and/or MyLevel.
If your NodeManager doesn’t use UaNodes, you can configure the readAttribute(NodeId, UnsignedInteger, NumericRange, DateTime) of your IoManager or the onReadNonValue(ServiceContext, NodeId, UaNode, UnsignedInteger, DataValue) method of your IoManagerListener to return null NodeId as the value of DataType for some Variable Node or Nodes. In MyBigNodeManager of SampleConsoleServer, you could modify the onReadNonValue method of the MyBigIoManager to always return null NodeId for the DataType Attribute.
Most Users Ever Online: 1919
Currently Online:
41 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: 734
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1