> ## 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_client_interface.h File Reference

C++ Client API for using the Dynamic Visualization Store.

`#include <string>`\
&#x20;`#include "dvs_server_interface.h"`\
&#x20;`#include "dynamic_visualization_store_api.h"`\
&#x20;`#include "logger_interface.h"`\
&#x20;`#include "dvs_import_export.h"`\


[Go to the source code of this file.](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__client__interface_8h_source)

## Classes

| Type | Name |
| - | - |
| class | [DVS::IClient](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_client.md) API for solvers to use to send data to EnSight servers. |

## Functions

| Type | Name |
| - | - |
| DVS\_DLL\_EXPORT [DVS::IClient](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_client.md) \* | [DVS::CREATE\_CLIENT\_INSTANCE](#a2475075c9ab4c2e57a8f0b4ab5bc5df4) ([DVS::IServer](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_server.md) \*server, [dvs\_client\_flags](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__enums_8h.md#aec8cbac60b9cafe5d1c0ad6593f05e9f) flags, const char \*secret) Factory method to create a dynamic data client interface instance. |
| DVS\_DLL\_EXPORT void | [DVS::DESTROY\_CLIENT\_INSTANCE](#a3f13d009a9a07278cbca3449113d78fc) ([DVS::IClient](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_client.md) \*destroy) Destruction method for a client created with CREATE\_CLIENT\_INSTANCE. |

## Detailed Description

C++ Client API for using the Dynamic Visualization Store.

```cpp theme={null}
Setup the initial connection and needed information

1.) Instantiate DVS::IServer using DVS::CREATE_SERVER_INSTANCE() method
 1a.) If running a server within this process call setup options (DVS::IServer::set_options()), see documentation for available options
 1b.) If running a server within this process call startup (DVS::IServer::startup()) to begin running server
2.) Instantiate DVS::IClient using DVS::CREATE_CLIENT_INSTANCE() method and DVS::IServer created in step 1
3.) Provide a logging method (DVS::IClient::set_logger()) (optional)
4.) Begin initialization (DVS::IClient::begin_init())
5.) Set unit system (DVS::IClient::set_unit_system()) (optional)
6.) Add information about all parts if applicable (DVS::IClient::add_part_info())
7.) Add information about all variables if applicable (DVS::IClient::add_var_info()) (optional)
8.) Add information about all plots if applicable (DVS::IClient::add_plot_info()) (optional)
9.) End initialization (DVS::IClient::end_init())

Now at the end of each timestep we can push data to the ensight server

1.) Begin the update (DVS::IClient::begin_update())
2.) For Each Part
        Update mesh/nodes (DVS::IClient::update_nodes())
3.) For Each Element Type
        Update Element (DVS::IClient::update_elements(), DVS::IClient::update_elements_polygon(), DVS::IClient::update_elements_polyhedral())
4.) For Each Variable
        If location on case or part use corresponding update methods i.e. DVS::IClient::update_var_case(),
        DVS::IClient::update_var_case()

        If location element or node use corresponding update methods i.e. DVS::IClient::update_var_element(),
        DVS::IClient::update_var_node(), DVS::IClient::update_var_field()
4.) For Each Plot
         Update plot values (DVS::IClient::update_plot())
5.) End update (DVS::IClient::end_update())

On application shutdown let the API shut itself down

1.) Destroy instance of DVS::IClient using DVS::DESTROY_CLIENT_INSTANCE() method
```

Definition in file [dvs\_client\_interface.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__client__interface_8h_source).

## Function Documentation

### CREATE\_CLIENT\_INSTANCE()

```cpp theme={null}
DVS_DLL_EXPORT DVS::IClient * DVS::CREATE_CLIENT_INSTANCE(
    DVS::IServer * server,
    dvs_client_flags flags,
    const char * secret
)
```

Factory method to create a dynamic data client interface instance.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| | server | Server instance to connect to |
| | flags | config flags for client setup see dvs\_client\_flags ([dynamic\_visualization\_store\_enums.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__enums_8h.md)) |
| \[in] | secret | secret shared secret to use to connect to server, can be empty |

**Returns**

[DVS::IClient](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_client.md)\* instance of a dvs client, (nullptr if failure), must be destroyed with DESTROY\_CLIENT\_INSTANCE

### DESTROY\_CLIENT\_INSTANCE()

```cpp theme={null}
DVS_DLL_EXPORT void DVS::DESTROY_CLIENT_INSTANCE(DVS::IClient * destroy)
```

Destruction method for a client created with CREATE\_CLIENT\_INSTANCE.

**Parameters**

| Name | Description |
| - | - |
| destroy | Instance of a client to destroy |
