#include <continuationpoint.h>
Public Member Functions | |
BrowseContext (OpcUa_ViewDescription *pView, OpcUa_NodeId *pNodeToBrowse, OpcUa_UInt32 uMaxResultsToReturn, OpcUa_BrowseDirection BrowseDirection, OpcUa_NodeId *pReferenceTypeId, OpcUa_Boolean bIncludeSubtype, OpcUa_UInt32 uNodeClassMask, OpcUa_UInt32 uResultMask) | |
virtual | ~BrowseContext () |
OpcUa_ViewDescription * | pView () const |
OpcUa_NodeId * | pNodeToBrowse () const |
OpcUa_UInt32 | uMaxResultsToReturn () const |
OpcUa_BrowseDirection | BrowseDirection () const |
OpcUa_NodeId * | pReferenceTypeId () const |
OpcUa_Boolean | bIncludeSubtype () const |
OpcUa_UInt32 | uNodeClassMask () const |
OpcUa_UInt32 | uResultMask () const |
void | setResultMask (OpcUa_UInt32 uResultMask) |
OpcUa_Boolean | isFirstBrowse () const |
void | setUserData (ContinuationPointUserDataBase *pContinuationPointUserDataBase) |
ContinuationPointUserDataBase * | detachUserData () |
OpcUa_Byte | CPCounter () const |
void | setCPCounter (OpcUa_Byte CPCounter) |
OpcUa_Boolean | isLastBrowse () const |
This class provides all browse settings and the continuation point handling. The class provides all settings for a browse call like node to brows and the browse filter settings. It keeps also the settings and the continuation point if not all results can be returned in one browse result. The same object is provided in a second browse call triggered through a BrowseNext service call. In this case the continuation point is provided in addition to the browse settings.
setUserData is used to store the implementation specific context. You must derive your data handling class from ContinuationPointUserDataBase.
isFirstBrowse is used to check if it is a first browse or a browse next.
detachUserData is used to get the stored continuation point data.
The SDK handles the release of continuation point data if BrowseNext is not called or just called to release the continuation point.
BrowseContext::BrowseContext | ( | OpcUa_ViewDescription * | pView, |
OpcUa_NodeId * | pNodeToBrowse, | ||
OpcUa_UInt32 | uMaxResultsToReturn, | ||
OpcUa_BrowseDirection | BrowseDirection, | ||
OpcUa_NodeId * | pReferenceTypeId, | ||
OpcUa_Boolean | bIncludeSubtype, | ||
OpcUa_UInt32 | uNodeClassMask, | ||
OpcUa_UInt32 | uResultMask | ||
) |
construction
construction
pView | The View context used for the browse. |
pNodeToBrowse | The actual Node to browse. |
uMaxResultsToReturn | The maximum number of results to return. |
BrowseDirection | Direction of the browse from the node to browse (Inverse / Forward). |
pReferenceTypeId | NodeId of the reference type to follow. |
bIncludeSubtype | Flag indicating if sub types of the reference type should be returned. |
uNodeClassMask | The node class mask used as filter. |
uResultMask | The result mask used to filter the requested data returned for a result. |
BrowseContext::~BrowseContext | ( | ) | [virtual] |
destruction
OpcUa_Boolean BrowseContext::bIncludeSubtype | ( | ) | const [inline] |
Returns the flag indicationg if subtypes of the requested reference type should be included in the browse result.
OpcUa_BrowseDirection BrowseContext::BrowseDirection | ( | ) | const [inline] |
Returns the browse direction for the browse call.
Options are:
OpcUa_BrowseDirection_Forward
OpcUa_BrowseDirection_Inverse
OpcUa_BrowseDirection_Both
OpcUa_Byte BrowseContext::CPCounter | ( | ) | const [inline] |
This member is used for management of the continuation point in the SDK
ContinuationPointUserDataBase * BrowseContext::detachUserData | ( | ) |
Detach user data to continue browse. The user of the SDK is responsible to delete the user data after detach is called.
Detach user data to continue browse.
OpcUa_Boolean BrowseContext::isFirstBrowse | ( | ) | const [inline] |
Can be used to check if it is the first browse with this context In the case of OpcUa_True, it is the first browse call with this browse context. In the case of OpcUa_False, it is a browse next call with a continuation point.
OpcUa_Boolean BrowseContext::isLastBrowse | ( | ) | const [inline] |
Flag that tells the SDK if it was the last browse call and all references are returned. The flag is set by the methods setUserData (OpcUa_False) since this indicates that a continuation point is necessary or by detachUserData (OpcUa_True) since the continuation point is handled in a next browse. The default value is OpcUa_True.
OpcUa_NodeId* BrowseContext::pNodeToBrowse | ( | ) | const [inline] |
Returns the node id of the node to browse.
OpcUa_NodeId* BrowseContext::pReferenceTypeId | ( | ) | const [inline] |
Returns the node id of the requested reference type or its subtypes if bIncludeSubtype is set.
OpcUa_ViewDescription* BrowseContext::pView | ( | ) | const [inline] |
Returns the OPC UA View context for the browse. If the view is not set, the whole address space is browsed.
void BrowseContext::setCPCounter | ( | OpcUa_Byte | CPCounter ) | [inline] |
This member is used for management of the continuation point in the SDK
CPCounter | This Variable is set to the Value of the Membervariable. |
void BrowseContext::setResultMask | ( | OpcUa_UInt32 | uResultMask ) | [inline] |
Allows setting of the result mask.
void BrowseContext::setUserData | ( | ContinuationPointUserDataBase * | pContinuationPointUserDataBase ) |
Set user data if not all nodes can be returned to prepare Continuation Point for next browse. The data handling class must be derived from ContinuationPointUserDataBase. The SDK handles the release of continuation point data if BrowseNext is not called or just called to release the continuation point.
Set user data if not all nodes can be returned to prepare Continuation Point for next browse.
pContinuationPointUserDataBase | used to check if not all nodes can be returned to prepare Continuation Point for next browse. |
OpcUa_UInt32 BrowseContext::uMaxResultsToReturn | ( | ) | const [inline] |
Returns the maximum number of browse results to return. If the maximum is exeeded, a continuation point needs to be created.
OpcUa_UInt32 BrowseContext::uNodeClassMask | ( | ) | const [inline] |
Returns the node class filter mask identifing the node classes to include in the browse result.
Bit mask containing the following options:
OpcUa_NodeClass_Object = 1
OpcUa_NodeClass_Variable = 2
OpcUa_NodeClass_Method = 4
OpcUa_NodeClass_ObjectType = 8
OpcUa_NodeClass_VariableType = 16
OpcUa_NodeClass_ReferenceType = 32
OpcUa_NodeClass_DataType = 64
OpcUa_NodeClass_View = 128
If set to zero, all node classes are returned.
OpcUa_UInt32 BrowseContext::uResultMask | ( | ) | const [inline] |
Returns the result filter mask identifing the information returned for each node in the browse result.
Bit mask containing the following options:
OpcUa_BrowseResultMask_None = 0
OpcUa_BrowseResultMask_ReferenceTypeId = 1
OpcUa_BrowseResultMask_IsForward = 2
OpcUa_BrowseResultMask_NodeClass = 4
OpcUa_BrowseResultMask_BrowseName = 8
OpcUa_BrowseResultMask_DisplayName = 16
OpcUa_BrowseResultMask_TypeDefinition = 32