![]() |
VR-Forces 4.10 Class Documentation
|
This example extends the Simuulation Object Editor to be able to support new sim components.
This allows the SOE to recognize user created sim components and understand what descriptors are used to configure these components. This allows user created systems that utilize new sim components to be read and written by the SOE.
The Radar Warning Editor example demonstrates the following:
This example is related to the Radar Warn back-end example and registers the new sim components from that example with the SOE.
To load this plugin into the Simulation Object Editor, open a command prompt in the bin64 directory and run the following command:
simulationObjectEditor --loadPlugin ../examples/radarWarnRx/radarWarnRxEditor/build64/RelWithDebInfo/radarWarnRxEditor
/*******************************************************************************
** Copyright (c) 2013 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
// 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 <vrfGuiCore/vrfGuiExportPlugin.h>
#include "simulationObjectEditorImpl/simulationObjectEditorApplication.h"
#include "vrfobjparam/simComponentDescriptorTypes.h"
#include "../radarWarnRxSim/radarWarningReceiverDesc.h"
// Entry point that must be defined by all plugins, this is called as part of the process that loads the plugin, before the de
// is fully initialized
bool initDeModule(makVrv::DtDe* de)
{
// The Simulation Object Editor needs to be informed of new component types, and what
// type of descriptor they use.
// When adding a new descriptor type in the plugin, the creator function for the
// descriptor must be specified as well.
DtParameterAlteringApplication::app(*de)->addSensor("simple-radar-warning-receiver", DtRadarWarningReceiverDescriptorType,
DtRadarWarningReceiverDescriptor::creator);
// If a descriptor that is already part of VRF is being used, then simply specifying
// the type identifier string for it and leaving the creator function as the default
// is sufficient.
DtParameterAlteringApplication::app(*de)->addController("simple-radar-warning-response", DtBaseComponentDescriptorType);
return true;
}
void DtPluginInformation(DtVrfPluginInformation& info)
{
info.pluginName = "radarWarnRx Simulation Object Editor Plugin";
info.pluginVersion = "1.1";
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";
}