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
SampleConsoleServer: Instance of MyEvent is in namespace 0
March 1, 2024
14:54, EET
Avatar
Manfred Hausmann
Member
Members
Forum Posts: 17
Member Since:
September 21, 2018
sp_UserOfflineSmall Offline

Hi

There is a difference between SDK 4.10.6-24 and 5.1.0-116 regarding the namespace of instances.
SDK 4.10.6-24: MyEventType ev = createEvent(MyEventType.class); the event was in the namespace of MyNodeManager; ev.getNodeManager() returned MyNodeManager
SDK 5.1.0-116: MyEventType ev = createEvent(MyEventType.class); the event is in the server namespace; ev.getNodeManager() returns NodeMangerRoot

Is this an intended change?
In the change history of version 5.1.0-116 I cannot find any reference to this.

Best regards,
Manfred

March 1, 2024
16:20, EET
Avatar
Matti Siponen
Moderator
Members

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

Hello,

From 5.x.x onwards, the NodeManager of a created Node is selected based on its NodeId. For one-shot Events, the NodeId.NULL is used, which is ns=0;i=0 to be exact, for which the RootNodeManager is selected.

March 1, 2024
18:32, EET
Avatar
Manfred Hausmann
Member
Members
Forum Posts: 17
Member Since:
September 21, 2018
sp_UserOfflineSmall Offline

Hi Matti

Thanks for your swift reply.
The explanation makes sense to me.

The sample server that comes with the SDK is therefore no longer able to set MyVariable or MyProperty because the methods MyEventType.setMyVariable(…) and also MyEventType.setMyProperty(…) do not find the components MyVariable resp. MyProperty via browse name. This is because MyEventType is created in MyNodeManager.NAMESPACE. You might want to correct this problem with the next release.

Best regards,
Manfred

March 4, 2024
11:05, EET
Avatar
Matti Siponen
Moderator
Members

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

Hello,

I can confirm that this bug exists in the current release of the SDK. Thank you for reporting it to us. It will be fixed in the next release of the SDK.

You can fix this by modifying the getMyPropertyNode and getMyVariableNode methods of MyEventType class. They’re relying on the getNodeManager().getNamespaceIndex() to get the NamespaceIndex for the QualifiedName. Calling that returns 0, which is incorrect, so you can replace the getNodeManager().getNamespaceIndex() calls with a constant value of 2, which is the NamespaceIndex of MyNodeManager.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 682

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1