#include <dvs_server_interface.h>
Public Member Functions
Detailed Description
Usage:1.) Instantiate DVS::IServer using DVS::CREATE_SERVER_INSTANCE() method
2.) Set options using DVS::IServer::set_options() or DVS::IServer::set_option()
3.) Startup server using DVS::IServer::startup()
4.) If needed see if it’s running via DVS::IServer::running()
5.) Shutdown server using DVS::IServer::shutdown()
6.) Destroy instance using DVS::DESTROY_SERVER_INSTANCE()
Definition at line 59 of file dvs_server_interface.h.
Member Function Documentation
create_query()
pure virtual
Create a DVS query instance. This will inherit the DVS server reader instance.
Parameters
Returns
The query instance created.
create_transport()
pure virtual
Create a transport object to communicate with server, must be destroyed.
Parameters
Returns
ITransport* instance to transport object owned by Server instance
get_timestep_count()
pure virtual
return the current number of pending and complete timesteps in the server
Simple count of the current state of the timesteps in the server
Parameters
Returns
dvs_ret DVS_SERVER_NOT_STARTED or DVS_NONE
get_uri()
pure virtual
Get URI of this server.
Returns
URI this server was created with
running()
pure virtual
Check to see if the server is running.
Currently this is a dumb check to see if the server was tried to start. If port listening failed this will call will not fail currently.
Returns
true if running/started
set_option()
pure virtual
Set a specific option on the server, these are used during startup See See Server Options.
Current available options: CACHE_URI: This will set the location and type of cache to store data to. Parameters
set_options()
pure virtual
Set a collection of options on the server. Overwrites previous options See. See Server Options.
Parameters
startup()
pure virtual
Start the server.
server_number is used by the DVS server, for each group of servers this number should be unique and monotonically increasing with no gaps (valid: 0, 1, 2 invalid: 0, 2)
local_ranks is used to determine how many clients will be connecting to this server
Parameters
Returns
dvs_ret DVS_NONE on success, else error code
startup_unthreaded()
pure virtual
Startup a server manually without threads.
This method is for when a user wants to manually run their own server to more tightly control the execution and threading model. This call WILL block until the first timestep is received and will not return unless terminating() has been called from another thread or interrupt.
server_number is used by the DVS server, for each group of servers this number should be unique and monotonically increasing with no gaps (valid: 0, 1, 2 invalid: 0, 2)
local_ranks is used to determine how many clients will be connecting to this server
The normal call chain would be to call startup_unthreaded() and then loop calling update() until some end condition is met. Please see test_dvs_server.cpp for an example.
Parameters
Returns
dvs_ret DVS_NONE on success, else error code
terminating()
pure virtual
Call to begin terminating the server.
This method begins terminating the server when startup_unthreaded() is invoked. This will cause new updates sending new timesteps, to fail and exit early from any waiting calls on the server.
Important: This call is not needed if using the normal startup method as it will handle this for you.
Returns
dvs_ret DVS_NONE on success, DVS_SERVER_FAILED_READER_CREATE if the server wasn’t started
update()
pure virtual
Perform a server update.
This method performs a server update. This will: 1.) Perform a complete timestep check and flush complete timesteps to the cache 2.) Perform a check if any new delete_item calls should be processed 3.) Perform a check to see if the dataset definition needs to be updated
The number of pending timesteps from get_timestep_count() will not update unless this is called.
Important: This is not needed to be called if using the normal startup() procedure and should only be used when manually running the server with startup_unthreaded. This must be called periodically for the server to function properly.
Returns
dvs_ret DVS_NONE on success
The documentation for this class was generated from the following file:
- D:/ANSYSDev/Product-src/ensight/user_defined_src/readers/dvs/dvs_server_interface.h