    

 ## On this page

  

 

 # dvs\_server\_interface

 Last update: 16.07.2025 

[Go to the documentation of this file.](dvs__server__interface_8h.xhtml)<a id="l00001" name="l00001"></a> 1/\* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00002" name="l00002"></a> 2 \* Copyright 2017-2024 ANSYS, Inc.

<a id="l00003" name="l00003"></a> 3 \* All Rights Reserved.

<a id="l00004" name="l00004"></a> 4 \*

<a id="l00005" name="l00005"></a> 5 \* Restricted Rights Legend

<a id="l00006" name="l00006"></a> 6 \*

<a id="l00007" name="l00007"></a> 7 \* Use, duplication, or disclosure of this

<a id="l00008" name="l00008"></a> 8 \* software and its documentation by the

<a id="l00009" name="l00009"></a> 9 \* Government is subject to restrictions as

<a id="l00010" name="l00010"></a> 10 \* set forth in subdivision \[(b)(3)(ii)\] of

<a id="l00011" name="l00011"></a> 11 \* the Rights in Technical Data and Computer

<a id="l00012" name="l00012"></a> 12 \* Software clause at 52.227-7013.

<a id="l00013" name="l00013"></a> 13 \* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00014" name="l00014"></a> 14 \*/

<a id="l00015" name="l00015"></a> 15 

<a id="l00016" name="l00016"></a> 16\#ifndef \_\_\_DVS\_SERVER\_INTERFACE\_\_\_

<a id="l00017" name="l00017"></a> 17\#define \_\_\_DVS\_SERVER\_INTERFACE\_\_\_

<a id="l00018" name="l00018"></a> 18 

<a id="l00036" name="l00036"></a> 36\#include &lt;map&gt;

<a id="l00037" name="l00037"></a> 37\#include &lt;string&gt;

<a id="l00038" name="l00038"></a> 38 

<a id="l00039" name="l00039"></a> 39\#include "[include/dvs\_query\_interface.h](dvs__query__interface_8h.xhtml)"

<a id="l00040" name="l00040"></a> 40\#include "transport\_interface.h"

<a id="l00041" name="l00041"></a> 41\#include "include/dvs\_import\_export.h"

<a id="l00042" name="l00042"></a> 42 

<a id="l00043" name="l00043"></a> 43 

<a id="l00044" name="l00044"></a> 44 

<a id="l00045" name="l00045"></a> 45namespace DVS

