VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TDL Message Extension (tdlMessagSim)

Table of Contents

The VR-Forces TDL (Tactical Data Link) system sends VR-Forces-specific TDL messages that are handled outside of the normal VR-Forces Spot Report and Data Interaction messages.

The VR-Forces TDL messages are shown as icons on the screen (like spot reports), containing a fixed number of additional "lines" of information. You can show the extended TDL lines of information by selecting which information to show on the Application Settings dialog box, TDL Settings page.

This example adds a new line of information about the entity that is currently being targeted by the reporting entity. A new controller ExampleTDLMessageGeneratorController is created and used by the fixed-wing entity to report what target it has targeted. The developer toolkit SMS tdlMessage is used in conjunction with this example.

The tdlMessagSim example demonstrates how to add a new TDL message sending component and connect it to controller components. This component listens for the Set Target command for the fixed-wing entity and then sends out a new VR-Forces TDL message that contains that information. This information is then associated with a previous VR-Forces PPLI message that was sent for the positioning of the fixed-wing and shows this new information.

The TDL Message Extension example demonstrates the following:

Implementing the TDL Message Generator class

The ExampleTDLMessageGeneratorController implements a few main methods:

The fillInMessage method is called when the message has determined it needs to be resent by the system. The method uses the newly created ExampleTDLMessage message to fill in the location of the reporting entity at the time of the report and a string message text for who the entity is targeting.

The messageNeedsUpdate message determines whether or not an update to this message needs to be sent. It is sent if the target has moved a certain distance, is newly set, or has been destroyed.

In the Launcher, click the Plug-ins button to bring up the Plug-ins Selection dialog. Enable the both the tdlMessageSim and tdlMessageGuiAccessory plugins for this example to work.

  1. Start vrfGui.
  2. Load the tdlMessage scenario from the userData/tdlExample directory
  3. Select an item to create
  4. Choose Settings > Application. Select the Tactical Data Link Settings page and make sure the processing of TDL Messages is enabled.
  5. Go to the display tab and make sure TDL Line 4 is checked (this is where the example data will be displayed)
  6. Go to the spot reports tab and turn off ground truth for all items just so you will only see the TDL messages.
  7. Play the scenario.
  8. The friendly fixed wing will have a symbol decoration line showing who the fixed wing is tracking.

When you are done with the scenario, make sure to turn on ground truth for all items and to turn of TDL Message handling so the next scenario run goes as expected.

Classes

ExampleTDLMessageThe message that contains the new VR-Forces TDL Message.
ExampleTDLMessageGeneratorControllerThis subclass of DtVrfTDLMessageGeneratorController will monitor the set target message and send a new TDL message when the target is selected.
ExampleTDLMessageGeneratorControllerPSRThis subclass of DtTDLMessageGeneratorControllerPSR allows for the controller to heartbeat the message appropriately and to maintain an up-to-date location for that entity to send with the new message.

Plugin Entry Points

/*******************************************************************************
** Copyright (c) 2018 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/

//Example includes
#include "exTDLMessage.h"
#include "exTDLMessageGeneratorController.h"
#include "exTDLMessageGeneratorControllerPSR.h"

//VR-Forces includes
#include "vrfcgf/vrfPluginExtension.h"

//VR-Forces includes
#include "vrfcgf/cgf.h"
#include "vrfcgf/factoryManager.h"
#include "vrfcore/simManager.h"
#include "vrfMsgTransport/vrfMessageInterface.h"
#include "vrfmsgs/vrfTDLMessageFactory.h"
#include "vrfmsgs/simInterfaceMessage.h"
#include "vrfutil/consoleCommandManager.h"

//VR-Link includes
#include <vlutil/vlPrint.h>
#include <vl/exerciseConn.h>

static DtSimulationAddress theSimulationAddress;
static DtSimManager* theSimManager = 0;
static int theOutgoingMessageNumber = 0;

extern "C" {
   
   DT_VRF_DLL_PLUGIN void DtPluginInformation(DtVrfPluginInformation& info)
   {
      info.pluginName = "exTDLMessageSim";
      info.pluginDescription = "This is an example of how to add a new tactical data link 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";
   }

   DT_VRF_DLL_PLUGIN bool DtInitializeVrfPlugin(DtCgf* cgf)
   {          
      //Register the creator for MyInterfaceContentType with the
      //DtInterfaceContentFactory
      cgf->factoryManager()->vrfTDLMessageFactory()->addCreatorFcn(
         ExampleTDLMessageType, ExampleTDLMessage::creator);

      cgf->factoryManager()->componentFactory()->addCreatorFcn(
         ExampleTDLMessageGeneratorControllerType, ExampleTDLMessageGeneratorController::creator);

      cgf->factoryManager()->processStateRepositoryFactory()->addCreatorFcn(
         ExampleTDLMessageGeneratorControllPSRType, ExampleTDLMessageGeneratorControllerPSR::creator);

      return true;
   }
}


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)