> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DVS::IQuery Class Reference

The query interface for the DVS Reader API.

`#include <dvs_query_interface.h>`

## Public Member Functions

| Type | Name |
| - | - |
| | **IQuery** ()=default default |
|  virtual | **\~IQuery** ()=default default |
| | **IQuery** ([IQuery](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_query.md) &&)=default default |
| [IQuery](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_query.md) & | **operator=** ([IQuery](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_query.md) &&)=default default |
| | **IQuery** (const [IQuery](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_query.md) &)=default support copying |
| [IQuery](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_query.md) & | **operator=** (const [IQuery](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_query.md) &)=default default |
| virtual void | [release](#a257f79d7de21658c07dc602dfa6bbf34) ()=0 Release the memory of the query. |
| virtual void | [set\_logger](#ab6ce54c68281ea1676af650ebc5716a0) ([DVS::ILogger](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_logger.md) \*logger)=0 Set the logger object. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [add\_uri](#ae1b22e6a7c4f0c76ade9105f30d1bc2d) (const char \*uri)=0 Add a URI for the reader API to iterate over. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_servers](#a05dc766c5d6789ca3dcbab72cf4ca4e9) (const char \*uri, uint32\_t \&num\_servers)=0 Get the num servers object. |
| virtual void | [set\_server\_mod](#acfefd0ed3856da6599599f15109ece9a) (uint32\_t server\_num, uint32\_t server\_mod)=0 Set a filter based on the server number and a modulus. |
| virtual [DVS::IQuery](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_query.md) \* | [filter](#a8a810da09342690eb371b324079f206e) (const char \*filter)=0 The filter method will allocate a new chained query with the passed in filter appended to it. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_ranks](#ab09b8c2d9204f66e88b1ac56b3e0e40d) (uint32\_t \&num\_ranks)=0 Get the number of ranks for this filtered query. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_ranks](#a469f214b6c9976e81d93510410c00b70) (uint32\_t \*ranks)=0 Get the unique ranks for this filtered query. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_chunks\_per\_rank](#aaae39d1931433b35162c3b37dc82c4f1) (uint32\_t \&num\_chunks)=0 Get the number of chunks for each rank. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_chunks\_per\_rank](#a4d1a83603bec00bdebc8430a5c48e742) (uint32\_t \*chunks)=0 Get an array of the number of chunks for every rank for this query. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_datasets](#a48165c3147ae5d084577b9b8acb05638) (uint32\_t \&num\_datasets)=0 Get the number of datasets objects. |
| virtual [DVS::IDataset](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_dataset.md) \* | [get\_dataset](#a574de84a9a4d7a5e3e777a35b1b6c2bc) (uint32\_t index)=0 Get the dataset object. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_parts](#a2dab5f63a6c619a1ee6d3138679c9eac) (uint32\_t \&num\_parts)=0 Get the number of parts for this query. |
| virtual const [DVS::IObject](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_object.md) \* | [get\_part](#a53ec579c40465ee2aebf87ac60dc90fb) (uint32\_t index)=0 Get the part based on the index. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_plots](#ab2f64cb2c3a336c0d86fb0b3799c13e5) (uint32\_t \&num\_plots)=0 Get the number of plots for this query. |
| virtual const [DVS::IObject](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_object.md) \* | [get\_plot](#a590a1eff5cb7906028f736810e079ed6) (uint32\_t index)=0 Get the plot object based on the index. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_variable\_data](#a8ec063e869d5ef051a276b0b0fab0f42) (const [DVS::IObject](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_object.md) \*object, const [DVS::IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md) \*var, float time, float \*values)=0 Get variable values for dataset and part objects. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_variables](#a336a2553eb96266550f737539e85b2a8) (uint32\_t \&num\_vars)=0 Get the number of variables for this query. |
| virtual const [DVS::IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md) \* | [get\_variable](#ac1ca725d3c7e7354ab38b4b3e971e2b3) (uint32\_t index)=0 Get the variable object based on the index. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_timesteps](#a43880c6392208deb0a4685fb05cd55e0) (uint32\_t \&num\_timesteps)=0 Get the number of timesteps. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_timesteps](#ad1d56e910ffc40d8f432152a1028d53b) (float \*timesteps)=0 Get the timesteps object. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_mesh\_chunks](#a0e4ef2e5ffb8a6e3cfe1d1841ef4007b) (uint32\_t \&num\_mesh\_chunks)=0 Get the number of mesh chunks for this query. |
| virtual [DVS::IMeshChunk](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_mesh_chunk.md) \* | [get\_mesh\_chunk](#a00a3a6962690c69ea8cef8815a72c011) (uint32\_t index)=0 Get the mesh chunk based on the index. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_plot\_chunks](#a955bed02a8706e13c972f45c9263f84e) (uint32\_t \&num\_plot\_chunks)=0 Get the number of plot chunks for this query. |
| virtual [DVS::IPlotChunk](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_plot_chunk.md) \* | [get\_plot\_chunk](#a074055c68ba05d544d653095683405c7) (uint32\_t index)=0 Get the plot chunk based on the index. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_hash\_available](#a818f3065fbaa299112d3efa4257bbfec) (const char \*hash, bool \&available)=0 Get if the hash is available in the blobstore. |
|  virtual void | **clear\_data** ()=0 Clear the current query. |

## Detailed Description

The query interface for the DVS Reader API.

An instance of this object can be initially created by calling [DVS::CREATE\_QUERY\_INSTANCE()](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__query__interface_8h.md#ac614cf475eca0727cdb5b42faabcca7d). A URI must then be added via [DVS::IQuery::add\_uri()](#ae1b22e6a7c4f0c76ade9105f30d1bc2d). Then you can either start querying the dataset or you can add filters by chaining queries via [DVS::IQuery::filter()](#a8a810da09342690eb371b324079f206e). When finished to clean up memory call [DVS::IQuery::release()](#a257f79d7de21658c07dc602dfa6bbf34).

**IMPORTANT**: Calling [DVS::IQuery::release()](#a257f79d7de21658c07dc602dfa6bbf34) destroys all chained queries as well and any object references retrieved from the query from calls such as [DVS::IQuery::get\_part()](#a53ec579c40465ee2aebf87ac60dc90fb)

The overall intended usage would be something like:

```cpp theme={null}
DVS::IQuery* my_query = DVS::CREATE_QUERY_INSTANCE(); //Create an instance of a query
my_query->add_uri("hdf5://localhost/D:/my/cache/location"); //Add a cache URI for the query to open
DVS::IQuery* dataset_query = my_query->filter("/dataset.id/eq/my+dataset+name"); // Create chained query filtering on a specific dataset name
DVS::IQuery* part_query = dataset_query->filter("/part.id/eq/my+part+name"); // Create chained query filtering on a specific part name
//Loop over all th mesh chunks for part: my part name in dataset: my dataset name
for (uint32_t i = 0; i < part_query->get_num_mesh_chunks(); i++ )
{
 DVS::IMeshChunk* mesh_chunk = part_query->get_mesh_chunk(i);
 //Do important things
}
my_query->release(); // Release top level query and all child queries and their objects
```

See [Cache URIs](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/group__group__dvs__uri.md#dvs_cache_uri) and [Query Stanzas](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/group__group__dvs__filtering.md#dvs_query_stanzas) for more information on cache URIs and queries.

Definition at line [78](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__query__interface_8h_source) of file [dvs\_query\_interface.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__query__interface_8h_source).

## Member Function Documentation

### add\_uri()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::add_uri(const char * uri)
```

`pure virtual`

Add a URI for the reader API to iterate over.

This method will only "set" the current URI. In the future we will support multiple URIs queried at once.

**IMPORTANT**: Calling this will invalidate any objects returned from the query and any chained queries.

Errors:

* DVS\_NONE: Success
* DVS\_PARAM\_NULL: uri passed in was nullptr
* DVS\_QUERY\_HAS\_CHILDREN: Cannot add a uri to a query which already has children
* DVS\_QUERY\_INVALID\_URI: URI passed in did not parse, invalid uri
* DVS\_QUERY\_INVALID\_FILTER: Filter in URI did not parse, invalid filter

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | uri | URI of a cache. See [Cache URIs](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/group__group__dvs__uri.md#dvs_cache_uri) |

**Returns**

dvs\_ret DVS\_NONE on success, otherwise see method description

### filter()

```cpp theme={null}
virtual DVS::IQuery * DVS::IQuery::filter(const char * filter)
```

`pure virtual`

The filter method will allocate a new chained query with the passed in filter appended to it.

The filter method allocates a new chained query with the passed in filter appended to it. The current query is not modified. This query however is a chained child of the current query meaning that any changes to the parent will invalidate the objects of the child. [IQuery::release()](#a257f79d7de21658c07dc602dfa6bbf34) will release any child chained queries created from the it.

This lets a user create a top level query, say for a specific dataset name. Then have multiple chained queries that filter for specific parts etc which can be iterated over in parallel.

**IMPORTANT**: Chained queries will have all of their objects destroyed when a parent query changes.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | filter | the filter to append to the new chained child query. See [Query Stanzas](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/group__group__dvs__filtering.md#dvs_query_stanzas). |

**Returns**

[DVS::IQuery](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_query.md)\* a pointer to a newly allocated chained child query

### get\_chunks\_per\_rank()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_chunks_per_rank(uint32_t * chunks)
```

`pure virtual`

Get an array of the number of chunks for every rank for this query.

This method will return an array of max number of chunks for every rank. The size of the buffer needed can be retrieved from [IQuery::get\_num\_chunks\_per\_rank()](#aaae39d1931433b35162c3b37dc82c4f1). These values correspond to the ranks returned from [IQuery::get\_ranks()](#a469f214b6c9976e81d93510410c00b70). Since there might be multiple datasets in the query this will return the max for each rank across the datasets and parts.

This call will return all of the chunk information for every rank returned from [IQuery::get\_ranks()](#a469f214b6c9976e81d93510410c00b70).

Errors:

* DVS\_NONE: Success
* DVS\_PARAM\_NULL: chunks passed in is nullptr
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | chunks | buffer to save chunk information in, an array of the chunks for each rank |

**Returns**

dvs\_ret DVS\_NONE if success, otherwise see method description

### get\_dataset()

```cpp theme={null}
virtual DVS::IDataset * DVS::IQuery::get_dataset(uint32_t index)
```

`pure virtual`

Get the dataset object.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | index of the dataset to retrieve |

**Returns**

[DVS::IDataset](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_dataset.md)\* dataset for the index, or nullptr if not found

### get\_hash\_available()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_hash_available(
    const char * hash,
    bool & available
)
```

`pure virtual`

Get if the hash is available in the blobstore.

Checks the blobstore to see if the hash is available or not. This is mainly used for validation purposes.

Errors:

* DVS\_NONE: Success
* DVS\_PARAM\_NULL: hash passed in nullptr
* DVS\_INVALID\_CACHE: Invalid cache, bad data
* DVS\_INVALID\_HASH: Hash passed in invalid

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | hash | hash to check availability of, retrieved via [DVS::IHash::get\_hash()](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md#a51eaee86a6e2db4dda7f4326daa33874) or [DVS::IVarHash::get\_var\_hash()](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md#a17fff1548eb276edd326a0af08f6a7c4) |
| \[out] | available | if success, returns true if found in blobstore, else false |

**Returns**

dvs\_ret DVS\_NONE on success, else see method description

### get\_mesh\_chunk()

```cpp theme={null}
virtual DVS::IMeshChunk * DVS::IQuery::get_mesh_chunk(uint32_t index)
```

`pure virtual`

Get the mesh chunk based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | the index of the mesh chunk to retrieve |

**Returns**

[DVS::IMeshChunk](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_mesh_chunk.md)\* the mesh chunk for the index, or nullptr if not found

### get\_num\_chunks\_per\_rank()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_chunks_per_rank(uint32_t & num_chunks)
```

`pure virtual`

Get the number of chunks for each rank.

This method returns the size of the buffer needed to pass in for get\_chunks\_per\_rank. This will be of the same size as [IQuery::get\_num\_ranks()](#ab09b8c2d9204f66e88b1ac56b3e0e40d).

This call will return all of the chunk information for every rank returned from [IQuery::get\_ranks()](#a469f214b6c9976e81d93510410c00b70).

Errors:

* DVS\_NONE: Success
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_chunks | if success returns the size of the buffer to allocate for [IQuery::get\_chunks\_per\_rank()](#a4d1a83603bec00bdebc8430a5c48e742) |

**Returns**

dvs\_ret DVS\_NONE on success, otherwise see method description

### get\_num\_datasets()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_datasets(uint32_t & num_datasets)
```

`pure virtual`

Get the number of datasets objects.

**IMPORTANT**: The number of datasets will be invalid if this query or any parent queries' filters are modified.

Errors:

* DVS\_NONE: Success
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_datasets | if success, returns the number of datasets for this query |

**Returns**

DVS\_NONE on success, else see method description

### get\_num\_mesh\_chunks()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_mesh_chunks(uint32_t & num_mesh_chunks)
```

`pure virtual`

Get the number of mesh chunks for this query.

NOT YET IMPLEMENTED

**IMPORTANT**: The number of mesh chunks will be invalid if this query or any parent queries' filters are modified.

Errors:

* DVS\_NONE: Success
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt
* DVS\_QUERY\_INVALID\_FILTER: Invalid filter for query
* DVS\_METADATA\_ERROR: Error loading metadata

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_mesh\_chunks | if success, returns the number of mesh chunks for this query |

**Returns**

dvs\_ret dvs\_ret DVS\_NONE on success, else see method description

### get\_num\_parts()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_parts(uint32_t & num_parts)
```

`pure virtual`

Get the number of parts for this query.

**IMPORTANT**: The number of parts will be invalid if this query or any parent queries' filters are modifed.

Errors:

* DVS\_NONE: Success
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_parts | if success, returns the number of parts for this query |

**Returns**

dvs\_ret DVS\_NONE on success, else see method description

### get\_num\_plot\_chunks()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_plot_chunks(uint32_t & num_plot_chunks)
```

`pure virtual`

Get the number of plot chunks for this query.

NOT YET IMPLEMENTED

**IMPORTANT**: The number of plot chunks will be invalid if this query or any parent queries' filters are modified.

Errors:

* DVS\_NONE: Success
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt
* DVS\_QUERY\_INVALID\_FILTER: Invalid filter for query
* DVS\_METADATA\_ERROR: Error loading metadata

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_plot\_chunks | if success, returns the number of plot chunks for this query |

**Returns**

dvs\_ret dvs\_ret DVS\_NONE on success, else see method description

### get\_num\_plots()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_plots(uint32_t & num_plots)
```

`pure virtual`

Get the number of plots for this query.

**IMPORTANT**: The number of plots will be invalid if this query or any parent queries' filters are modifed.

Errors:

* DVS\_NONE: Success
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_plots | if success, returns the number of plots for this query |

**Returns**

dvs\_ret dvs\_ret DVS\_NONE on success, else see method description

### get\_num\_ranks()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_ranks(uint32_t & num_ranks)
```

`pure virtual`

Get the number of ranks for this filtered query.

This call will return all of the unique ranks across all datasets. I.E. if you are loading 2 datasets one with ranks: 0, 1, 2 and one with 0, 1, 2, 3, 4, this will return 5 representing 0,1,2,3,4.

Errors:

* DVS\_NONE: Success
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_ranks | the size of the buffer to allocate for [IQuery::get\_ranks()](#a469f214b6c9976e81d93510410c00b70) |

**Returns**

dvs\_ret DVS\_NONE on success, otherwise see method description

### get\_num\_servers()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_servers(
    const char * uri,
    uint32_t & num_servers
)
```

`pure virtual`

Get the num servers object.

Get the number of servers the cache in the uri was written with.

Errors:

* DVS\_NONE: Success
* DVS\_PARAM\_NULL: uri passed in was nullptr
* DVS\_INVALID\_CACHE: uri passed in was invalid or cache isn't accessible
* DVS\_CACHE\_MISSING\_SERVERS: Cache has a gap in the number of servers, bad cache?
* DVS\_CACHE\_EMPTY: No server folders in cache
* DVS\_UNKNOWN: Internal unhandled case

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | uri | URI of a cache. See [Cache URIs](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/group__group__dvs__uri.md#dvs_cache_uri) |
| \[out] | num\_servers | number of servers this cache was written with |

**Returns**

dvs\_ret DVS\_NONE on success, otherwise see method description

### get\_num\_timesteps()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_timesteps(uint32_t & num_timesteps)
```

`pure virtual`

Get the number of timesteps.

NOT YET IMPLEMENTED

**IMPORTANT**: The number of timesteps will be invalid if this query or any parent queries' filters are modified.

Errors:

* DVS\_NONE: Success
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt
* DVS\_QUERY\_INVALID\_FILTER: Invalid filter for query
* DVS\_METADATA\_ERROR: Error loading metadata

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_timesteps | if success, returns the number of timesteps to allocate for [IQuery::get\_timesteps()](#ad1d56e910ffc40d8f432152a1028d53b) |

**Returns**

dvs\_ret dvs\_ret DVS\_NONE on success, else see method description

### get\_num\_variables()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_num_variables(uint32_t & num_vars)
```

`pure virtual`

Get the number of variables for this query.

**IMPORTANT**: The number of variables will be invalid if this query or any parent queries' filters are modifed.

Errors:

* DVS\_NONE: Success
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_vars | if success, returns the number of variables for this query |

**Returns**

dvs\_ret dvs\_ret DVS\_NONE on success, else see method description

### get\_part()

```cpp theme={null}
virtual const DVS::IObject * DVS::IQuery::get_part(uint32_t index)
```

`pure virtual`

Get the part based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | index of the part to retrieve |

**Returns**

[DVS::IObject](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_object.md)\* part based on the index, or nullptr if not found

### get\_plot()

```cpp theme={null}
virtual const DVS::IObject * DVS::IQuery::get_plot(uint32_t index)
```

`pure virtual`

Get the plot object based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

**Parameters**

| Name | Description |
| - | - |
| index | index of the plot to retrieve |

**Returns**

[DVS::IObject](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_object.md)\* plot based on the index, or nullptr if not found

### get\_plot\_chunk()

```cpp theme={null}
virtual DVS::IPlotChunk * DVS::IQuery::get_plot_chunk(uint32_t index)
```

`pure virtual`

Get the plot chunk based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | index of the plot chunk to retrieve |

**Returns**

[DVS::IPlotChunk](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_plot_chunk.md)\* the plot chunk based on the index, or nullptr if not found

### get\_ranks()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_ranks(uint32_t * ranks)
```

`pure virtual`

Get the unique ranks for this filtered query.

This call will return all of the unique ranks across all datasets. I.E. if you are loading 2 datasets one with ranks: 0, 1, 2 and one with 0, 1, 2, 3, 4, this will return 5 representing 0,1,2,3,4.

Errors:

* DVS\_NONE: Success
* DVS\_PARAM\_NULL: ranks passed in is nullptr
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | ranks | an array of the unique ranks for this query, call [IQuery::get\_num\_ranks()](#ab09b8c2d9204f66e88b1ac56b3e0e40d) for buffer size to allocate |

**Returns**

dvs\_ret DVS\_NONE on success, otherwise see method description

### get\_timesteps()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_timesteps(float * timesteps)
```

`pure virtual`

Get the timesteps object.

NOT YET IMPLEMENTED

**IMPORTANT**: The timesteps will be invalid if this query or any parent queries' filters are modified.

Errors:

* DVS\_NONE: Success
* DVS\_PARAM\_NULL: timesteps param is nullptr
* DVS\_INVALID\_CACHE: Problem accessing cache
* DVS\_DATA\_FAILED\_LOAD: Problem reading cache, data bad/corrupt
* DVS\_QUERY\_INVALID\_FILTER: Invalid filter for query
* DVS\_METADATA\_ERROR: Error loading metadata

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | timesteps | buffer for timesteps to be saved in, call [IQuery::get\_num\_timesteps()](#a43880c6392208deb0a4685fb05cd55e0) to determine size |

**Returns**

dvs\_ret DVS\_NONE on success, else see method description

### get\_variable()

```cpp theme={null}
virtual const DVS::IVar * DVS::IQuery::get_variable(uint32_t index)
```

`pure virtual`

Get the variable object based on the index.

**IMPORTANT**: This object will be destroyed if this query or parent queries' filters are modified.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | index of the variable to retrieve |

**Returns**

[DVS::IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md)\* variable based on the index, or nullptr if not found

### get\_variable\_data()

```cpp theme={null}
virtual dvs_ret DVS::IQuery::get_variable_data(
    const DVS::IObject * object,
    const DVS::IVar * var,
    float time,
    float * values
)
```

`pure virtual`

Get variable values for dataset and part objects.

Dataset (Case) or part objects can have variable values per timestep. This method retrieves those values or returns if they do not exist. There does not need to be a value set for every part variable on every part. DVS\_NO\_DATA will be returned in this case.

Error Codes:

* DVS\_NONE: No error
* DVS\_PARAM\_NULL: Null param passed in
* DVS\_PARAM\_INVALID\_VAR: Invalid variable passed in, should not be possible
* DVS\_PARAM\_INVALID\_VAR\_LOC: Variable passed in not a case or part variable
* DVS\_PARAM\_INVALID\_OBJECT\_TYPE: Object passed in not a case or part object
* DVS\_PARAM\_INVALID\_OBJECT: Invalid object passed in, should not be possible
* DVS\_PARAM\_INVALID\_TIME: Timestep does not exist for the dataset the object belongs to
* DVS\_PARAM\_OBJECT\_DATASET\_MISMATCH: Object and variable are from different datasets

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | object | The case/dataset or part object to find values for |
| \[in] | var | the variable to retrieve the data for |
| \[in] | time | the time value to retrieve the variable data for |
| \[out] | values | the array of data to return, should be of size [DVS::IVar::get\_float\_count\_per\_value()](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md#a9dbdd84e6f6342deae82ede6dcf2156e) |

**Returns**

dvs\_ret DVS\_NONE if no errors, DVS\_NO\_DATA if no data found, otherwise see method description

### release()

```cpp theme={null}
virtual void DVS::IQuery::release()
```

`pure virtual`

Release the memory of the query.

This will release the memory of the query, any objects returned from it (i.e. parts/plots/variables) and release the memory of any chained queries.

### set\_logger()

```cpp theme={null}
virtual void DVS::IQuery::set_logger(DVS::ILogger * logger)
```

`pure virtual`

Set the logger object.

Set a logger interface for the client to use. This object will have [DVS::ILogger::release()](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_logger.md#a753d496b0ca488a74e6209f330b13458) invoked on it. If [release()](#a257f79d7de21658c07dc602dfa6bbf34) is not implemented the memory should be destroyed by the caller after the query is released.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | logger | logger to use, will be released if [DVS::ILogger::release()](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_logger.md#a753d496b0ca488a74e6209f330b13458) is implemented |

### set\_server\_mod()

```cpp theme={null}
virtual void DVS::IQuery::set_server_mod(
    uint32_t server_num,
    uint32_t server_mod
)
```

`pure virtual`

Set a filter based on the server number and a modulus.

Data in DVS is normally splitup between multiple servers. This method lets you setup the parallelism paradigm for reading in the server data. I.E. if the data was written with 4 servers but you want to read it back in with 2 servers you should have one reader use set\_server\_mod(0, 2) and the other use set\_server\_mod(1, 2). This will round robin the data so reader "0" will reader the data from 0 and 2 and server "1" will read the data from 1 and 3. To set it so that a server will read only its data set server\_mod=0.

Use [get\_num\_servers()](#a05dc766c5d6789ca3dcbab72cf4ca4e9) to determine the number of servers to use

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | server\_num | the base server number to read from the cache |
| \[in] | server\_mod | the modulus for round-robining server data between queries/readers |

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

* D:/ANSYSDev/Product-src/ensight/user\_defined\_src/readers/dvs/include/[dvs\_query\_interface.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__query__interface_8h_source)
