C++ Based OPC UA Client/Server/PubSub SDK
1.7.9.586
|
This class provides all query settings and the continuation point handling. More...
#include <continuationpoint.h>
Public Member Functions | |
QueryContext (OpcUa_ViewDescription *pView, OpcUa_Int32 noOfNodeTypes, OpcUa_NodeTypeDescription *pNodeTypes, OpcUa_ContentFilter *pFilter, OpcUa_UInt32 uMaxDataSetsToReturn, OpcUa_UInt32 uMaxReferencesToReturn) | |
Creates a QueryContext object initialized with the passed in query parameters. More... | |
virtual | ~QueryContext () |
Destroys the QueryContext object. | |
OpcUa_ViewDescription * | pView () const |
Returns the OPC UA View context for the query. More... | |
OpcUa_Int32 | noOfNodeTypes () const |
Returns the number of NodeType entries. More... | |
OpcUa_NodeTypeDescription * | pNodeTypes () const |
Returns the list of NodeTypes. | |
OpcUa_ContentFilter * | pFilter () const |
Returns the filter for the query results. | |
OpcUa_UInt32 | uMaxDataSetsToReturn () const |
Returns the maximum number of data sets to return. More... | |
OpcUa_UInt32 | uMaxReferencesToReturn () const |
Returns the maximum number of references to return. More... | |
OpcUa_Boolean | isFirstQuery () const |
Can be used to check whether it is the first query with this context. More... | |
void | setUserData (ContinuationPointUserDataBase *pContinuationPointUserDataBase) |
Set user data to prepare a Continuation Point for the next query if not all nodes can be returned. More... | |
ContinuationPointUserDataBase * | detachUserData () |
Detach user data to continue query. More... | |
OpcUa_Boolean | isLastQuery () const |
Flag telling the SDK whether it was the last query call and all references are returned. More... | |
This class provides all query settings and the continuation point handling.
The class provides all settings for a query call, like node types and filter settings. It also keeps the settings and the continuation point if not all results can be returned in a single query result. The same object is provided in a second query call triggered through a QueryNext service call. In this case, the continuation point is provided in addition to the query settings.
If the number of query results exeeds the uMaxDataSetsToReturn, uMaxReferencesToReturn or a server internal limit, a continuation point is necessary and setUserData is used to store the implementation specific continuation point user data. You must derive your data handling class from ContinuationPointUserDataBase.
isFirstQuery is used to check if it is a first query or a query next.
detachUserData is used to get the stored continuation point data.
The SDK handles the release of continuation point data if QueryNext is not called or just called to release the continuation point.
QueryContext::QueryContext | ( | OpcUa_ViewDescription * | pView, |
OpcUa_Int32 | noOfNodeTypes, | ||
OpcUa_NodeTypeDescription * | pNodeTypes, | ||
OpcUa_ContentFilter * | pFilter, | ||
OpcUa_UInt32 | uMaxDataSetsToReturn, | ||
OpcUa_UInt32 | uMaxReferencesToReturn | ||
) |
Creates a QueryContext object initialized with the passed in query parameters.
pView | The View context used for the browse. |
noOfNodeTypes | The number of NodeType entries. |
pNodeTypes | The list of NodeTypes. |
pFilter | The filter for the query results. |
uMaxDataSetsToReturn | The maximum number of data sets to return. |
uMaxReferencesToReturn | The maximum number of references to return. |
ContinuationPointUserDataBase * QueryContext::detachUserData | ( | ) |
Detach user data to continue query.
The user of the SDK is responsible to delete the user data after detach is called.
|
inline |
Can be used to check whether it is the first query with this context.
In the case of OpcUa_True, it is the first query call with this query context. In the case of OpcUa_False, it is a query next call with a continuation point.
|
inline |
Flag telling the SDK whether it was the last query call and all references are returned.
The flag is set by the method 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 query. The default value is OpcUa_True.
|
inline |
Returns the number of NodeType entries.
|
inline |
Returns the OPC UA View context for the query.
If the view is not set, the whole address space is queried.
void QueryContext::setUserData | ( | ContinuationPointUserDataBase * | pContinuationPointUserDataBase | ) |
Set user data to prepare a Continuation Point for the next query if not all nodes can be returned.
The data handling class must be derived from ContinuationPointUserDataBase. The SDK handles the release of continuation point data if QueryNext is not called or just called to release the continuation point.
pContinuationPointUserDataBase | used to check whether not all nodes can be returned to prepare a Continuation Point for the next query. |
|
inline |
Returns the maximum number of data sets to return.
If the maximum is exceeded, a continuation point needs to be created.
|
inline |
Returns the maximum number of references to return.
If the maximum is exceeded, a continuation point needs to be created.