VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVrfLaunchConnector Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtVrfLaunchConnector:
[legend]

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
DtPlayerStationAppmyApp
 
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)
 

Constructor & Destructor Documentation

◆ DtVrfLaunchConnector()

makVre::DtVrfLaunchConnector::DtVrfLaunchConnector ( )

Default constructor.

◆ ~DtVrfLaunchConnector()

virtual makVre::DtVrfLaunchConnector::~DtVrfLaunchConnector ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ vrfSimEngineCommand()

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.

Parameters
addressThe site/app ID to use
sessionIdVR-Engage's session ID
simTypeInteger representing the type of simulation use (full VR-Forces sim engine, ownship-only sim engine, or limited backend)
pluginBaseNamesList of plugin names specified in appData\scripts\playerStation.lua
additionalArgumentsValue of additionalBackendCommandLineParameters defined in playerStation.lua (modified by this function)
Returns
The full simulation engine launch command string

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.

◆ install()

virtual void makVre::DtVrfLaunchConnector::install ( DtPlayerStationApp * app,
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection * connection,
const DtExerciseConnInitializer * exerciseConnInitializer )
virtual

Installs the VR-Forces launch connector with the application and connection.

Parameters
appPointer to the player station application
connectionPointer to the protocol-specific VR-Link connection
exerciseConnInitializerPointer to the exercise connection initializer

Initializes the connector with the provided connection information and registers message handlers for backend configuration and launch requests

◆ tick()

virtual void makVre::DtVrfLaunchConnector::tick ( )
overridevirtual

Performs periodic processing (currently empty implementation)

Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.

◆ shutdown()

virtual void makVre::DtVrfLaunchConnector::shutdown ( )
overridevirtual

Shuts down the VR-Forces launch connector.

Reimplemented from makVre::DT_PROTOCOL_NAMESPACE::DtSimEventConnector.

◆ handleSetBackendConfig()

virtual makVre::DtVreMessageResult makVre::DtVrfLaunchConnector::handleSetBackendConfig ( makVre::DtVreMessage * msg)
protectedvirtual

Handles messages to set backend configuration.

Parameters
msgPointer to the backend configuration message
Returns
Message result indicating how the message was handled

Processes configuration messages to set session ID, plugins, RTDynamics, console visibility, and command line arguments

◆ handleLaunchSimProcess()

virtual makVre::DtVreMessageResult makVre::DtVrfLaunchConnector::handleLaunchSimProcess ( makVre::DtVreMessage * msg)
protectedvirtual

Handles messages to launch a simulation process.

Parameters
msgPointer to the launch simulation message
Returns
Message result indicating how the message was handled

Processes launch requests by calling launchVrfBackend with the current configuration settings

◆ launchVrfBackend()

virtual void makVre::DtVrfLaunchConnector::launchVrfBackend ( const DtSimulationAddress & address,
int sessionId,
int simType,
const std::vector< std::string > & pluginBaseNames,
bool showConsole,
std::string & additionalArguments )
protectedvirtual

Launches a simulation engine with specified parameters.

Parameters
addressThe site/app ID to use
sessionIdVR-Engage's session ID
simTypeInteger representing the type of simulation to use
pluginBaseNamesList of plugin names to include
showConsoleFlag indicating whether to show the console window
additionalArgumentsAdditional command line arguments

Launches a VR-Forces backend process with the specified configuration. See vrfSimEngineCommand for details on command line generation.

◆ application()

virtual std::string makVre::DtVrfLaunchConnector::application ( ) const
protectedvirtual

Gets the application executable path.

Returns
String containing the path to the application executable

Provides the protocol-specific path to the VR-Forces application executable

◆ connectionParameters()

virtual std::string makVre::DtVrfLaunchConnector::connectionParameters ( const DtSimulationAddress & address,
std::string & additionalArguments ) const
protectedvirtual

Generates connection-specific settings string.

Parameters
addressThe site/app ID to use
additionalArgumentsUser-defined arguments from playerStation.lua
Returns
String containing all relevant connection parameters

Creates a string with protocol-specific connection parameters for the VR-Forces backend, merging with user-specified additional arguments

◆ protocol()

virtual std::string makVre::DtVrfLaunchConnector::protocol ( ) const
protectedvirtual

Gets the protocol name.

Returns
String containing the protocol name (DIS, HLA 1.3, HLA 1516, or HLA 1516e)

Returns the protocol-specific name used in command line parameters

Member Data Documentation

◆ myExerciseConnInitializer

const DtExerciseConnInitializer* makVre::DtVrfLaunchConnector::myExerciseConnInitializer
protected

Pointer to the exercise connection initializer.

Contains connection settings like federation name, exercise ID, etc.

◆ mySessionId

int makVre::DtVrfLaunchConnector::mySessionId
protected

Session ID for the backend.

Used to uniquely identify this session in the simulation

◆ myPlugins

std::vector<std::string> makVre::DtVrfLaunchConnector::myPlugins
protected

List of plugin base names to load.

◆ myShowConsole

bool makVre::DtVrfLaunchConnector::myShowConsole
protected

Flag indicating whether to show the console window.

◆ myArguments

std::string makVre::DtVrfLaunchConnector::myArguments
protected

Additional command line arguments.


The documentation for this class was generated from the following file: