launch_live_dvs#
- DVS.launch_live_dvs(port: int = 0, secret_key: str | None = None, monitor_new_timesteps: str = 'stay_at_current', start_thread: bool = True, filename: str | None = None) Tuple[Thread | None, int | None] #
To provide an interface to launch an in-situ EnSight DVS session. If in PyEnSight, the function will return a thread which will launch the DVS reader in EnSight, hence the DVS servers, and will also return the port allocated by DVS, to cover the case the port 0 was asked for. If instead the function will be used directly in EnSight via the utils interface, since the reader launch will block the interpreter waiting for new data, the port cannot be returned and cannot be printed up until the first update happens. So, if you need to access the port number in a script and you cannot check the EnSight console, please supply a filename to store the dvs port into.
- Parameters:
- port: int
the port number where the first DVS server will be started. In case of a SOS EnSight session, on the following server the DVS servers will be started on the next port, e.g. if the first server starts at port 50055, the second will start at port 50056 and so on
- secret_key: str
an optional secret key to pass in case the DVS clients have been started with a secret key for the underlying gRPC connections. An empty string can be provided if needed
- monitor_new_timesteps: str
set the way EnSight will monitor for new timesteps. Defaults to MONITOR_NEW_TIMESTEPS_STAY_AT_CURRENT. The allowed values are MONITOR_NEW_TIMESTEPS_STAY_AT_CURRENT and MONITOR_NEW_TIMESTEPS_JUMP_TO_END
- start_thread: bool
True if the thread to be returned needs to be started already. Default is True
- filename: str
An optional path to store the port number in. It will be used only if the utils is being called directly in EnSight.
- Returns:
- Thread:
a python Thread which holds the dvs load