High Performance OPC UA Server SDK  1.2.0.193
ua_queryfirstrequest Struct Reference

Asynchronously queries the address space. More...

#include <queryfirstrequest.h>

Data Fields

struct ua_viewdescription view
 Specifies a view and temporal context to a Server.
 
struct ua_nodetypedescriptionnode_types
 The node type description.
 
int32_t num_node_types
 Number of elements in ua_queryfirstrequest::node_types.
 
struct ua_contentfilter filter
 Resulting nodes shall be limited to the nodes matching the criteria defined by the filter. More...
 
uint32_t max_data_sets_to_return
 The number of QueryDataSets that the Client wants the Server to return in the response and on each subsequent continuation call response. More...
 
uint32_t max_references_to_return
 The number of references that the Client wants the Server to return in the response for each QueryDataSet and on each subsequent continuation call response. More...
 

Related Functions

void ua_queryfirstrequest_init (struct ua_queryfirstrequest *t)
 Initialize an ua_queryfirstrequest struct with a valid value. More...
 
void ua_queryfirstrequest_clear (struct ua_queryfirstrequest *t)
 Clear all resources alloctated in an ua_queryfirstrequest struct. More...
 
int ua_queryfirstrequest_compare (const struct ua_queryfirstrequest *a, const struct ua_queryfirstrequest *b)
 Compare two ua_queryfirstrequest structs. More...
 
int ua_queryfirstrequest_copy (struct ua_queryfirstrequest *dst, const struct ua_queryfirstrequest *src)
 Create a copy of a ua_queryfirstrequest struct. More...
 
static int ua_queryfirstrequest_resize_node_types_array (struct ua_queryfirstrequest *val, int32_t new_len)
 Resize the node_types array of a ua_queryfirstrequest struct. More...
 

Detailed Description

Asynchronously queries the address space.

This Service is used to issue a query request to the Server. The complexity of the query can range from very simple to highly sophisticated. The query can simply request data from instances of a TypeDefinitionNode or TypeDefinitionNode subject to restrictions specified by the filter. On the other hand, the query can request data from instances of related node types by specifying a RelativePath from an originating TypeDefinitionNode.In the filter, a separate set of paths can be constructed for limiting the instances that supply data. A filtering path can include multiple RelatedTo operators to define a multi-hop path between source instances and target instances.

The Client provides an array of NodeTypeDescription which specify the NodeId of a TypeDefinitionNode and selects what attributes are to be returned in the response. A client can also provide a set of RelativePaths through the type system starting from an originating TypeDefinitionNode. Using these paths, the client selects a set of attributes from nodes that are related to instances of the originating TypeDefinitionNode. Additionally, the Client can request the Server return instances of subtypes of TypeDefinitionNodes. If a selected Attribute does not exist in a TypeDefinitionNode but does exist in a subtype, it is assumed to have a null value in the TypeDefinitionNode in question. Therefore, this does not constitute an error condition and a null value is returned for the Attribute.

The Client can use the filter parameter to limit the result set by restricting attributes and properties to certain values. Another way the Client can use a filter to limit the result set is by specifying how instances should be related, using RelatedTo operators. In this case, if an instance at the top of the RelatedTo path cannot be followed to the bottom of the path via specified hops, no QueryDataSets are returned for the starting instance or any of the intermediate instances.

When querying for related instances in the RelativePath, the Client can optionally ask for references. A reference is requested via a RelativePath that only includes a ReferenceType. If all references are desired than the root ReferenceType is listed. These references are returned as part of the QueryDataSets.

Query services allow a special handling of the targetName field in the RelativePath. In several query use cases, a type NodeId is necessary in the path instead of a QualifiedName. Therefore, the Client is allowed to specify a NodeId in the QualifiedName. This is done by setting the namespaceIndex of the targetName to zero and the name part of the targetName to the XML representation of the NodeId. When matching instances are returned as the target node, the target node shall be an instance of the specified type or subtype of the specified type.

Friends And Related Function Documentation

void ua_queryfirstrequest_clear ( struct ua_queryfirstrequest t)
related

Clear all resources alloctated in an ua_queryfirstrequest struct.

Frees allocated memory like arrays and resets numeric values. The ua_queryfirstrequest struct itself is not freed and must be freed by the caller if required. This function always succeeds for a valid ua_queryfirstrequest struct, that was validly decoded or initilized by ua_queryfirstrequest_init.

int ua_queryfirstrequest_compare ( const struct ua_queryfirstrequest a,
const struct ua_queryfirstrequest b 
)
related

Compare two ua_queryfirstrequest structs.

Compares the content of the ua_queryfirstrequest struct a to the content of the ua_queryfirstrequest struct b. If a is smaller than b, an integer less than zero is returned, if a is bigger than b, an integer greater than zero is returned. If both structs are equal zero is returned.

This function creates a total order on ua_queryfirstrequest structs, so it is well suited to not only determine equality, but also sort multiple instances of this struct.

int ua_queryfirstrequest_copy ( struct ua_queryfirstrequest dst,
const struct ua_queryfirstrequest src 
)
related

Create a copy of a ua_queryfirstrequest struct.

Copy all fields from struct ua_queryfirstrequest src to dst. Creates a deep copy so all content is recusively copied and both src and dst can be used and must be freed separately.

dst is not cleared before the copy operation, so it must not have any allocated data. It may or may not be initilized by the caller before copy.

Returns
Zero on success or ua_statuscode on failure.
void ua_queryfirstrequest_init ( struct ua_queryfirstrequest t)
related

Initialize an ua_queryfirstrequest struct with a valid value.

After initialization the fields of the struct are set to valid and consistent values and can safley be accessed. An initialized ua_queryfirstrequest struct can also be passed to ua_queryfirstrequest_clear. This function will always succeed as long as an ua_queryfirstrequest struct is passed to it.

static int ua_queryfirstrequest_resize_node_types_array ( struct ua_queryfirstrequest val,
int32_t  new_len 
)
related

Resize the node_types array of a ua_queryfirstrequest struct.

Depending on new_len and the current size of the array, the array will be created, increased, decreased or deleted. In case array members are removed these are cleared properly, new array members are initialized with zero.

Parameters
new_lenNew length of the node_types array in number of members.
Returns
Zero on success or ua_statuscode on failure.

Field Documentation

filter

Resulting nodes shall be limited to the nodes matching the criteria defined by the filter.

Resulting nodes shall be limited to the nodes matching the criteria defined by the filter.

max_data_sets_to_return

The number of QueryDataSets that the Client wants the Server to return in the response and on each subsequent continuation call response.

The Server is allowed to further limit the response, but shall not exceed this limit. A value of 0 indicates that the Client is imposing no limitation.

max_references_to_return

The number of references that the Client wants the Server to return in the response for each QueryDataSet and on each subsequent continuation call response.

The Server is allowed to further limit the response, but shall not exceed this limit.

A value of 0 indicates that the Client is imposing no limitation.

For example: In a result, 4 Nodes are being returned, but each has 100 References. If this limit was set to 50, only the first 50 References for each Node would be returned on the initial call, and a continuation point would be set indicating additional data.


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