How to obtain multiple target references | OPC UA Implementation: Stacks, Tools, and Samples | Forum

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
How to obtain multiple target references
Avatar
kimr.volz@ge.com
New Member
Members
Forum Posts: 1
Member Since:
09/04/2018
sp_UserOfflineSmall Offline
1
01/03/2019 - 15:06
sp_Permalink sp_Print

I'm trying to get all target references of a node:
System
  |
  --> Base
         |
         --> ProcMod
         |
         --> Relay

UaReferenceLists* pMyList = pBaseObj->getUaReferenceLists();

// Get the SOURCE pointer - This Works!!!
UaNode* pS1 = pMyList->pSourceNodes()->pSourceNode();
OpcUa_UInt32 s1Id = pS1->nodeId().identifierNumeric();
OpcUa_UInt32 sysId = pSysObj->nodeId().identifierNumeric();
if (s1Id == sysId)
      cout << "you have figure this out1" << endl;//<--- hits This line of code

// I did NOT expect this to work. However, when I look in the debugger,
// I don't see any way to get to the First node (ProcMod)
// I only see the "LastTargetNode"
// Get the Targets information
UaNode* pT1 = pMyList->pTargetNodes()->pTargetNode();
OpcUa_UInt32 t1Id = pT1->nodeId().identifierNumeric();
OpcUa_UInt32 procId = pProcMod->nodeId().identifierNumeric();

if (t1Id == procId)
cout << "you have figure this out2" << endl;

// How do you get the first node, Nth node,
// I can figure out the "last node" 🙂

Avatar
Randy Armstrong
Admin
Forum Posts: 199
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
01/08/2019 - 04:38
sp_Permalink sp_Print sp_EditHistory

This question should posted on the Unified Automation forum since you are using their SDK.

Forum Timezone: America/Phoenix
Most Users Ever Online: 143
Currently Online:
7
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Newest Members:
gertolsaser@gmail.com
Forum Stats:
Groups: 2
Forums: 9
Topics: 512
Posts: 1435

 

Member Stats:
Guest Posters: 1
Members: 93363
Moderators: 10
Admins: 3
Administrators: michael.bryant@opcfoundation.org, thomas.burke@opcfoundation.org, Randy Armstrong
Moderators: matthias.damm@ascolab.com, s.hoppe@beckhoff.com, paul.hunkar@dsinteroperability.com, jouni.aro@prosys.fi, tim.fortin@honeywell.com, Jim.Luth@Schneider-Electric.com, Karl-Heinz Deiretsbacher, stefan.hoppe@opcfoundation.org, alexander.allmendinger@opcfoundation.org, Karl Deiretsbacher