browse the adressspace with continuationPoint

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
sebastien_a
Sr. Member
Sr. Member
Posts: 12
Joined: 13 Apr 2012, 10:23

browse the adressspace with continuationPoint

Post by sebastien_a »

Hi Unified Automation team.

I use an AdressSpace with many nodes (typically tens of thousands). When I start the server, I should make Pre-treatment (server side, not with an OPC client). Thus, I should browse the adressspace and sometimes the browse(...) method return more than 1000 results and I should use the continuationPoint but I don't know how to use it.

This is the code I try to make:

Code: Select all


UaReferenceDescriptions references;
ContinuationPointWrapper continuationPoint;
bool isContinuationpointSet = true;
while(isContinuationpointSet){
    pNodeManagerRoot->browse(tempStartingNode, OpcUa_True, OpcUaId_HasTypeDefinition, 0, continuationPoint, references);
    //references.length() is 0 here in the second iteration... 
    //what should I do to browse through the next 1000 nodes?
 
    isContinuationpointSet = continuationPoint.iscontinuationPointset();
 
    for (unsigned int i = 0; i < references.length(); i++) {
        //My treatment here
    }
}


I've noticed that the UaSession client class use the browseNext(...) method to browse through the next 1000 nodes but I can't find a similar method in the Nodemanager class.

Or maybe could you explain instead how we can set a reference list size higher than 1000.

Thanks in advance for your help

Sébastien

User avatar
Support Team
Hero Member
Hero Member
Posts: 3072
Joined: 18 Mar 2011, 15:09

Re:browse the adressspace with continuationPoint

Post by Support Team »

Hi Sébastien,

There is an internal interface ServerManager provided by the SDK. This interface defines methods to browse, read, write, call a method or to create monitored items for data or event monitoring. If you want to implement an internal client inside the server you should use this interface instead of the NodeManager / IOManager. For the browse the signature of the method is identical.

The NodeManager implements the services Browse and BrowseNext with the same method by storing the browse context in the continuation point. Therefore your code is right.

There is an issue in the SDK for the internal browse helper function if a continuation point is needed.

If you have a license, please contact support@unifiedautomation.com to get a patch.
Otherwise the issue will be fixed with the next available version.

Best Regards,
Unified Automation Support Team
Best regards
Unified Automation Support Team

Post Reply