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
Simple browse method return two references
November 28, 2013
13:22, EET
Avatar
vonGohren
Member
Members
Forum Posts: 25
Member Since:
October 17, 2013
sp_UserOfflineSmall Offline

Hi, im trying to browse a nodeId after an object i created.
I created it as you can see in this gist: https://gist.github.com/Snorlock/7691718

But for some reason it returns two objects. I have tried to do the more advanced browse with BrowseDirection and all and I have figuerd out that it return is one object which has NodeClass.Object, and the second oen which is identical in every means except for getReferenceTypeId(), is a NodeClass.Unspecified.

Are there any reason for this? Why does it create duplicate objects?

November 28, 2013
15:11, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

You should use the Prosys OPC UA Java Client to help you check what your server contains. It will be then easier to know what to expect from your client application.

I guess that you are looking at fartSensorObjectFolder, which has two forward references, one HasTypeDefinition (since you create it as FolderType) and one HasComponent reference.

November 28, 2013
15:30, EET
Avatar
vonGohren
Member
Members
Forum Posts: 25
Member Since:
October 17, 2013
sp_UserOfflineSmall Offline

Im using the client and trying to look at what exists. But it doesnt match what I program myself, and what the client is getting.
Im mapping my nodeIds to a specific mapper to properties and addressSpaces and yes the folder is the one NodeID im browsing.

But the client provided only returns one refrence in the tree, and not two like mine.
It is not a type I think, because the type registered and the component registers has two different NodeIDs, and when Im looking up on the FartSensor NodeId: final NodeId fartSensorId = new NodeId(ns, “FartSensor”);

I get two objects as i mentnion

16:28:05,527 [Thread-12] DEBUG OPCUAClient:125 – TRYING TO GET REFERENCE SPACES
16:28:05,543 [Thread-12] DEBUG OPCUAClient:129 – TESET REFERENCE 2:FartSensor
16:28:05,543 [Thread-12] DEBUG OPCUAClient:130 – TESET REFERENCE ns=2;s=FartSensor
16:28:05,543 [Thread-12] DEBUG OPCUAClient:131 – TESET REFERENCE i=47
16:28:05,544 [Thread-12] DEBUG OPCUAClient:132 – TESET REFERENCE class org.opcfoundation.ua.core.ReferenceDescription
16:28:05,544 [Thread-12] DEBUG OPCUAClient:133 – TESET REFERENCE i=58
16:28:05,544 [Thread-12] DEBUG OPCUAClient:134 – TESET REFERENCE String
16:28:05,544 [Thread-12] DEBUG OPCUAClient:135 – ——————————————–
16:28:05,544 [Thread-12] DEBUG OPCUAClient:129 – TESET REFERENCE 2:FartSensor
16:28:05,544 [Thread-12] DEBUG OPCUAClient:130 – TESET REFERENCE ns=2;s=FartSensor
16:28:05,544 [Thread-12] DEBUG OPCUAClient:131 – TESET REFERENCE i=48
16:28:05,544 [Thread-12] DEBUG OPCUAClient:132 – TESET REFERENCE class org.opcfoundation.ua.core.ReferenceDescription
16:28:05,544 [Thread-12] DEBUG OPCUAClient:133 – TESET REFERENCE i=58
16:28:05,545 [Thread-12] DEBUG OPCUAClient:134 – TESET REFERENCE String
16:28:05,545 [Thread-12] DEBUG OPCUAClient:135 – ——————————————–

November 28, 2013
15:35, EET
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

i=47 is HasComponent and i=48 is HasNotifier. You can look these up from the Identifiers unit. Also see SampleConsoleClient.referenceToString().

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
25 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 684

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule, rashadbrownrigg, christi10l, ahamad1, Flores Frederick, ellenmoss

Moderators: Jouni Aro: 1009, 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