|
VR-Engage
2.2
|
This class processes command line arguments for the VREngage application and configures the application accordingly. It extends the VR-Forces command line processor with support for protocol-specific options (–dis, –hla13, –hla1516, or –hla1516e). Using these options generates and auto-starts a new driver using the supplied arguments.
#include <vreCommandLineProcessor.h>
Classes | |
| struct | BaseArgs |
| struct | DisArgs |
| struct | Hla13Args |
| struct | Hla1516Args |
| struct | Hla1516eArgs |
| struct | VreArgs |
Public Member Functions | |
| DtVreCommandLineProcessor () | |
| virtual | ~DtVreCommandLineProcessor () override |
| virtual void | processCommandLine (makVrv::DtVrvApplicationConfiguration &appConfig, int argc, char **argv) override |
| virtual void | removeAutoStartDriver () |
| const std::string & | autoStartDriver () const |
| std::string | customSettingsFile () const |
| std::string | customSettingsString () const |
| std::string | stationName () const |
| std::string | applicationMode () const |
Protected Types | |
| using | DtAdditionalCommandsFcn |
Protected Member Functions | |
| virtual void | processArgs (makVrv::DtVrvApplicationConfiguration &appConfig, VreArgs &args) |
| virtual void | createDriver (const makVrv::DtVrvApplicationConfiguration &appConfig, const makVrv::DtConfiguration &config, BaseArgs *baseArgs, std::string &autoStarted) |
| virtual std::string | createDriver (const makVrv::DtVrvApplicationConfiguration &app, const makVrv::DtConfiguration &config, const std::string &driverName, const std::string &driverClass, std::string &fullName) |
| virtual std::string | createDriverFileName (const makVrv::DtVrvApplicationConfiguration &app, const std::string &driverClass, const std::string &driverName) |
| virtual void | addHlaCommandArguments (std::vector< DtCmdLine::Arg * > &argumentOrder, VreArgs &args, Hla13Args *hlaArgs) |
| virtual void | setupArguments (VreArgs &args, std::vector< DtCmdLine::Arg * > &argumentOrder) |
Protocol-Specific Argument Handlers | |
Methods to add protocol-specific flags to the parser These methods are called when the optional flags "--dis", "--hla13", etc. are found on the command line to add protocol-specific command line arguments. | |
| virtual void | addDisCommandArguments (std::vector< DtCmdLine::Arg * > &argumentOrder, VreArgs &args) |
| virtual void | addHla13CommandArguments (std::vector< DtCmdLine::Arg * > &argumentOrder, VreArgs &args) |
| virtual void | addHla1516CommandArguments (std::vector< DtCmdLine::Arg * > &argumentOrder, VreArgs &args) |
| virtual void | addHla1516eCommandArguments (std::vector< DtCmdLine::Arg * > &argumentOrder, VreArgs &args) |
Protected Attributes | |
| std::map< std::string, DtAdditionalCommandsFcn > | myAdditionalCommands |
| std::string | myAutoStartDriver |
| std::vector< DtCmdLine::Arg * > | myAdditionalCommandLineArguments |
| std::string | myApplicationMode |
|
protected |
| makVre::DtVreCommandLineProcessor::DtVreCommandLineProcessor | ( | ) |
Default constructor.
Creates a command line processor for VREngage and initializes the command line options
|
overridevirtual |
Virtual destructor.
Cleans up any resources allocated by the command line processor
|
overridevirtual |
Processes command line arguments and updates application configuration.
| appConfig | Application configuration to update based on command line args |
| argc | Number of command line arguments |
| argv | Array of command line argument strings |
This method parses the command line arguments and modifies the application configuration accordingly. It handles protocol-specific options and creates drivers as needed.
|
virtual |
Removes any automatically created driver.
This method deletes any driver that was created by the command line processor for automatic connection startup
|
inline |
Gets the name of the automatically created driver.
This method returns the name of the driver that was automatically created based on command line arguments
References myAutoStartDriver.
Referenced by makVre::DtVreCommandLineProcessor::BaseArgs::processArgs(), makVre::DtVreCommandLineProcessor::DisArgs::processArgs(), and makVre::DtVreCommandLineProcessor::Hla13Args::processArgs().
| std::string makVre::DtVreCommandLineProcessor::customSettingsFile | ( | ) | const |
Gets the initialization settings file path.
Returns the initialization settings file path specified on the command line
| std::string makVre::DtVreCommandLineProcessor::customSettingsString | ( | ) | const |
| std::string makVre::DtVreCommandLineProcessor::stationName | ( | ) | const |
Gets the station name.
Returns the station name specified on the command line
| std::string makVre::DtVreCommandLineProcessor::applicationMode | ( | ) | const |
Gets the application mode.
Returns the application mode specified on the command line (e.g., air, ground, sensor)
|
protectedvirtual |
Updates application configuration based on parsed arguments.
| appConfig | Application configuration to update |
| args | Parsed command line arguments |
This method updates the application configuration based on the command line arguments that have been parsed into the VreArgs structure
|
protectedvirtual |
Creates a new driver after removing existing VR-Forces drivers.
| appConfig | Application configuration |
| config | Driver configuration |
| baseArgs | Base arguments for driver creation |
| autoStarted | Output parameter to store the name of the created driver |
This method removes all existing drivers created by VR-Forces from the drivers path and creates a new driver based on the provided configuration
|
protectedvirtual |
Creates a new driver file with specific name and class.
| app | Application configuration |
| config | Driver configuration |
| driverName | Name for the driver |
| driverClass | Class of the driver |
| fullName | Output parameter to store the full path of the created driver |
This method creates a new driver file based on the provided configuration, with the specified name and class
|
protectedvirtual |
Generates a filename for a new auto-start driver file.
| app | Application configuration |
| driverClass | Class of the driver |
| driverName | Name of the driver |
This method generates an appropriate filename for a new auto-start driver file
|
protectedvirtual |
Adds DIS-specific command line arguments.
| argumentOrder | Vector of arguments to append to |
| args | VreArgs structure to update with new arguments |
|
protectedvirtual |
Adds HLA 1.3 specific command line arguments.
| argumentOrder | Vector of arguments to append to |
| args | VreArgs structure to update with new arguments |
|
protectedvirtual |
Adds HLA 1516 specific command line arguments.
| argumentOrder | Vector of arguments to append to |
| args | VreArgs structure to update with new arguments |
|
protectedvirtual |
Adds HLA 1516e specific command line arguments.
| argumentOrder | Vector of arguments to append to |
| args | VreArgs structure to update with new arguments |
|
protectedvirtual |
Adds command line arguments common to all HLA versions.
| argumentOrder | Vector of arguments to append to |
| args | VreArgs structure to update with new arguments |
| hlaArgs | HLA-specific arguments structure to update |
This method adds command line arguments that are common to all HLA versions
|
protectedvirtual |
Sets up default argument values.
| args | VreArgs structure to set up defaults for |
| argumentOrder | Vector of arguments to append to |
This method initializes default values for any command line arguments not explicitly specified by the user
|
protected |
Map of command names to handler functions for additional commands.
|
protected |
Name of the automatically created driver.
Referenced by autoStartDriver().
|
protected |
List of additional command line arguments.
|
protected |
Current application mode.