09/04/2018
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” 🙂
1 Guest(s)