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
Node with NodeClass 'Variable' but without a valid DataType
May 23, 2024
17:05, EEST
Avatar
rocket science
Member
Members
Forum Posts: 88
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

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!

May 24, 2024
9:21, EEST
Avatar
Matti Siponen
Moderator
Members

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

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.

May 24, 2024
10:08, EEST
Avatar
rocket science
Member
Members
Forum Posts: 88
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Thank you for clarification!

May 24, 2024
12:14, EEST
Avatar
rocket science
Member
Members
Forum Posts: 88
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Is there any possibility to create such a Variable with a null NodeId as DataType (just for testing porposes) using the Prosys Server SDK?

May 24, 2024
12:34, EEST
Avatar
Matti Siponen
Moderator
Members

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

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.

June 4, 2024
10:50, EEST
Avatar
rocket science
Member
Members
Forum Posts: 88
Member Since:
March 16, 2017
sp_UserOfflineSmall Offline

Thanks!

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
33 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: 726

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7, franciscagrimwad, adult_gallery

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

Administrators: admin: 1