<a id="l00046" name="l00046"></a> 46{

<a id="l00059" name="l00059"></a>[ 59](class_d_v_s_1_1_i_server.xhtml) class [IServer](class_d_v_s_1_1_i_server.xhtml)

<a id="l00060" name="l00060"></a> 60 {

<a id="l00061" name="l00061"></a> 61 public:

<a id="l00062" name="l00062"></a> 62 

<a id="l00063" name="l00063"></a>[ 63](class_d_v_s_1_1_i_server.xhtml#a54d47cdb16aa41fb6f101db7d88286bb) [IServer](class_d_v_s_1_1_i_server.xhtml#a54d47cdb16aa41fb6f101db7d88286bb)() = default; 

<a id="l00064" name="l00064"></a>[ 64](class_d_v_s_1_1_i_server.xhtml#ad41fe7a344c5b6d1d37d71278bce012c) virtual [~IServer](class_d_v_s_1_1_i_server.xhtml#ad41fe7a344c5b6d1d37d71278bce012c)() = default; 

<a id="l00065" name="l00065"></a>[ 65](class_d_v_s_1_1_i_server.xhtml#a1bfc7399b2562a0b219ae556708556da) [IServer](class_d_v_s_1_1_i_server.xhtml#a1bfc7399b2562a0b219ae556708556da)([IServer](class_d_v_s_1_1_i_server.xhtml)&amp;&amp;) = default; 

<a id="l00066" name="l00066"></a>[ 66](class_d_v_s_1_1_i_server.xhtml#aba394d20a8b4ee8a89e02550a0d88640) [IServer](class_d_v_s_1_1_i_server.xhtml)&amp; [operator=](class_d_v_s_1_1_i_server.xhtml#aba394d20a8b4ee8a89e02550a0d88640)([IServer](class_d_v_s_1_1_i_server.xhtml)&amp;&amp;) = default; 

<a id="l00067" name="l00067"></a>[ 67](class_d_v_s_1_1_i_server.xhtml#a79d4ea86ffdb968a03c9b81aa3fc8612) [IServer](class_d_v_s_1_1_i_server.xhtml#a79d4ea86ffdb968a03c9b81aa3fc8612)(const [IServer](class_d_v_s_1_1_i_server.xhtml)&amp;) = default; 

<a id="l00068" name="l00068"></a>[ 68](class_d_v_s_1_1_i_server.xhtml#a9910b6c51adf4489bc1bc8c86b9fabb3) [IServer](class_d_v_s_1_1_i_server.xhtml)&amp; [operator=](class_d_v_s_1_1_i_server.xhtml#a9910b6c51adf4489bc1bc8c86b9fabb3)(const [IServer](class_d_v_s_1_1_i_server.xhtml)&amp;) = default; 

<a id="l00069" name="l00069"></a> 69 

<a id="l00076" name="l00076"></a>[ 76](class_d_v_s_1_1_i_server.xhtml#a964b0420773ec5f47dbcea04334ba0d3) virtual void [set\_options](class_d_v_s_1_1_i_server.xhtml#a964b0420773ec5f47dbcea04334ba0d3)(const std::map&lt;const char*,const char*&gt;&amp; options) = 0;

<a id="l00077" name="l00077"></a> 77 

<a id="l00088" name="l00088"></a>[ 88](class_d_v_s_1_1_i_server.xhtml#a1edb4dec67086f10bc0329b6adf9084c) virtual void [set\_option](class_d_v_s_1_1_i_server.xhtml#a1edb4dec67086f10bc0329b6adf9084c)(const char* key, const char* value) = 0;

<a id="l00089" name="l00089"></a> 89 

<a id="l00094" name="l00094"></a>[ 94](class_d_v_s_1_1_i_server.xhtml#acf90686fce61dd0bc59af6e411f7861b) virtual void [clear\_options](class_d_v_s_1_1_i_server.xhtml#acf90686fce61dd0bc59af6e411f7861b)() = 0;

<a id="l00095" name="l00095"></a> 95 

<a id="l00103" name="l00103"></a>[ 103](class_d_v_s_1_1_i_server.xhtml#a5fdee3f663dbe7b7dab11621f76737e2) virtual bool [running](class_d_v_s_1_1_i_server.xhtml#a5fdee3f663dbe7b7dab11621f76737e2)() const = 0;

<a id="l00104" name="l00104"></a> 104 

<a id="l00114" name="l00114"></a>[ 114](class_d_v_s_1_1_i_server.xhtml#a8a5339f222bcd46b06c2fa9a474b2c37) virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.xhtml#a1d7466ae72e89fe36cbf2408b4f7d9c1) [get\_timestep\_count](class_d_v_s_1_1_i_server.xhtml#a8a5339f222bcd46b06c2fa9a474b2c37)(uint32_t&amp; num_pending, uint32_t&amp; num_complete) const = 0;

<a id="l00115" name="l00115"></a> 115 

<a id="l00128" name="l00128"></a>[ 128](class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c) virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.xhtml#a1d7466ae72e89fe36cbf2408b4f7d9c1) [startup](class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c)(uint32_t server_number, uint32_t local_ranks) = 0;

<a id="l00129" name="l00129"></a> 129 

<a id="l00150" name="l00150"></a>[ 150](class_d_v_s_1_1_i_server.xhtml#ac61ce2698eec1adb521bbbf60cb78756) virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.xhtml#a1d7466ae72e89fe36cbf2408b4f7d9c1) [startup\_unthreaded](class_d_v_s_1_1_i_server.xhtml#ac61ce2698eec1adb521bbbf60cb78756)(uint32_t server_number, uint32_t local_ranks) = 0;

<a id="l00151" name="l00151"></a> 151 

<a id="l00169" name="l00169"></a>[ 169](class_d_v_s_1_1_i_server.xhtml#add6fcb530763dc217f5b3c17b25093c0) virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.xhtml#a1d7466ae72e89fe36cbf2408b4f7d9c1) [update](class_d_v_s_1_1_i_server.xhtml#add6fcb530763dc217f5b3c17b25093c0)() = 0;

<a id="l00170" name="l00170"></a> 170 

<a id="l00183" name="l00183"></a>[ 183](class_d_v_s_1_1_i_server.xhtml#a6cb1f69ad4b9213dde48d4cd5b3f2111) virtual [dvs\_ret](dynamic__visualization__store__error__codes_8h.xhtml#a1d7466ae72e89fe36cbf2408b4f7d9c1) [terminating](class_d_v_s_1_1_i_server.xhtml#a6cb1f69ad4b9213dde48d4cd5b3f2111)() = 0;

<a id="l00184" name="l00184"></a> 184 

<a id="l00189" name="l00189"></a>[ 189](class_d_v_s_1_1_i_server.xhtml#a7ce6bb49a2d383b0821267415a93802d) virtual void [shutdown](class_d_v_s_1_1_i_server.xhtml#a7ce6bb49a2d383b0821267415a93802d)() = 0;

<a id="l00190" name="l00190"></a> 190 

<a id="l00197" name="l00197"></a>[ 197](class_d_v_s_1_1_i_server.xhtml#a68fca8531459488f5694507ad5df0482) virtual ITransport* [create\_transport](class_d_v_s_1_1_i_server.xhtml#a68fca8531459488f5694507ad5df0482)(const std::string&amp; shared_secret) = 0;

<a id="l00198" name="l00198"></a> 198 

<a id="l00204" name="l00204"></a>[ 204](class_d_v_s_1_1_i_server.xhtml#a087c3fed77651e0f62d7189f44a32443) virtual const char* [get\_uri](class_d_v_s_1_1_i_server.xhtml#a087c3fed77651e0f62d7189f44a32443)() = 0;

<a id="l00205" name="l00205"></a> 205 

<a id="l00214" name="l00214"></a>[ 214](class_d_v_s_1_1_i_server.xhtml#aee25312f757c5bc4f6dd304dd7da68a9) virtual [DVS::IQuery](class_d_v_s_1_1_i_query.xhtml)* [create\_query](class_d_v_s_1_1_i_server.xhtml#aee25312f757c5bc4f6dd304dd7da68a9)(const std::string&amp; filter=std::string(), [DVS::IQuery](class_d_v_s_1_1_i_query.xhtml)* parent=nullptr) = 0;

<a id="l00215" name="l00215"></a> 215 

<a id="l00216" name="l00216"></a> 216 };

<a id="l00217" name="l00217"></a> 217 

<a id="l00227" name="l00227"></a>[ 227](dvs__server__interface_8h.xhtml#a852580b9a49ac305e4ae26ca637bcc75) DVS_DLL_EXPORT [IServer](class_d_v_s_1_1_i_server.xhtml)* [CREATE\_SERVER\_INSTANCE](dvs__server__interface_8h.xhtml#a852580b9a49ac305e4ae26ca637bcc75)(const char* uri);

<a id="l00228" name="l00228"></a> 228 

<a id="l00234" name="l00234"></a>[ 234](dvs__server__interface_8h.xhtml#adcdcbab1954ec53631a7136af7fc49b8) DVS_DLL_EXPORT void [DESTROY\_SERVER\_INSTANCE](dvs__server__interface_8h.xhtml#adcdcbab1954ec53631a7136af7fc49b8)([DVS::IServer](class_d_v_s_1_1_i_server.xhtml)* destroy);

<a id="l00235" name="l00235"></a> 235 

<a id="l00236" name="l00236"></a> 236}

<a id="l00237" name="l00237"></a> 237 

<a id="l00238" name="l00238"></a> 238\#endif //\_\_\_DVS\_SERVER\_INTERFACE\_\_\_

[DVS::IQuery](class_d_v_s_1_1_i_query.xhtml)

The query interface for the DVS Reader API.

**Definition:** [dvs\_query\_interface.h:80](dvs__query__interface_8h_source.xhtml#l00079)



[DVS::IServer](class_d_v_s_1_1_i_server.xhtml)

Interface class used to run a dynamic data server in a thread accepting incoming client connections.

**Definition:** [dvs\_server\_interface.h:60](dvs__server__interface_8h_source.xhtml#l00059)



[DVS::IServer::get\_uri](class_d_v_s_1_1_i_server.xhtml#a087c3fed77651e0f62d7189f44a32443)

virtual const char * get_uri()=0

Get URI of this server.



[DVS::IServer::IServer](class_d_v_s_1_1_i_server.xhtml#a1bfc7399b2562a0b219ae556708556da)

IServer(IServer &amp;&amp;)=default

default



[DVS::IServer::set\_option](class_d_v_s_1_1_i_server.xhtml#a1edb4dec67086f10bc0329b6adf9084c)

virtual void set_option(const char *key, const char *value)=0

Set a specific option on the server, these are used during startup See See Server Options.



[DVS::IServer::IServer](class_d_v_s_1_1_i_server.xhtml#a54d47cdb16aa41fb6f101db7d88286bb)

IServer()=default

default



[DVS::IServer::running](class_d_v_s_1_1_i_server.xhtml#a5fdee3f663dbe7b7dab11621f76737e2)

virtual bool running() const =0

Check to see if the server is running.



[DVS::IServer::startup](class_d_v_s_1_1_i_server.xhtml#a6699cf48b29583ab3391b9b8397e611c)

virtual dvs_ret startup(uint32_t server_number, uint32_t local_ranks)=0

Start the server.



[DVS::IServer::create\_transport](class_d_v_s_1_1_i_server.xhtml#a68fca8531459488f5694507ad5df0482)

virtual ITransport * create_transport(const std::string &amp;shared_secret)=0

Create a transport object to communicate with server, must be destroyed.



[DVS::IServer::terminating](class_d_v_s_1_1_i_server.xhtml#a6cb1f69ad4b9213dde48d4cd5b3f2111)

virtual dvs_ret terminating()=0

Call to begin terminating the server.



[DVS::IServer::IServer](class_d_v_s_1_1_i_server.xhtml#a79d4ea86ffdb968a03c9b81aa3fc8612)

IServer(const IServer &amp;)=default

support copying



[DVS::IServer::shutdown](class_d_v_s_1_1_i_server.xhtml#a7ce6bb49a2d383b0821267415a93802d)

virtual void shutdown()=0

Shutdown the server, also called on server destruction by DVS::DESTROY_SERVER_INSTANCE()



[DVS::IServer::get\_timestep\_count](class_d_v_s_1_1_i_server.xhtml#a8a5339f222bcd46b06c2fa9a474b2c37)

virtual dvs_ret get_timestep_count(uint32_t &amp;num_pending, uint32_t &amp;num_complete) const =0

return the current number of pending and complete timesteps in the server



[DVS::IServer::set\_options](class_d_v_s_1_1_i_server.xhtml#a964b0420773ec5f47dbcea04334ba0d3)

virtual void set_options(const std::map&lt; const char *, const char * &gt; &amp;options)=0

Set a collection of options on the server. Overwrites previous options See. See Server Options.



[DVS::IServer::operator=](class_d_v_s_1_1_i_server.xhtml#a9910b6c51adf4489bc1bc8c86b9fabb3)

IServer &amp; operator=(const IServer &amp;)=default

default



[DVS::IServer::operator=](class_d_v_s_1_1_i_server.xhtml#aba394d20a8b4ee8a89e02550a0d88640)

IServer &amp; operator=(IServer &amp;&amp;)=default

default



[DVS::IServer::startup\_unthreaded](class_d_v_s_1_1_i_server.xhtml#ac61ce2698eec1adb521bbbf60cb78756)

virtual dvs_ret startup_unthreaded(uint32_t server_number, uint32_t local_ranks)=0

Startup a server manually without threads.



[DVS::IServer::clear\_options](class_d_v_s_1_1_i_server.xhtml#acf90686fce61dd0bc59af6e411f7861b)

virtual void clear_options()=0

Clear all options from the server.



[DVS::IServer::~IServer](class_d_v_s_1_1_i_server.xhtml#ad41fe7a344c5b6d1d37d71278bce012c)

virtual ~IServer()=default

default



[DVS::IServer::update](class_d_v_s_1_1_i_server.xhtml#add6fcb530763dc217f5b3c17b25093c0)

virtual dvs_ret update()=0

Perform a server update.



[DVS::IServer::create\_query](class_d_v_s_1_1_i_server.xhtml#aee25312f757c5bc4f6dd304dd7da68a9)

virtual DVS::IQuery * create_query(const std::string &amp;filter=std::string(), DVS::IQuery *parent=nullptr)=0

Create a DVS query instance. This will inherit the DVS server reader instance.



[dvs\_query\_interface.h](dvs__query__interface_8h.xhtml)

DVS Reader API Query Interface.



[DVS::CREATE\_SERVER\_INSTANCE](dvs__server__interface_8h.xhtml#a852580b9a49ac305e4ae26ca637bcc75)

DVS_DLL_EXPORT IServer * CREATE_SERVER_INSTANCE(const char *uri)

Create a DVS::IServer instance for clients to connect to.



[DVS::DESTROY\_SERVER\_INSTANCE](dvs__server__interface_8h.xhtml#adcdcbab1954ec53631a7136af7fc49b8)

DVS_DLL_EXPORT void DESTROY_SERVER_INSTANCE(DVS::IServer *destroy)

Destroy the server instance (also shutting it down if needed)



[dvs\_ret](dynamic__visualization__store__error__codes_8h.xhtml#a1d7466ae72e89fe36cbf2408b4f7d9c1)

int32_t dvs_ret

Return value of methods, TODO.

**Definition:** [dynamic\_visualization\_store\_error\_codes.h:32](dynamic__visualization__store__error__codes_8h_source.xhtml#l00032)