VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Interface Content (interfaceContentGui)

Table of Contents

The Interface Content example demonstrates the following:

Creating a New Type of Interface Message

The Interface Content example creates a new type of VRF interface message class MyInterfaceContent which demonstrates how to send and receive interface content messages from the front and back-end.

Since this example is loaded as a plugin, it can be used in conjunction with the released VR-Forces 3D application

How to Run the Example

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. There is no need to load an existing or create a new scenario.
  3. A new menu item - 'Send Interface Content Message...' will be created under the Simulation menu.
  4. Type in a message in the displayed Interface Content dialog, and press OK button to send the message.
  5. The SIM will receive the message and send an acknowledgement to the GUI.
  6. Upon receipt, both SIM and GUI will print a message to their console windows.

Classes

MyInterfaceContentThe Interface Content Message.

Plugin Entry Points

/*******************************************************************************
** Copyright (c) 2014 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
//\file interfaceContentPlugin.cxx
//\brief Contains plugin function
//This file defines the generic DT_DLL_VRF_PLUGIN_EXPORT_MACRO. Use that macro when
//you want to export symbols. Also, in your CMakeLists.txt file, make sure to
//define the VRFPLUGIN_EXPORTS define to tell the compiler to define the macro as an
//export
#include "../interfaceContentSim/myInterfaceContent.h"
#include <vrvCore/DtDe.h>
using namespace makVrf;
{
makVrv::DtMenuPath::mainMenu(DtSimulationMenuId).item("DtInterfaceContentMenuItem"),
//Register the creator for MyInterfaceContentType with the
//DtInterfaceContentFactory
MyInterfaceContentType).connect(boost::bind(&vrfInterfaceContentExample::
DtInterfaceContentMenuItem::processInterfaceMessage, menuItem, _1));
return true;
}
{
info.pluginName = "interfaceContentGui";
info.pluginDescription = "This is an example of how to add a new interface message in the VRF back-end.";
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";
}

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)