VR-Forces 4.1 Class Documentation
Add Simulation Command

Table of Contents

The Add Simulation Command example demonstrates the following:

The Add Simulation Command example adds a new simuation command which will receive and implement the new MySimCommand. Since this example is loaded as a plugin, it can be used in conjunction with the released VR-Forces application

How to Run the Example

This example demonstrates how to add a new kind of sim command.

Usage

Select Settings, Plugins... and on the Plugins Editor page, use the combo box at the top of the page to select the plug-in. Then enable the Load Plugin checkbox and re-start VR-Forces.

To view the new behavior:

  1. Create a new scenario.
  2. Create a M1A2 entity.
  3. Right-click on entity and select 'Plan...'.
  4. In the 'Plan' dialog, select Commands>My Sim Command Message... to bring up dialog for new command.
  5. In 'Simulation Command Message Example' window, type in an arbitrary message. It will get displayed in the entity's console window when the command is executed.
  6. Click OK in the 'My Sim Command' window.
  7. Click OK in the 'Plan' dialog for the entity.
  8. Right-click>Information on the entity to display its information window.
  9. Click on the 'play' button.

Note that the text you typed in to the 'My Sim Command' window appears in the back-end console, prefaced by the name of the entity.\

Classes

MySimCommandThe subclass of DtSimCommand that is used to communicate the new simulation command.
MySimCommandExecutorThe subclass of DtSimCommandExecutor implements the MySimCommand command.

Plugin Entry Points

/*******************************************************************************
** Copyright (c) 2006 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
/*******************************************************************************
** $RCSfile: plugin.cxx,v $ $Revision: 1.1 $ $State: Exp $
*******************************************************************************/
#include "mySimCommand.h"
#include "vrfcgf/cgf.h"
extern "C" {
{
info.pluginName = "Add Sim Command Sim";
info.pluginVersion = "1.00";
info.pluginCreator = "MAK Technologies";
info.pluginCreatorEmail = "sales@mak.com";
info.pluginContactWebPage = "www.mak.com";
info.pluginContactMailingAddress = "150 Cambridge Park Drive 3rd Floor - Cambridge, MA 02140 USA";
info.pluginContactPhone = "(617) 876 8085";
}
DT_VRF_DLL_PLUGIN bool DtInitializeVrfPlugin(DtCgf* cgf)
{
//For simulation commands, the executor and the message both need to be registered
return true;
}
}

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)