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: 1026
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: 1026
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: 1919

Currently Online:
27 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: 1525

Posts: 6456

Newest Members:

forrestdilke5, ernestoportus31, martin123, rickie5305, shaylamaggard4, rickyjuarez140, jonathonmcintyre, fannielima, kristiewinkle8, rust

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

Administrators: admin: 1