Login  •  Register


There is something wrong with UaSession::browseNext

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

There is something wrong with UaSession::browseNext

Postby qingmeng » 18 Nov 2019, 04:59

Hi Dear,

I just use C++ SDK 1.7.0.

And I create the UA client by this, and I fond that there is something wrong with UaSession::browseNext.
My code just like below;
===========================================================================
UaStatus status;
UaByteString continuationPoint;
UaReferenceDescriptions referenceDescriptions;
ServiceSettings serviceSettings;
UaClientSdk::BrowseContext browseContext;

browseContext.browseDirection = OpcUa_BrowseDirection_Forward;
browseContext.includeSubtype = true;
browseContext.referenceTypeId = OpcUaId_HierarchicalReferences;

status = m_pSession->browse(
serviceSettings,
startingNode,
browseContext,
continuationPoint,
referenceDescriptions);

while (continuationPoint.length() > 0 && status.isGood())
{
UaReferenceDescriptions resultsContinuation;
status = m_pSession->browseNext(
serviceSettings,
OpcUa_False,
continuationPoint,
resultsContinuation);
}
===================================================================
For the method "browseNext",
some times, the status will be "Bad_ContinuationPointInvalid" at first time call, then I can only get 50 nodes by browse;
some times, the status will be "Bad_ContinuationPointInvalid" at second time call, then I can 100 nodes (browseNext can get another 50 nodes);
some times, the status will be "Bad_ContinuationPointInvalid" at third time call, then I can 150 nodes (browseNext can get another 100 nodes);
.........

and I add the trace file.
only see that

11:47:29.066|4|2D38* DONE OpcUa_ClientApi_BrowseNext [ret=0x0,status=0x0]
11:47:29.066|6|2D38* <-- UaSession::browseNext [status=0x804a0000]
11:47:34.640|4|35C0* CALL OpcUa_ClientApi_Read [Session=1] - watchdog read


So what should I do for this?


Thanks for your help.
qingmeng
Full Member
Full Member
 
Posts: 7
Joined: 21 Nov 2018, 11:05

Re: There is something wrong with UaSession::browseNext

Postby PeterParker » 18 Nov 2019, 12:43

Hello,

Try with the same
Code: Select all
UaReferenceDescriptions referenceDescriptions


Code: Select all
status = m_pSession->browseNext(
serviceSettings,
OpcUa_False,
continuationPoint,
referenceDescriptions);
PeterParker
Jr. Member
Jr. Member
 
Posts: 1
Joined: 18 Nov 2019, 12:40


Return to C++ based OPC UA SDK

Who is online

Users browsing this forum: No registered users and 0 guests

cron