UA Server SDK C++ Bundle  1.4.0.258
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
BrowseContext Class Reference

This class provides all browse settings and the continuation point handling. More...

#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)
 construction More...
 
virtual ~BrowseContext ()
 destruction
 
OpcUa_ViewDescription * pView () const
 Returns the OPC UA View context for the browse. More...
 
OpcUa_NodeId * pNodeToBrowse () const
 Returns the node id of the node to browse.
 
OpcUa_UInt32 uMaxResultsToReturn () const
 Returns the maximum number of browse results to return. More...
 
void setMaxResultsToReturn (OpcUa_UInt32 uMaxResultsToReturn)
 Allows setting of the maximum number of results to return.
 
OpcUa_BrowseDirection BrowseDirection () const
 Returns the browse direction for the browse call. More...
 
OpcUa_NodeId * pReferenceTypeId () const
 Returns the node id of the requested reference type or its subtypes if bIncludeSubtype is set. More...
 
OpcUa_Boolean bIncludeSubtype () const
 Returns the flag indicating if subtypes of the requested reference type should be included in the browse result. More...
 
OpcUa_UInt32 uNodeClassMask () const
 Returns the node class filter mask identifying the node classes to include in the browse result. More...
 
OpcUa_UInt32 uResultMask () const
 Returns the result filter mask identifing the information returned for each node in the browse result. More...
 
void setResultMask (OpcUa_UInt32 uResultMask)
 Allows setting of the result mask.
 
OpcUa_Boolean isFirstBrowse () const
 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. More...
 
void setUserData (ContinuationPointUserDataBase *pContinuationPointUserDataBase)
 Set user data if not all nodes can be returned to prepare Continuation Point for next browse. More...
 
ContinuationPointUserDataBasedetachUserData ()
 Detach user data to continue browse. More...
 
OpcUa_Byte CPCounter () const
 This member is used for management of the continuation point in the SDK. More...
 
void setCPCounter (OpcUa_Byte CPCounter)
 This member is used for management of the continuation point in the SDK. More...
 
OpcUa_Boolean isLastBrowse () const
 Flag that tells the SDK if it was the last browse call and all references are returned. More...
 
void setBrowseCallback (BrowseCallback *pBrowseCallback)
 
BrowseCallback * pBrowseCallback () const
 

Detailed Description

This class provides all browse settings and the continuation point handling.

The class provides all settings for a browse call like node to browse 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.

Constructor & Destructor Documentation

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

Parameters
pViewThe View context used for the browse.
pNodeToBrowseThe actual Node to browse.
uMaxResultsToReturnThe maximum number of results to return.
BrowseDirectionDirection of the browse from the node to browse (Inverse / Forward).
pReferenceTypeIdNodeId of the reference type to follow.
bIncludeSubtypeFlag indicating if sub types of the reference type should be returned.
uNodeClassMaskThe node class mask used as filter.
uResultMaskThe result mask used to filter the requested data returned for a result.

Member Function Documentation

OpcUa_Boolean BrowseContext::bIncludeSubtype ( ) const
inline

Returns the flag indicating if subtypes of the requested reference type should be included in the browse result.

See Also
pReferenceTypeId
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.

Returns
the counted 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.

Returns
a pointer to the continuation point user data base.
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.

Returns
a bool value to check whether this was the first browse with the current context.
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.

Returns
a value used to recognize whether this was the last browse call or not.
OpcUa_NodeId* BrowseContext::pReferenceTypeId ( ) const
inline

Returns the node id of the requested reference type or its subtypes if bIncludeSubtype is set.

See Also
bIncludeSubtype
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.

Parameters
CPCounterThis Variable is set to the Value of the member variable.
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.

Parameters
pContinuationPointUserDataBaseused 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 exceeded, a continuation point needs to be created.

See Also
setUserData
OpcUa_UInt32 BrowseContext::uNodeClassMask ( ) const
inline

Returns the node class filter mask identifying 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


The documentation for this class was generated from the following files: