VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Back-End Remote Control Aerodromes (remoteControlAerodromes)

The Back-End Remote Control Aerodromes example demonstrates the following:

How to Run the Example

This example demonstrates how to use the remote control API for controlling a VR-Forces back-end. It is a standalone console application that enables users to manipulate VR-Forces aerodromes scenarios through a simple text interface.

Usage

(Release) remoteControlAerodromes

(Debug) remoteControlAerodromesd

To run the application:

Before using the remoteControlAerodromes application, you need to have a scenario loaded on VR-Forces that already has aerodromes/runways objects created. You can use your own one, or the one provided with that example.

  1. Start a VR-Forces Launcher and select DIS localhost
  2. When VR-Forces is launched, load the scenario developer_toolkit_examples/remoteControlAerodromes/aerodromesScenario.scn
  3. Open a command line and switch to the VR-Forces "bin" directory
  4. Start remoteControlAerodromes as "remoteControlAerodromesDIS"
  5. Enter "help" to display the complete list of commands
  6. Enter commands in the remoteControlAerodromes console as desired, to modify or retreive aerodromes/runway objects dats.

The results of the commands will be observable in the VR-Forces GUI. The GUI only being used as a passive display in this example. The remoteControlAerodromes application is the one actually controlling VR-Forces back-end. Note that location and point parameters should be entered using the geocentric coordinate system.

This example now includes simple usage of the DtRemoteEnvironmentController.

Classes

DtRemoteControlInitializerThis subclass of DtVrlApplicationInitializer adds command line options for the HLA version of the example.
DtTextInterfaceThis class allows the user to type in commands that will be parsed and used to supply information to the remote controller.

Plugin Entry Points

/*******************************************************************************
** Copyright (c) 2021 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
/*******************************************************************************
** $RCSfile: main.cxx,v $ $Revision: 1.13 $ $State: Exp $
*******************************************************************************/
#include "textIf.h"
#include "remoteControlInit.h"
//VR-Forces headers
//VR-Link headers
#include <vl/exerciseConn.h>
#include <vlutil/vlProcessControl.h>
int main(int argc, char** argv)
{
//Create initializer object used to provide initialization data to the
//exercise connection, configured through command line arugments.
DtRemoteControlInitializer appInitializer(argc, argv);
appInitializer.parseCmdLine();
//Create the controller
//Create an exercise connection
DtExerciseConn* exConn = new DtExerciseConn(appInitializer);
controller->init(exConn);
//Create our text interface so we can enter text commands.
DtTextInterface* textIf = new DtTextInterface(controller);
//Processing: read stdin and call drainInput.
//Calling drainInput() ensures that the controller receives
//necessary feedback from VR-Forces backend applications.
while (!textIf->timeToQuit())
{
textIf->readStdin();
exConn->clock()->setSimTime(exConn->clock()->elapsedRealTime());
exConn->drainInput();
DtSleep(0.1);
}
delete textIf;
delete controller;
delete exConn;
return 0;
}

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)