|
VR-Engage
2.2
|
DtVrfLaunchConnector handles the configuration and launching of VR-Forces simulation backends. It generates command lines with appropriate parameters based on connection settings, protocol-specific options, and user-specified arguments, then launches the backend process.
#include <vrfLaunchConnector.h>
Public Member Functions | |
| DtVrfLaunchConnector () | |
| virtual | ~DtVrfLaunchConnector () override |
| std::string | vrfSimEngineCommand (const DtSimulationAddress &address, int sessionId, int simType, const std::vector< std::string > &pluginBaseNames, std::string &additionalArguments) |
| virtual void | install (DtPlayerStationApp *app, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection, const DtExerciseConnInitializer *exerciseConnInitializer) |
| virtual void | tick () override |
| virtual void | shutdown () override |
Public Member Functions inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector | |
| DtSimEventConnector () | |
| virtual | ~DtSimEventConnector () override |
| virtual void | install (DtPlayerStationApp *app, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection) |
Public Member Functions inherited from makVre::DtConnector | |
| DtConnector () | |
| virtual | ~DtConnector () |
| virtual DtConnectorType | type () |
| virtual std::string | name () |
Protected Member Functions | |
| virtual makVre::DtVreMessageResult | handleSetBackendConfig (makVre::DtVreMessage *msg) |
| virtual makVre::DtVreMessageResult | handleLaunchSimProcess (makVre::DtVreMessage *msg) |
| virtual void | launchVrfBackend (const DtSimulationAddress &address, int sessionId, int simType, const std::vector< std::string > &pluginBaseNames, bool showConsole, std::string &additionalArguments) |
| virtual std::string | application () const |
| virtual std::string | connectionParameters (const DtSimulationAddress &address, std::string &additionalArguments) const |
| virtual std::string | protocol () const |
Protected Attributes | |
| const DtExerciseConnInitializer * | myExerciseConnInitializer |
| int | mySessionId |
| std::vector< std::string > | myPlugins |
| bool | myShowConsole |
| std::string | myArguments |
Protected Attributes inherited from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector | |
| DtPlayerStationApp * | myApp |
| makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * | myConnection |
Protected Attributes inherited from makVre::DtConnector | |
| std::string | myName |
| DtConnectorType | myType |
Additional Inherited Members | |
Public Types inherited from makVre::DtConnector | |
| enum | DtConnectorType { DIS , HLA13 , HLA1516 , HLA1516E , HLA4 } |
Static Public Member Functions inherited from makVre::DtConnector | |
| static std::string | extension (DtConnectorType type) |
| makVre::DtVrfLaunchConnector::DtVrfLaunchConnector | ( | ) |
Default constructor.
|
overridevirtual |
Virtual destructor.
| std::string makVre::DtVrfLaunchConnector::vrfSimEngineCommand | ( | const DtSimulationAddress & | address, |
| int | sessionId, | ||
| int | simType, | ||
| const std::vector< std::string > & | pluginBaseNames, | ||
| std::string & | additionalArguments ) |
Generates a command line for launching the simulation engine.
| address | The site/app ID to use |
| sessionId | VR-Engage's session ID |
| simType | Integer representing the type of simulation use (full VR-Forces sim engine, ownship-only sim engine, or limited backend) |
| pluginBaseNames | List of plugin names specified in appData\scripts\playerStation.lua |
| additionalArguments | Value of additionalBackendCommandLineParameters defined in playerStation.lua (modified by this function) |
Builds a complete command line for launching a VR-Forces backend with appropriate connection parameters, plugins, and user-specified arguments. Some connection parameters in additionalArguments may be removed and replaced.
|
virtual |
Installs the VR-Forces launch connector with the application and connection.
| app | Pointer to the player station application |
| connection | Pointer to the protocol-specific VR-Link connection |
| exerciseConnInitializer | Pointer to the exercise connection initializer |
Initializes the connector with the provided connection information and registers message handlers for backend configuration and launch requests
|
overridevirtual |
Performs periodic processing (currently empty implementation)
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
|
overridevirtual |
Shuts down the VR-Forces launch connector.
Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.
|
protectedvirtual |
Handles messages to set backend configuration.
| msg | Pointer to the backend configuration message |
Processes configuration messages to set session ID, plugins, RTDynamics, console visibility, and command line arguments
|
protectedvirtual |
Handles messages to launch a simulation process.
| msg | Pointer to the launch simulation message |
Processes launch requests by calling launchVrfBackend with the current configuration settings
|
protectedvirtual |
Launches a simulation engine with specified parameters.
| address | The site/app ID to use |
| sessionId | VR-Engage's session ID |
| simType | Integer representing the type of simulation to use |
| pluginBaseNames | List of plugin names to include |
| showConsole | Flag indicating whether to show the console window |
| additionalArguments | Additional command line arguments |
Launches a VR-Forces backend process with the specified configuration. See vrfSimEngineCommand for details on command line generation.
|
protectedvirtual |
Gets the application executable path.
Provides the protocol-specific path to the VR-Forces application executable
|
protectedvirtual |
Generates connection-specific settings string.
| address | The site/app ID to use |
| additionalArguments | User-defined arguments from playerStation.lua |
Creates a string with protocol-specific connection parameters for the VR-Forces backend, merging with user-specified additional arguments
|
protectedvirtual |
Gets the protocol name.
Returns the protocol-specific name used in command line parameters
|
protected |
Pointer to the exercise connection initializer.
Contains connection settings like federation name, exercise ID, etc.
|
protected |
Session ID for the backend.
Used to uniquely identify this session in the simulation
|
protected |
List of plugin base names to load.
|
protected |
Flag indicating whether to show the console window.
|
protected |
Additional command line arguments.