VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Add Simulation Command (addSimCommandSim)

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

In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the plugin.

To view the new behavior:

  1. Start VR-Forces GUI and SIM.
  2. Create a new scenario - e.g. EntityLevel SMS on Ground_DB II terrain.
  3. Create a M1A2 entity.
  4. Right-click on entity and select 'Plan...'.
  5. In the 'Plan' dialog, select Commands -> My Sim Command Message... to bring up dialog for new command.
  6. In 'Simulation Command Message Example' dialog, type in an arbitrary message. It will get displayed in the entity's console window when the command is executed.
  7. Click OK to close the 'Simulation Command Message Example' dialog.
  8. Click OK to close the 'Plan' dialog for the entity.
  9. Right-click>Information on the entity to display its information window.
  10. Click on the 'play' button.
  11. Note that the text you typed in to the 'Simulation Command Message Example' dialog appears in the entity information window and in the sim engine 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 = "10 Fawcett Street, Suite 204, Cambridge, MA 02138 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 Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)