VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Remote Control Command Line Options

This subclass of DtVrlApplicationInitializer adds command line options for the HLA version of the example.


Header file:


Implementation:

This subclass of DtVrlApplicationInitializer adds command line options for the HLA version of the example.


Header file:

/*******************************************************************************
** Copyright (c) 2025 MaK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
#pragma once
#include <vl/exerciseConnInitializer.h>
#include <vlutil/vlString.h>
#include <mtl/mtlEnvironment.h>
#include <matrix/vlVector.h>
class DtMtlEnvironment;
//DtRemoteControlInitializer derives from DtVrlApplicationInitializer and
//configures command line arguments for the remoteControl application.
//DtVrlApplicationInitializer contains
//default behavior for protocol specific parameters, while
//DtRemoteControlInitializer contains behavior particular to the remoteControl
//application.
//
//parseCmdLine() parses the command line arguments specified in
//this class and DtVrlApplicationInitializer. loadMtlFile() can be
//called (defined in DtVrlApplicationInitializer) with an MTL file name.
//This will parse the MTL file specified and set those variables registered
{
public:
DtRemoteControlInitializer(int argc, char* argv[], const DtString& defaultConfigFilePath);
virtual ~DtRemoteControlInitializer() override;
virtual void setSessionId(int);
virtual int sessionId() const;
protected:
//Register the MTL/Command Line parameters. Non-virtual
//since they are called from the constructor
void initMtl();
void initCmdLine();
protected:
DtConfigVariable<int> mySessionId;
};

Implementation:

/*******************************************************************************
** Copyright (c) 2025 MaK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
#include <matrix/vlVector.h>
#include <matrix/geodeticCoord.h>
//Constructor -- Initialize the base class (will initialize protocol-specific
//parameters), command line arguments and mtl parameters
DtRemoteControlInitializer::DtRemoteControlInitializer(int argc, char* argv[], const DtString& defaultConfigFilePath)
: DtVrlApplicationInitializer(argc, argv, "remoteControl", defaultConfigFilePath)
, mySessionId(exerciseConnectionConfig()->settings(), "sess&ionId", 1, "Session id of the simulation")
{
initMtl();
initCmdLine();
}
{
}
//Registers the MTL parameters
{
}
//Initializes the command line parameters
{
}
//--------------------------------------------------------------
// ACCESSORS/MODIFIERS
// Provide a way to inspect/modify the data
//--------------------------------------------------------------
{
mySessionId.setValue(i);
}
{
return mySessionId.value();
}

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)