VR-Forces 4.2 Class Documentation
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtCgf Class Reference

An instance of DtCgf is an object representing a CGF (Computer Generated Forces). More...

Public Member Functions

 DtCgf (const DtSimulationAddress &addr, DtU32 sessionId=1)
 Constructor.
virtual void init (DtExerciseConn *conn, DtVrfCreator *creator=0, int entityAdvisory=100)
 Init function - creates and initializes all the factories, members, and other objects used by the cgf to perform the simulation.
virtual ~DtCgf ()
 Destructor.
virtual void tick ()
 Tick the simulation engine, allowing our internal clock to determine the current time.
virtual void sendFinalStatus ()
 Sends a final status which is to indicate this cgf is being deleted and ticks the exercise connection to send out.
virtual bool importScenarioDescriptionFile (const DtFilename &file, const DtString &format, const std::map< std::string, std::string > &importData)
 I. Scenario management.
virtual DtString exportScenarioDescriptionFile (const DtFilename &file, const DtString &format, const std::map< std::string, std::string > &exportData)
 Exports the information from the current scenario to the specified file format using the supplied file as the base.
virtual bool loadScenario (const DtFilename &name)
 Load the specified scenario file, making it the current scenario.
virtual bool loadScenario (const DtScenario &scenario)
 Load the specified scenario, making it the current scenario.
virtual bool newScenario (const DtFilename &dbname=DtFilename::nullFilename(), const DtFilename &simulationModelSet=DtFilename::nullFilename())
 Create a new scenario, making it the current scenario.
virtual bool saveScenario (const DtFilename &savename)
 Save the current scenario.
virtual void closeScenario (const DtFilename &terrainToOpen="")
 Close the current scenario Removes all objects, unloads terrain.
virtual bool loadAdditionalObjectParameters (const DtFilename &paramsFileName)
 Loads an additional OPD file.
virtual void loadCoreSimulationModelSets ()
 Loads all "core" simulation model sets.
virtual void run ()
 Put the simulation engine into run mode.
virtual void pause ()
 Put the simulation engine into pause mode.
virtual void rewind ()
 Rewind the simulation engine.
virtual DtSimulationModelSetdefaultModelSet ()
 Returns default model set.
virtual void deleteObject (const DtString &name) const
 II. VR-Forces Object management.
virtual void deleteObject (const DtEntityIdentifier &objectIdentifier) const
 All VR-Force's objects can be deleted by their object identifier (site id : application id : object number).
virtual DtVrfObjectcreateWaypoint (const DtVector &localPosition, const DtString &uniqueName=DtString::nullString()) const
 A. Control objects.
virtual DtVrfObjectcreateRoute (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const
 Routes.
virtual DtVrfObjectcreatePhaseLine (const DtVector &dbPoint1, const DtVector &dbPoint2, const DtString &uniqueName=DtString::nullString()) const
 Phase Lines.
virtual DtVrfObjectcreateControlArea (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const
 Control Areas.
virtual DtVrfObjectcreateObstacle (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const
 Obstacles.
virtual DtVrfObjectcreateDisaggregationArea (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const
 Disaggregation Area.
virtual DtVrfObjectcreateEntity (const DtEntityType &entityType, DtForceType force, const DtVector &dbPosition, DtReal heading, const DtString &entityName=DtString::nullString(), bool allowBlocking=true, std::list< DtAdminContent * > *initialAdminContent=0) const
 B. Entity and Aggregate management.
virtual DtVrfObjectcreateAggregate (const DtEntityType &aggregateType, DtForceType force, const DtVector &localPosition, DtReal heading, DtList *subordinateNames=0, const DtString &aggregateName=DtString::nullString()) const
 Aggregates.
virtual DtVrfObjectcreateAggregate (const DtEntityType &aggregateType, DtForceType force, const DtVector &localPosition, DtReal heading, bool createSubordinates, const DtString &aggregateName=DtString::nullString(), bool allowBlocking=true) const
 Similar to previous function, but this version takes a bool createSubordinates argument instead of subordinateNames.
virtual bool addSubordinate (DtVrfObject *subordinate, DtVrfObject *aggregate)
 Add a subordinate to a given aggregate.
virtual bool removeSubordinate (DtVrfObject *subordinate, DtVrfObject *aggregate)
 Remove a subordinate from given aggregate.
virtual void assignTask (DtVrfObject *entity, const DtSimTask &task)
 III. Plans and tasks.
virtual void sendSetDataRequest (DtVrfObject *entity, const DtSetDataRequest &request)
 Sends a set data request an entity.
virtual void assignPlanByName (const DtString &name, const DtPlan &plan)
 Assigns a plan to the named object.
virtual void abandonPlan (DtVrfObject *entity)
 Command the entity/aggregate corresponding to abandon its plan.
virtual void restartPlan (DtVrfObject *entity)
 Command the entity/aggregate corresponding to restart its plan.
virtual void logObjectConsoleToFile (DtVrfObject *object, DtFilename filename=DtFilename::nullFilename())
 Object Logging.
virtual void stopLoggingObjectConsoleToFile (DtVrfObject *object)
 Stops logging the console output for the object to a file.
virtual void setObjectConsoleNotificationLevel (DtVrfObject *object, DtNotifyLevelType level)
 Sets the notification level of a specific object console.
virtual DtSimManagersimManager () const
 Accessors.
virtual
DtImportExportScenarioDescriptionManager
importExportScenarioDescriptionManager () const
 Import scenario description manager.
virtual DtResourceMonitorresourceMonitor () const
 DtResourceMonitor maintains the requests for updating resources to the network or to the console.
virtual DtVrfObjectIdGenerator * vrfObjectIdGenerator () const
 DtVrfObjectIdGenerator creates new object ids for newly created publishers.
virtual DtFactoryManagerfactoryManager () const
 DtFactoryManager contains all of the class factories (e.g.
virtual DtVrfObjectManagervrfObjectManager () const
 DtVrfObjectManager maintains all of the simulated entities, aggregates, and control objects in the simulation.
virtual DtScriptedTaskManagerscriptedTaskManager () const
 DtScriptedTaskManager contains all the scripted tasks available.
virtual
DtScriptedObjectsMovementManager
ScriptedObjectsMovementManager () const
 DtScriptedObjectsMovementManager contains all the scripted movement objects.
virtual DtAggregateSpatialModelaggregateSpatialModel () const
 DtAggregateSpatialModel maintains the aggregate location state (position, orientation, and extent) of all aggregates in the simulation.
virtual DtDetonationManagerdetonationManager () const
 The detonation manager processes all the detonation interactions in the simulation and notifies the appropriate entities of relevant detonations.
virtual DtFireManagerfireManager () const
 The fire manager processes all the fire interactions in the simulation and notifies the appropriate entities of relevant for under-fire determination.
virtual DtScenarioExtrasMgrscenarioExtrasMgr () const
 The Scenario Extras manager holds scenario data not tied to a particular entity: Force and hostility data Spawn templates.
virtual DtVrfParameterDbparameterDatabase () const
 Parameter database used in creation and initialization of DtVrfObjects.
virtual DtGlobalPlanManagerglobalPlanManager ()
 DtGlobalPlanManager maintains the list of global (non-entity) plans.
virtual void setTerrainInterface (DtTerrainInterface *newTerrainDatabase)
 Sets the terrain database.
virtual void setPhysicalWorld (DtPhysicalWorld *newPhysicalWorld)
 Sets the physical world.
virtual DtScenarioscenario () const
 Current scenario. May be 0, if there is no scenario currently loaded.
virtual const DtSimulationAddress & simulationAddress () const
 DIS/RPR site Id/application Id simulation address.
virtual int sessionId () const
 Session id, which is an integer identifier used to determine which back-ends have simulation access/control over one another.
virtual DtVrfStatusPublisherstatusPublisher () const
 Status publisher.
virtual DtExerciseConn * exerciseConn () const
 Returns a pointer to the VR-Link exercise connection, through which all network PDUs/interactions are sent/received.
virtual DtStealthRemoteController * stealthRemoteController () const
 Returns a pointer to the stealth remote controller.
virtual void useMapDatum (const DtMapDatum &mapDatum)
 Set the DtMapDatum to use for geocentric to geodetic conversion.
virtual void setParameterDbLoaded (bool flag)
 Set to false to reload parameter database on next tick.
virtual void setMaxDrainInputTime (DtFloat64 maxTime)
virtual DtFloat64 maxDrainInputTime () const
virtual void setMinDrainInputTime (DtFloat64 minTime)
virtual DtFloat64 minDrainInputTime () const
virtual bool logFrameRateStatistics () const
virtual void setLogFrameRateStatistics (bool yesOrNo)
virtual void setLogFrameRateOutputDirectory (const DtFilename &)
virtual const DtFilename & logFrameRateOutputDirectory () const
virtual void setDefaultParameterDbDirectory (const DtFilename &filename)
 Set the default parameter database directory in which to look for the parameter database files specified in scenario files, after trying to look for the file relative to the application path.
virtual void setRunInTimeManagementMode (bool yesOrNo)
 Run in HLA time management mode.
virtual bool runInTimeManagementMode () const
virtual void processStartTimeManagement ()
 Starts/stops HLA time management.
virtual void processStopTimeManagement ()
virtual void setFullyLoadTerrain (bool yesOrNo)
virtual bool fullyLoadTerrain () const
virtual void addPluginToLoad (const DtString &)
 Plugin handling.
virtual void setLoadPluginsIfVersionMismatch (bool)
 Set to true if want to load plugins even if version mismatch.
virtual bool loadPluginsIfVersionMismatch () const
virtual bool executeSimCommand (const DtSimCommand &simCommand)
 Executes the provided simulation command using the DtSimCommandExecutor from the factory.
virtual void setForceParameterDbReload (bool reload)
 Forces loadScenario to reload the OPD when loadParameterDb() is called.
virtual bool forceParameterDbReload () const
 Forces loadScenario to reload the OPD when loadParameterDb() is called.
virtual void setEnableResourceMonitor (bool b)
 Enable/disable resource manager.
virtual bool isResourceMonitorEnabled () const
 Enable/disable resource manager.
virtual const DtFilename & defaultTerrainDirectory ()
 Set application instance (windows-only)
virtual void setDefaultTerrainDirectory (const DtFilename &directory)
 Set application instance (windows-only)
virtual const DtFilename & defaultSimulationModelSetFilename ()
 Set/get the name of the default simulation model set to load (what to load when no parameter database is specified).
virtual void setDefaultSimulationModelSetFilename (const DtFilename &filename)
 Set/get the name of the default simulation model set to load (what to load when no parameter database is specified).
virtual void setUseDIGuy (bool diguy)
 Turn on/off using DI-Guy Characters in Vr-forces.
virtual bool useDIGuy () const
 Turn on/off using DI-Guy Characters in Vr-forces.
virtual const DtFilename & diGuyCharacterDataFilename ()
 Set/get the name of the DI-Guy configuration files to load The Character Data file is generated from DI-Guy The Animations file is an mtl file used to extend and more fully define the animations from the character data file.
virtual void setDIGuyCharacterDataFilename (const DtFilename &filename)
 Set/get the name of the DI-Guy configuration files to load The Character Data file is generated from DI-Guy The Animations file is an mtl file used to extend and more fully define the animations from the character data file.
virtual const DtFilename & diGuyAnimationsFilename ()
 Set/get the name of the DI-Guy configuration files to load The Character Data file is generated from DI-Guy The Animations file is an mtl file used to extend and more fully define the animations from the character data file.
virtual void setDIGuyAnimationsFilename (const DtFilename &filename)
 Set/get the name of the DI-Guy configuration files to load The Character Data file is generated from DI-Guy The Animations file is an mtl file used to extend and more fully define the animations from the character data file.
virtual void setMsdlSIDCMappingFile (const DtFilename &)
 Set/get the msdl mapping file for SIDC codes to Dis Enumerations.
virtual const DtFilename & msdlSIDCMappingFile () const
 Set/get the msdl mapping file for SIDC codes to Dis Enumerations.
virtual void setCountryCodesMappingFile (const DtFilename &)
 Set/get the country codes to Dis Enumerations.
virtual const DtFilename & countryCodesMappingFile () const
 Set/get the country codes to Dis Enumerations.
virtual DtTerrainInterfaceterrainInterface ()
virtual const DtTerrainInterfaceterrainInterface () const
virtual DtPhysicalWorldphysicalWorld ()
virtual const DtPhysicalWorldphysicalWorld () const
virtual DtCommModelManagercommModelManager ()
virtual const DtCommModelManagercommModelManager () const
virtual void setAssertOnBlockingTerrainCalls (bool b)
 If true, blocking terrain calls will cause an assert when a debug back-end is in run mode.
virtual bool assertOnBlockingTerrainCalls () const
 If true, blocking terrain calls will cause an assert when a debug back-end is in run mode.
DtVrfCreatorvrfCreator ()
 Access the vrfCreator.
const DtVrfCreatorvrfCreator () const
 Access the vrfCreator.
virtual void addPreLoadTerrainCallback (DtCallbackList< const DtFilename & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before a new terrain is loaded, with the filename of the terrain passed into the callback.
virtual void removePreLoadTerrainCallback (DtCallbackList< const DtFilename & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before a new terrain is loaded, with the filename of the terrain passed into the callback.
virtual void addPostLoadTerrainCallback (DtCallbackList< const DtFilename & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just after a new terrain is loaded, with the filename of the terrain passed into the callback.
virtual void removePostLoadTerrainCallback (DtCallbackList< const DtFilename & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just after a new terrain is loaded, with the filename of the terrain passed into the callback.
virtual void addPreLoadScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before a new scenario is loaded.
virtual void removePreLoadScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before a new scenario is loaded.
virtual void addPostLoadScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked after a scenario is loaded.
virtual void removePostLoadScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked after a scenario is loaded.
virtual void addPreSaveScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the current scenario is saved.
virtual void removePreSaveScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the current scenario is saved.
virtual void addPostSaveScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just after the current scenario is saved.
virtual void removePostSaveScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just after the current scenario is saved.
virtual void addPreCloseScenarioCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the current scenario is closed.
virtual void removePreCloseScenarioCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the current scenario is closed.
virtual void addPostCloseScenarioCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just after the current scenario is closed.
virtual void removePostCloseScenarioCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just after the current scenario is closed.
virtual void addScenarioPauseCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the scenario is put into the pause state.
virtual void removeScenarioPauseCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the scenario is put into the pause state.
virtual void addScenarioRunCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the scenario is put into the run state.
virtual void removeScenarioRunCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the scenario is put into the run state.
virtual void addPreScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the scenario is rewound.
virtual void removePreScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just before the scenario is rewound.
virtual void addPostScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just after the scenario is done rewinding.
virtual void removePostScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked just after the scenario is done rewinding.
virtual void addPostTickCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked at the end of the tick function.
virtual void removePostTickCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData)
 Callbacks invoked at the end of the tick function.
virtual void setTimeToQuit (bool)
 If true, time for the app to quit.
virtual bool timeToQuit () const
 If true, time for the app to quit.

Static Public Member Functions

static void startTimeManagement (void *usr)
 Callback functions to be executed as post-drain callbacks on the DtExerciseConnection.
static void stopTimeManagement (void *usr)
static void objectParametersOpCallback (DtSimMessage *msg, void *usr)
 Callback for parameter database load/save messages.

Protected Types

typedef std::pair< std::string,
bool
ActionCategory
 Map of ID and screen string for action categories.
typedef std::map< std::string,
ActionCategory
ActionCategories

Protected Member Functions

virtual void processScenarioDescription (DtSimMessage *)
virtual void processActionCategoriesRequest (DtSimMessage *msg)
virtual void loadAllPlugins ()
 Called from init, will load all plugins scheduled to load by calling loadPlugin for each.
virtual bool loadComponentAttachmentTable (const DtFilename &filename)
 Clears out the current component attachment table and loads the specified file.
virtual bool loadTerrain (const DtFilename &filename)
 Load the given terrain database file filename, returning a pointer to the terrain data in terrain.
virtual DtFilename findTerrainFile (const DtFilename &startFile, const std::vector< DtFilename > &searchPaths, const std::string &extension) const
 Given the terrain filename, searchpaths, and extension to use (instead of the supplied extension) see if the terrain file can be found.
virtual void unloadTerrain ()
 Unload the terrain from memory.
virtual bool loadOrderOfBattle (const DtFilename &filename)
 Load the given order of battle file.
virtual bool loadScenarioScripts (const DtFilename &filename)
 Load the given scenario scripts file.
virtual bool loadParameterDb (const DtFilename &filename)
 Clears out the current parameter database and loads the given parameter database file.
virtual bool loadObjectParametersDBFile (const DtFilename &opdFile)
 Load the given opd file; Returns true upon success, false otherwise.
virtual bool loadPhysicalWorldFile (const DtFilename &file, bool force=false)
 Loads the file into the physical world object (if it exists).
virtual bool loadPlans (const DtFilename &filename)
 Load the given plan file.
virtual bool loadGlobalPlans (const DtFilename &filename)
 Load the specified global plan file.
virtual void loadHostilityAndExtras (const DtScenarioExplorer &se)
 A utility function that loads the following two sets of data.
virtual void loadModelSetFiles (const DtScenarioExplorer &)
 Loads the model set files for use with possible create by name commands.
virtual void loadActionCategories (const DtFilename &f)
 Loads the action categories that area available to resolve conflicting tasks.
virtual bool loadForceHostility (const DtFilename &filename)
virtual bool loadScenarioExtras (const DtFilename &filename)
virtual void processObjectParametersOp (DtSimMessage *msg)
 Process load/save parameter database messages.
virtual void emptyParametersDB ()
 Empties contents of parameter database and clears myDefaultParameterDatabase.
virtual void setFrameRateMode (const DtString &mode, DtReal deltaTime)
 Set the frame rate mode.
virtual void setAutoReorganization (bool onOff)
 Enable/disable auto-reorganization.
virtual void drainInput ()
 Calls drainInput() on exercise connection with the network specific variables.
virtual DtVrfPluginloadPlugin (const DtString &)
 Given the name of a plugin, load it from disk and initialize it with this cgf.
DtHlaExerciseClockexerciseClock () const
 Accessor for exercise clock (myExerciseClockPtr).
virtual bool setupCommModelsForScenario (const DtScenarioExplorer &e)
 Given the names of the SMS and scenario comm model file names, sets up all comm models.
virtual void updateReadyStatus ()
 Updates the readiness status of the back end by: 1) Is there a scenario present (myScenario pointer is not 0) 2) Can the simulation be simulated (all pending operations are complete.
virtual void processOrganizationManagerReady (const DtOrganizationManagerReadyCallbackInfo &)
 Callbacks invoked when the organization manager transitions states from ready to not ready.
void setVrfCreator (DtVrfCreator *creator)
 Sets the vrfCreator to use.
bool ownVrfCreator () const
 Set/get whether or not the vrfCreator is owned by the Cgf or not.
void setOwnVrfCreator (bool yesOrNo)
 Set/get whether or not the vrfCreator is owned by the Cgf or not.

Static Protected Member Functions

static void scenarioDescriptionCallback (DtSimMessage *, void *usr)
 Callback for scenario description requests.
static void actionCategoriesRequestCallback (DtSimMessage *msg, void *usr)
 Callback for request for action categories.
static void organizationManagerReadyCallback (const DtOrganizationManagerReadyCallbackInfo &, void *usr)
static DtOutputLoggergetGlobalFrameRateStatsLogger ()
 Static Logging Functions.
static std::string createStatsLogFilename (const std::string &originalFilename, const DtSimManager &simManager, const DtScenario *scenario, const DtFilename &logFrameRateDir)
static void logScenarioLoad (const DtSimManager &simManager, const DtScenario *scenario, const DtFilename &logFrameOutDir)
static void logScenarioRewind ()
static void logScenarioClose ()
static void logFrameRateStatsToFile (DtSimManager *simManager)

Protected Attributes

DtSimulationAddress mySimulationAddress
 Address for routing interface messages.
DtU32 mySessionId
 Session Id.
bool myOK
 Flag indicating whether we have been successfully initialized.
bool myTimeToQuit
 Flag indicating whether or not the app should quit.
DtVrfPluginManagermyPluginManager
 The current plugin manager.
std::vector< DtStringmyPluginsToLoad
bool myLoadPluginsIfVersionMismatch
DtTerrainInterfacemyTerrainInterface
 The current terrain database.
DtPhysicalWorldmyPhysicalWorld
 The current physical world.
DtCommModelManagermyCommModelManager
DtExerciseConn * myExerciseConn
 The current exercise connection.
DtSimManagermySimManager
 Pointer to the DtSimManager.
DtScenariomyScenario
 The current scenario.
DtVrfStatusPublishermyStatusPublisher
 Pointer to the DtStatusPublisher.
DtVrfObjectManagermyVrfObjectManager
 Pointer to the DtVrfObjectManager.
DtAggregateSpatialModelmyAggregateSpatialModel
DtDetonationManagermyDetonationManager
DtScriptedTaskManagermyScriptedTaskManager
DtScriptedObjectsMovementManagermyScriptedObjectsMovementManager
DtFireManagermyFireManager
DtLuaObjectSerializermyLuaObjectSerializer
DtResourceMonitormyResourceMonitor
 Pointer to the DtResourceMonitor.
DtVrfObjectIdGenerator * myVrfObjectIdGenerator
 Pointer to the DtVrfObjectIdGenerator.
DtVrfParameterDbmyParameterDatabase
 Pointer to the DtVrfParameterDb.
bool myForceParameterDbReload
 Forces loadScenario to re-load the parameter database.
DtGlobalPlanManagermyGlobalPlanManager
DtJoyDeviceManagermyJoyDeviceManager
 Pointer to the DtJoyDeviceManager.
DtHostilityManagermyHostilityManager
DtScenarioExtrasMgrmyScenarioExtrasManager
DtStealthRemoteController * myStealthRemoteController
 Pointer to the DtStealthRemoteController.
DtFactoryManagermyFactoryManager
 Pointer to the DtFactoryManager.
DtFilename myVrfTerrainPathDirectory
 Terrain data directory from environment variable VRF_TERRAIN_PATH.
DtFilename myDefaultTerrainDirectory
 Terrain database directory, initialized from VRF_defaultTerrainDatabasePath variable.
DtFilename myDefaultSimulationModelSetFilename
 Default simulation model set file to load.
bool myUseDIGuy
 Set true to use DI-Guy Characters in Vr-forces.
DtFilename myDIGuyCharacterDataFilename
 DI-Guy Character Data file.
DtFilename myDIGuyAnimationsFilename
 DI_Guy animation configuration file to load.
DtFilename myMsdlSIDCMappingFile
 MSDL SDIC mapping file to load.
DtFilename myCountryCodesMappingFile
 Country codes mapping file.
bool myParameterDbLoaded
 Set to true if parameter database has been loaded via loadParameterDatabase call.
DtFilename myCurrentParameterDatabaseFilename
 Filename of currently loaded parameter database.
DtFilename myDefaultParameterDbDirectory
 Default parameter database directory to search in when parameter database being specified is not an absolute path.
DtCallbackList< const
DtFilename & > 
myPreLoadTerrainCallbacks
DtCallbackList< const
DtFilename & > 
myPostLoadTerrainCallbacks
DtCallbackList< DtScenario & > myPreLoadScenarioCallbacks
DtCallbackList< const
DtScenario & > 
myPostLoadScenarioCallbacks
DtCallbackList< DtScenario & > myPreSaveScenarioCallbacks
DtCallbackList< const
DtScenario & > 
myPostSaveScenarioCallbacks
DtNoArgumentCallbackList myPreCloseScenarioCallbacks
DtNoArgumentCallbackList myPostCloseScenarioCallbacks
DtNoArgumentCallbackList myScenarioRunCallbacks
DtNoArgumentCallbackList myScenarioPauseCallbacks
DtNoArgumentCallbackList myPreScenarioRewindCallbacks
DtNoArgumentCallbackList myPostScenarioRewindCallbacks
DtNoArgumentCallbackList myPostTickCallbacks
DtFloat64 myMaxDrainInputTime
DtFloat64 myMinDrainInputTime
bool myLogFrameRateStatistics
 When set to true, the cgf will log frame rate statistics to disk.
DtFilename myLogFrameRateOutputDirectory
 Directory to place log file output.
bool myOwnVrfCreatorFlag
 These are essentially cached from the init call.
DtVrfCreatormyVrfCreator
bool myRunInTimeManagementMode
bool myFullyLoadTerrain
 Flag indicating whether to fully load terrain subpages for paged terrain.
bool myAssertOnBlockingTerrainCalls
 If true, blocking terrain calls will cause an assert when a debug back-end is in run mode.
DtHlaExerciseClockmyExerciseClockPtr
 Cache a pointer to the exercise clock (created by the DtSimManager) for convenience.
DtSimulationModelSetmyDefaultModelSet
 Default simulation model set.
DtScenario myScenarioToLoad
 Used to contain the scenario we want to during loadScenario operation.
bool myWasPaused
 Used to hold the paused state during a rewindScenario operaiton.
DtImportExportScenarioDescriptionManagermyImportScenarioDescriptionManager
 The scenario description manager used to import scenario description files.
DtConsoleCommandOwnermyConsoleCommands
ActionCategories myActionCategories

Private Member Functions

 DtCgf (const DtCgf &original)
 not implemented. Copying this class is not supported.
DtCgfoperator= (const DtCgf &original)
 not implemented. Copying this class is not supported.
static void simCommandCallback (DtSimMessage *msg, void *usr)
 Callback for receiving sim commands coming over the network.
virtual void processSimCommand (DtSimMessage *msg)
 Callback for receiving sim commands coming over the network.
static void deferredLoadScenarioCallback (void *data)
 Callback that performs the second-half of the work needed to load a scenario.
virtual void processDeferredLoadScenario ()
 Callback that performs the second-half of the work needed to load a scenario.
static void deferredRewindCallback (void *data)
 Callback that performs the second-half of the work needed to rewind a scenario.
virtual void processDeferredRewind ()
 Callback that performs the second-half of the work needed to rewind a scenario.

Detailed Description

An instance of DtCgf is an object representing a CGF (Computer Generated Forces).

Through this class you can control the high-level functions of a CGF, including the following:

Member Typedef Documentation

typedef std::pair<std::string, bool> DtCgf::ActionCategory
protected

Map of ID and screen string for action categories.

Only used by the front-end Not currently set up for modification unless editing original actionCategories.tsk

typedef std::map<std::string, ActionCategory> DtCgf::ActionCategories
protected

Constructor & Destructor Documentation

DtCgf::DtCgf ( const DtSimulationAddress &  addr,
DtU32  sessionId = 1 
)

Constructor.

Object is not usable until init is called. addr is the DIS/RPR site Id/application Id address of the simulation. sessionId indicates the session in which this CGF is participating. VR-Forces apps with the same session Id are capable of exchanging interface messages (and therefore capable of controlling one another, i.e. creating and destroying entities and objects, tasking, etc.).

virtual DtCgf::~DtCgf ( )
virtual

Destructor.

DtCgf::DtCgf ( const DtCgf original)
private

not implemented. Copying this class is not supported.

Member Function Documentation

virtual void DtCgf::init ( DtExerciseConn *  conn,
DtVrfCreator creator = 0,
int  entityAdvisory = 100 
)
virtual

Init function - creates and initializes all the factories, members, and other objects used by the cgf to perform the simulation.

Note that the order in which components are created is the order in which they are ticked.

Parameters
connA preexisting exercise connection. The cgf does not take ownership of the connect - the user is responsible for deleting it.
creatorAn optional parameter which defaults to 0. If not specified, the cgf will create its own DtVrfCreator, and maintain ownership over it. If the creator is user specified, then the cgf will maintain knowledge of it, but will not be responsible for ownership - the user must delete it.
entityAdvisoryAn estimate of the expected number of vrfobjects to be simulated. Defaults to 100.
Note
Because the creator is now used to create the terrain database, which is done in the loadTerrain() call, the creator must not be deleted until the cgf class is destroyed (or at the least, no more loadTerrain() calls are made.
The exercise connection also must not be deleted until after the cgf is destroyed.
virtual void DtCgf::tick ( )
virtual

Tick the simulation engine, allowing our internal clock to determine the current time.

virtual void DtCgf::sendFinalStatus ( )
virtual

Sends a final status which is to indicate this cgf is being deleted and ticks the exercise connection to send out.

virtual bool DtCgf::importScenarioDescriptionFile ( const DtFilename &  file,
const DtString format,
const std::map< std::string, std::string > &  importData 
)
virtual

I. Scenario management.

Imports the specified scenario description file into the current scenario.

virtual DtString DtCgf::exportScenarioDescriptionFile ( const DtFilename &  file,
const DtString format,
const std::map< std::string, std::string > &  exportData 
)
virtual

Exports the information from the current scenario to the specified file format using the supplied file as the base.

Will return the filename saved if successful, or empty filename if failure.

virtual bool DtCgf::loadScenario ( const DtFilename &  name)
virtual

Load the specified scenario file, making it the current scenario.

All objects in the scenario will be loaded, and the object map will not be processed. Calls loadScenario(const DtScenario& scenario).

virtual bool DtCgf::loadScenario ( const DtScenario scenario)
virtual

Load the specified scenario, making it the current scenario.

All objects in the scenario will be loaded, and the object map will not be processed. Note that this initiates the load scenario process, closing the current scenario, and then registering the post-tick callback deferredLoadScenario to complete the load operation. Calling tick() will complete the load.

virtual bool DtCgf::newScenario ( const DtFilename &  dbname = DtFilename::nullFilename(),
const DtFilename &  simulationModelSet = DtFilename::nullFilename() 
)
virtual

Create a new scenario, making it the current scenario.

If a terrain filename is specified, loads the terrain database after the first call to tick(). Loads the parameter database file. If no parameter database filename is given, loads the default parameter database.

Returns
true if successful, false otherwise.
virtual bool DtCgf::saveScenario ( const DtFilename &  savename)
virtual

Save the current scenario.

Only local objects will be saved into the scenario – objects from other back-ends will not be saved and an object map will not be created.

virtual void DtCgf::closeScenario ( const DtFilename &  terrainToOpen = "")
virtual

Close the current scenario Removes all objects, unloads terrain.

If terrainToOpen is specified will not unload the terrain if the terrain to be opened is the same one that is currently opened

virtual bool DtCgf::loadAdditionalObjectParameters ( const DtFilename &  paramsFileName)
virtual

Loads an additional OPD file.

Any types specified in the additional parameter database that already exist are replaced with the new entries. All others are added to the current set of parameters.

virtual void DtCgf::loadCoreSimulationModelSets ( )
virtual

Loads all "core" simulation model sets.

These are the SMSs that are in the simulationModelSets/core directory.

virtual void DtCgf::run ( )
virtual

Put the simulation engine into run mode.

By default, the CGF starts out in run mode.

virtual void DtCgf::pause ( )
virtual

Put the simulation engine into pause mode.

virtual void DtCgf::rewind ( )
virtual

Rewind the simulation engine.

Removes all objects, and loads last saved scenario files, if they exist. Does not unload terrain. Note that this initiates the rewind scenario process. It registers the post-tick callback deferredRewindScenario to complete the rewind operation.

virtual void DtCgf::setForceParameterDbReload ( bool  reload)
virtual

Forces loadScenario to reload the OPD when loadParameterDb() is called.

Normally, the parameter database is only reloaded if it has a different name than the one currently loaded.

Note
This only effects scenario loads, not running scenarios.
virtual bool DtCgf::forceParameterDbReload ( ) const
virtual

Forces loadScenario to reload the OPD when loadParameterDb() is called.

Normally, the parameter database is only reloaded if it has a different name than the one currently loaded.

Note
This only effects scenario loads, not running scenarios.
virtual void DtCgf::setEnableResourceMonitor ( bool  b)
virtual

Enable/disable resource manager.

When the resource manager is enabled, the sim will respond to network requests for resource status of various entities.

virtual bool DtCgf::isResourceMonitorEnabled ( ) const
virtual

Enable/disable resource manager.

When the resource manager is enabled, the sim will respond to network requests for resource status of various entities.

virtual const DtFilename& DtCgf::defaultTerrainDirectory ( )
virtual

Set application instance (windows-only)

Set/Get the default directory where terrain databases are searched for. Initialized from the VRF_defaultTerrainDatabasePath variable in the vrfSim.mtl config file. When searching for a given terrain database to load, it searches in the following order: 1 - Searches for terrain file using the filename in the scenario file (absolute path if one is specified, otherwise relative to the application path) 2 - Searches in the default terrain directory, given by the VRF_defaultTerrainDatabasePath 3 - Searches in in the VRF_TERRAIN_PATH environment variable, if the the variable is specified.

virtual void DtCgf::setDefaultTerrainDirectory ( const DtFilename &  directory)
virtual

Set application instance (windows-only)

Set/Get the default directory where terrain databases are searched for. Initialized from the VRF_defaultTerrainDatabasePath variable in the vrfSim.mtl config file. When searching for a given terrain database to load, it searches in the following order: 1 - Searches for terrain file using the filename in the scenario file (absolute path if one is specified, otherwise relative to the application path) 2 - Searches in the default terrain directory, given by the VRF_defaultTerrainDatabasePath 3 - Searches in in the VRF_TERRAIN_PATH environment variable, if the the variable is specified.

virtual const DtFilename& DtCgf::defaultSimulationModelSetFilename ( )
virtual

Set/get the name of the default simulation model set to load (what to load when no parameter database is specified).

By default, this file is ...sms. This simulation model set will be loaded on startup.

virtual void DtCgf::setDefaultSimulationModelSetFilename ( const DtFilename &  filename)
virtual

Set/get the name of the default simulation model set to load (what to load when no parameter database is specified).

By default, this file is ...sms. This simulation model set will be loaded on startup.

virtual void DtCgf::setUseDIGuy ( bool  diguy)
virtual

Turn on/off using DI-Guy Characters in Vr-forces.

virtual bool DtCgf::useDIGuy ( ) const
virtual

Turn on/off using DI-Guy Characters in Vr-forces.

virtual const DtFilename& DtCgf::diGuyCharacterDataFilename ( )
virtual

Set/get the name of the DI-Guy configuration files to load The Character Data file is generated from DI-Guy The Animations file is an mtl file used to extend and more fully define the animations from the character data file.

virtual void DtCgf::setDIGuyCharacterDataFilename ( const DtFilename &  filename)
virtual

Set/get the name of the DI-Guy configuration files to load The Character Data file is generated from DI-Guy The Animations file is an mtl file used to extend and more fully define the animations from the character data file.

virtual const DtFilename& DtCgf::diGuyAnimationsFilename ( )
virtual

Set/get the name of the DI-Guy configuration files to load The Character Data file is generated from DI-Guy The Animations file is an mtl file used to extend and more fully define the animations from the character data file.

virtual void DtCgf::setDIGuyAnimationsFilename ( const DtFilename &  filename)
virtual

Set/get the name of the DI-Guy configuration files to load The Character Data file is generated from DI-Guy The Animations file is an mtl file used to extend and more fully define the animations from the character data file.

virtual void DtCgf::setMsdlSIDCMappingFile ( const DtFilename &  )
virtual

Set/get the msdl mapping file for SIDC codes to Dis Enumerations.

virtual const DtFilename& DtCgf::msdlSIDCMappingFile ( ) const
virtual

Set/get the msdl mapping file for SIDC codes to Dis Enumerations.

virtual void DtCgf::setCountryCodesMappingFile ( const DtFilename &  )
virtual

Set/get the country codes to Dis Enumerations.

virtual const DtFilename& DtCgf::countryCodesMappingFile ( ) const
virtual

Set/get the country codes to Dis Enumerations.

virtual DtSimulationModelSet* DtCgf::defaultModelSet ( )
virtual

Returns default model set.

If one does not exist, will create and load one from the current default model set filename

virtual void DtCgf::deleteObject ( const DtString name) const
virtual

II. VR-Forces Object management.

All VR-Force's objects can be deleted by their unique name regardless of their type.

virtual void DtCgf::deleteObject ( const DtEntityIdentifier &  objectIdentifier) const
virtual

All VR-Force's objects can be deleted by their object identifier (site id : application id : object number).

virtual DtVrfObject* DtCgf::createWaypoint ( const DtVector localPosition,
const DtString uniqueName = DtString::nullString() 
) const
virtual

A. Control objects.

Waypoints Create a new waypoint. Returns a pointer to a newly created DtVrfObject representing the waypoint.

  • localPosition is the position of the waypoint in the coordinate system of the loaded terrain database.
  • uniqueName is the name of the new waypoint. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtVrfObject* DtCgf::createRoute ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Routes.

Create a new route. Returns a pointer to a newly created DtVrfObject representing the route.

  • vertices is the ordered DtList of DtVector*s, making up the vertices in the route, in local database coordinates. DtCgf does not take ownership of this list so it is the caller's responsibility to destroy it.
  • uniqueName is the name of the new route. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtVrfObject* DtCgf::createPhaseLine ( const DtVector dbPoint1,
const DtVector dbPoint2,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Phase Lines.

Create a new phase line. Returns a pointer to a newly created DtVrfObject representing the phase line. Phase lines are a 2-D line segment formed by 2 vertices.

  • dbPoint1 is the position of the 1st vertex in local coordinates.
  • dbPoint2 is the position of the 2nd vertex in local coordinates.
  • uniqueName is the name of the new phase line. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtVrfObject* DtCgf::createControlArea ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Control Areas.

Create a new control area. Returns a pointer to a newly created DtVrfObject representing the control area.

  • vertices is the ordered DtList of DtVector*s, making up the vertices in the control area, in local database coordinates. The vertices must form a convex polygon.
  • uniqueName is the name of the new control area. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtVrfObject* DtCgf::createObstacle ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Obstacles.

Create a new obstacle. Returns a pointer to a newly created DtVrfObject representing the obstacle.

  • vertices is the ordered DtList of DtVector*s, making up the vertices in the obstacle, in local database coordinates. The vertices must form a convex polygon.
  • uniqueName is the name of the new obstacle. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtVrfObject* DtCgf::createDisaggregationArea ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString() 
) const
virtual

Disaggregation Area.

Create a new disaggregation area (triggers automatic disaggregation of aggregates that enter the area). Returns a pointer to a newly created DtVrfObject representing the disaggregation area.

  • vertices is the ordered DtList of DtVector*s, making up the vertices in the obstacle, in local database coordinates. The vertices must form a convex polygon.
  • uniqueName is the name of the new area. If specified, it may be an arbitrary string, but it must be unique across all objects simulated by VR-Forces (control objects, entities, aggregates). By default, the name is a null string, indicating VR-Forces should generate a new unique name for the object.
virtual DtVrfObject* DtCgf::createEntity ( const DtEntityType &  entityType,
DtForceType  force,
const DtVector dbPosition,
DtReal  heading,
const DtString entityName = DtString::nullString(),
bool  allowBlocking = true,
std::list< DtAdminContent * > *  initialAdminContent = 0 
) const
virtual

B. Entity and Aggregate management.

Individual Entities Create a new entity of the given force type and object type, at the given position and heading.

Parameters
Input
entityTypethe DIS/RPR 7-byte enumeration. See EntityTypes.h for enumerations.
forcethe DIS/RPR enumeration for force types, extended to allow up to 255 different types. See disEnums.h for the standard enumerations.
dbPositionthe coordinate system of the loaded terrain database.
headingheading in radians, measured clockwise from North.
entityNamethe object name of the entity. By default, it is set to a null string, indicating that VR-Forces should generate a new name for the entity.
allowBlockingDetermines if the call should block to allow terrain to page in. If the simulation is running when createEntity is called this should be set to false.
initialAdminContentIf included, the adminContent messages are passed to the entity immediately upon creation, as if you had sent adminMessages on the creation instant.
Returns
If allowBlocking is true, a pointer to the newly created object is returned. Otherwise a null pointer is returned as the creation is queued until the terrain is paged in.
Note
Object names are sent in the marking text field. There are length limitations, depending on the type of object and the protocol (DIS/HLA) being used. All names 10 characters or shorter are always valid.
virtual DtVrfObject* DtCgf::createAggregate ( const DtEntityType &  aggregateType,
DtForceType  force,
const DtVector localPosition,
DtReal  heading,
DtList *  subordinateNames = 0,
const DtString aggregateName = DtString::nullString() 
) const
virtual

Aggregates.

Create a new aggregate of the given force type and object type, at the given position and heading. Aggregate Returns a pointer to a newly created entity.

Parameters
Input
aggregateTypeThe extended entity type (super type + DIS/RPR entity type). See EntityTypes.h for the standard enumerations and objTypeEnums.h for VR-Forces extended enumerations.
forceThe DIS/RPR enumeration for force types, extended to allow up to 255 different types. See disEnums.h for the standard enumerations.
localPositionis in the coordinate system of the loaded terrain database.
headingheading in radians, measured clockwise from North.
subordinateNamesis an optional list of subordinate names of entities and/or aggregates to be aggregated under this new aggregate. The listis an ordered DtList of DtString*s, with the order of most significant subordinate (the 'leader') to the least. Only those subordinates that exist at the time of creation will be added to the aggregate (subordinates can always be added later by calling addSubordinate()).
aggregateNameThe object name of the entity. By default, it is set to a null string, indicating that VR-Forces should generate a new name for the entity.
Returns
the aggregate object
Note
Object names are sent in the marking text field. There are length limitations, depending on the type of object and the protocol (DIS/HLA) being used. All names 10 characters or shorter are always valid.
virtual DtVrfObject* DtCgf::createAggregate ( const DtEntityType &  aggregateType,
DtForceType  force,
const DtVector localPosition,
DtReal  heading,
bool  createSubordinates,
const DtString aggregateName = DtString::nullString(),
bool  allowBlocking = true 
) const
virtual

Similar to previous function, but this version takes a bool createSubordinates argument instead of subordinateNames.

If createSubordinates is true, will create any subordinates listed in its "subordinate-objects" parameter database entry. If false, it just creates the aggregate.

Parameters
allowBlockingDetermines if the call should block to allow terrain to page in. If the simulation is running when createEntity is called this should be set to false.
Returns
If allowBlocking is true, a pointer to the newly created object is returned. Otherwise a null pointer is returned as the creation is queued until the terrain is paged in.
virtual bool DtCgf::addSubordinate ( DtVrfObject subordinate,
DtVrfObject aggregate 
)
virtual

Add a subordinate to a given aggregate.

Returns
true if successful, false if not.
  • subordinate is the the entity (may be platform or aggregate) to add to the aggregate (organize it under the aggregate). Note the must be detached from its previous aggregate (through a removeSubordinate(), before calling addSubordinate() to attach it to a new one. Failure to do so will result may result in undefined behavior.
  • aggregate is the the aggregate we want to add the subordinate to (e.g. "1 Plt, 1 Force").
virtual bool DtCgf::removeSubordinate ( DtVrfObject subordinate,
DtVrfObject aggregate 
)
virtual

Remove a subordinate from given aggregate.

Returns
True if successful, false if not. Always call removeSubordinate() to remove an entity from its current aggregate before organizing it under a new superior through an addSubordinate() call. Note that once removeSubordinate() has been successfully called, the entity being removed no longer has a valid object name, and cannot be looked up in the object manager by name (so hold on to the DtVrfObject* until you reorganize it under a new aggregate).
  • subordinate is the the entity (may be platform or aggregate) to remove from the aggregate.
  • aggregate is the the aggregate the subordinate is to be removed from (e.g. "1 Plt, 1 Force").
virtual void DtCgf::assignTask ( DtVrfObject entity,
const DtSimTask task 
)
virtual

III. Plans and tasks.

Assigns a task to an entity. If the entity is currently executing a plan, the task will be a 'retask', that is, this task will replace whatever it was currently working on.

  • entity is a platform or aggregate entity.
virtual void DtCgf::sendSetDataRequest ( DtVrfObject entity,
const DtSetDataRequest request 
)
virtual

Sends a set data request an entity.

Set data requests are used to request immediate changes in an entity, e.g. set heading (entity instantly changes orientation), and set restore (entity is immediately restored to full resources and health).

  • entity is a platform or aggregate entity.
virtual void DtCgf::assignPlanByName ( const DtString name,
const DtPlan plan 
)
virtual

Assigns a plan to the named object.

Note
As of VRF 3.10, plans can no longer be assigned by echelon ID.
virtual void DtCgf::abandonPlan ( DtVrfObject entity)
virtual

Command the entity/aggregate corresponding to abandon its plan.

  • entity is a platform or aggregate entity.
virtual void DtCgf::restartPlan ( DtVrfObject entity)
virtual

Command the entity/aggregate corresponding to restart its plan.

  • entity is a platform or aggregate entity.
virtual void DtCgf::logObjectConsoleToFile ( DtVrfObject object,
DtFilename  filename = DtFilename::nullFilename() 
)
virtual

Object Logging.

Directs the output of the object console of the specified object to the specified file. If the filename is not specified, the log file will be named using the name of the object.

virtual void DtCgf::stopLoggingObjectConsoleToFile ( DtVrfObject object)
virtual

Stops logging the console output for the object to a file.

virtual void DtCgf::setObjectConsoleNotificationLevel ( DtVrfObject object,
DtNotifyLevelType  level 
)
virtual

Sets the notification level of a specific object console.

This will affect what messages are sent the a log file, the GUI object console, and the sim engine console window.

virtual DtSimManager* DtCgf::simManager ( ) const
virtual

Accessors.

DtSimManager maintains the simulation clock, the scheduler, and the message interface.

virtual DtImportExportScenarioDescriptionManager* DtCgf::importExportScenarioDescriptionManager ( ) const
virtual

Import scenario description manager.

virtual DtResourceMonitor* DtCgf::resourceMonitor ( ) const
virtual

DtResourceMonitor maintains the requests for updating resources to the network or to the console.

virtual DtVrfObjectIdGenerator* DtCgf::vrfObjectIdGenerator ( ) const
virtual

DtVrfObjectIdGenerator creates new object ids for newly created publishers.

virtual DtFactoryManager* DtCgf::factoryManager ( ) const
virtual

DtFactoryManager contains all of the class factories (e.g.

component factory, state repository factory, etc.).

virtual DtVrfObjectManager* DtCgf::vrfObjectManager ( ) const
virtual

DtVrfObjectManager maintains all of the simulated entities, aggregates, and control objects in the simulation.

virtual DtScriptedTaskManager* DtCgf::scriptedTaskManager ( ) const
virtual

DtScriptedTaskManager contains all the scripted tasks available.

virtual DtScriptedObjectsMovementManager* DtCgf::ScriptedObjectsMovementManager ( ) const
virtual

DtScriptedObjectsMovementManager contains all the scripted movement objects.

virtual DtAggregateSpatialModel* DtCgf::aggregateSpatialModel ( ) const
virtual

DtAggregateSpatialModel maintains the aggregate location state (position, orientation, and extent) of all aggregates in the simulation.

virtual DtDetonationManager* DtCgf::detonationManager ( ) const
virtual

The detonation manager processes all the detonation interactions in the simulation and notifies the appropriate entities of relevant detonations.

virtual DtFireManager* DtCgf::fireManager ( ) const
virtual

The fire manager processes all the fire interactions in the simulation and notifies the appropriate entities of relevant for under-fire determination.

virtual DtScenarioExtrasMgr* DtCgf::scenarioExtrasMgr ( ) const
virtual

The Scenario Extras manager holds scenario data not tied to a particular entity: Force and hostility data Spawn templates.

virtual DtVrfParameterDb* DtCgf::parameterDatabase ( ) const
virtual

Parameter database used in creation and initialization of DtVrfObjects.

virtual DtGlobalPlanManager* DtCgf::globalPlanManager ( )
virtual

DtGlobalPlanManager maintains the list of global (non-entity) plans.

virtual DtTerrainInterface* DtCgf::terrainInterface ( )
virtual
Returns
Pointer to the currently loaded terrain interface, if it exists.
virtual const DtTerrainInterface* DtCgf::terrainInterface ( ) const
virtual
Returns
Pointer to the currently loaded terrain interface, if it exists.
virtual void DtCgf::setTerrainInterface ( DtTerrainInterface newTerrainDatabase)
virtual

Sets the terrain database.

Note
Does not delete it first.
virtual DtPhysicalWorld* DtCgf::physicalWorld ( )
virtual
Returns
A pointer to the physical world.
Note
This function should never return false.
virtual const DtPhysicalWorld* DtCgf::physicalWorld ( ) const
virtual
Returns
A pointer to the physical world.
Note
This function should never return false.
virtual void DtCgf::setPhysicalWorld ( DtPhysicalWorld newPhysicalWorld)
virtual

Sets the physical world.

virtual DtCommModelManager* DtCgf::commModelManager ( )
virtual
Returns
Pointer to the DtCommModelManager for the simulation.
virtual const DtCommModelManager* DtCgf::commModelManager ( ) const
virtual
Returns
Pointer to the DtCommModelManager for the simulation.
virtual DtScenario* DtCgf::scenario ( ) const
virtual

Current scenario. May be 0, if there is no scenario currently loaded.

virtual const DtSimulationAddress& DtCgf::simulationAddress ( ) const
virtual

DIS/RPR site Id/application Id simulation address.

Uniquely identifies our simulator in an exercise.

virtual int DtCgf::sessionId ( ) const
virtual

Session id, which is an integer identifier used to determine which back-ends have simulation access/control over one another.

Only simulation back-ends with common session Ids can send/recieve radio messages, tasks, entity/object creation messages etc. (in addition to the normal DIS/RPR messages).

virtual DtVrfStatusPublisher* DtCgf::statusPublisher ( ) const
virtual

Status publisher.

Publishes our presence as a VR-Forces simulator on the network.

virtual DtExerciseConn* DtCgf::exerciseConn ( ) const
virtual

Returns a pointer to the VR-Link exercise connection, through which all network PDUs/interactions are sent/received.

virtual DtStealthRemoteController* DtCgf::stealthRemoteController ( ) const
virtual

Returns a pointer to the stealth remote controller.

virtual void DtCgf::useMapDatum ( const DtMapDatum &  mapDatum)
virtual

Set the DtMapDatum to use for geocentric to geodetic conversion.

For more information see "Choosing a Reference Ellipsoid" in the VR-Link Developer's Guide.

virtual void DtCgf::setParameterDbLoaded ( bool  flag)
virtual

Set to false to reload parameter database on next tick.

virtual void DtCgf::setMaxDrainInputTime ( DtFloat64  maxTime)
virtual
virtual DtFloat64 DtCgf::maxDrainInputTime ( ) const
virtual
virtual void DtCgf::setMinDrainInputTime ( DtFloat64  minTime)
virtual
virtual DtFloat64 DtCgf::minDrainInputTime ( ) const
virtual
virtual bool DtCgf::logFrameRateStatistics ( ) const
virtual
virtual void DtCgf::setLogFrameRateStatistics ( bool  yesOrNo)
virtual
virtual void DtCgf::setLogFrameRateOutputDirectory ( const DtFilename &  )
virtual
virtual const DtFilename& DtCgf::logFrameRateOutputDirectory ( ) const
virtual
virtual void DtCgf::setDefaultParameterDbDirectory ( const DtFilename &  filename)
virtual

Set the default parameter database directory in which to look for the parameter database files specified in scenario files, after trying to look for the file relative to the application path.

Initialized from the VRF_defaultParameterDatabasePath variable in vrfSim.mtl, by the DtVrfApp class.

virtual void DtCgf::setRunInTimeManagementMode ( bool  yesOrNo)
virtual

Run in HLA time management mode.

If true, back-end will act as both a time regulating and time constrained federate.

virtual bool DtCgf::runInTimeManagementMode ( ) const
virtual
static void DtCgf::startTimeManagement ( void *  usr)
static

Callback functions to be executed as post-drain callbacks on the DtExerciseConnection.

Calls corresponding virtual process{Start,Stop}TimeManagement() functions.

static void DtCgf::stopTimeManagement ( void *  usr)
static
virtual void DtCgf::processStartTimeManagement ( )
virtual

Starts/stops HLA time management.

Enables/disables back-end as a time regulating and constrained federate.

virtual void DtCgf::processStopTimeManagement ( )
virtual
virtual void DtCgf::setFullyLoadTerrain ( bool  yesOrNo)
virtual
virtual bool DtCgf::fullyLoadTerrain ( ) const
virtual
virtual void DtCgf::setAssertOnBlockingTerrainCalls ( bool  b)
virtual

If true, blocking terrain calls will cause an assert when a debug back-end is in run mode.

When the DtCgf is initialized by DtVrfApp, this will be set by the vrfSim.mtl option read in by DtVrfSimOptions.

virtual bool DtCgf::assertOnBlockingTerrainCalls ( ) const
virtual

If true, blocking terrain calls will cause an assert when a debug back-end is in run mode.

When the DtCgf is initialized by DtVrfApp, this will be set by the vrfSim.mtl option read in by DtVrfSimOptions.

virtual void DtCgf::addPluginToLoad ( const DtString )
virtual

Plugin handling.

Adds a plugin to load durin the init process. Make sure to add plugins here if your plugin wants to create a higher level class (DtVrfObjectManager, DtVrfSimManager, etc)

virtual void DtCgf::setLoadPluginsIfVersionMismatch ( bool  )
virtual

Set to true if want to load plugins even if version mismatch.

By default false. Passes to plugin manager

virtual bool DtCgf::loadPluginsIfVersionMismatch ( ) const
virtual
DtVrfCreator* DtCgf::vrfCreator ( )

Access the vrfCreator.

const DtVrfCreator* DtCgf::vrfCreator ( ) const

Access the vrfCreator.

virtual void DtCgf::addPreLoadTerrainCallback ( DtCallbackList< const DtFilename & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new terrain is loaded, with the filename of the terrain passed into the callback.

The callback function signature is callback(const DtFilename&, void* usr)

virtual void DtCgf::removePreLoadTerrainCallback ( DtCallbackList< const DtFilename & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new terrain is loaded, with the filename of the terrain passed into the callback.

The callback function signature is callback(const DtFilename&, void* usr)

virtual void DtCgf::addPostLoadTerrainCallback ( DtCallbackList< const DtFilename & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after a new terrain is loaded, with the filename of the terrain passed into the callback.

The callback function signature is callback(const DtFilename&, void* usr)

virtual void DtCgf::removePostLoadTerrainCallback ( DtCallbackList< const DtFilename & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after a new terrain is loaded, with the filename of the terrain passed into the callback.

The callback function signature is callback(const DtFilename&, void* usr)

virtual void DtCgf::addPreLoadScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new scenario is loaded.

This also is called when a new scenario is created, and not loaded from a file. The callback function signature is callback(DtScenario&, void* usr)

virtual void DtCgf::removePreLoadScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before a new scenario is loaded.

This also is called when a new scenario is created, and not loaded from a file. The callback function signature is callback(DtScenario&, void* usr)

virtual void DtCgf::addPostLoadScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked after a scenario is loaded.

This also is called when a new scenario is created, and not loaded from a file. The callback function signature is callback(const DtScenario&, void* usr)

virtual void DtCgf::removePostLoadScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked after a scenario is loaded.

This also is called when a new scenario is created, and not loaded from a file. The callback function signature is callback(const DtScenario&, void* usr)

virtual void DtCgf::addPreSaveScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the current scenario is saved.

The callback function signature is callback(DtScenario&, void* usr)

virtual void DtCgf::removePreSaveScenarioCallback ( DtCallbackList< DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the current scenario is saved.

The callback function signature is callback(DtScenario&, void* usr)

virtual void DtCgf::addPostSaveScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the current scenario is saved.

The callback function signature is callback(const DtScenario&, void* usr)

virtual void DtCgf::removePostSaveScenarioCallback ( DtCallbackList< const DtScenario & >::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the current scenario is saved.

The callback function signature is callback(const DtScenario&, void* usr)

virtual void DtCgf::addPreCloseScenarioCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the current scenario is closed.

The callback function signature is callback(void* usr)

virtual void DtCgf::removePreCloseScenarioCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the current scenario is closed.

The callback function signature is callback(void* usr)

virtual void DtCgf::addPostCloseScenarioCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the current scenario is closed.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::removePostCloseScenarioCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the current scenario is closed.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::addScenarioPauseCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is put into the pause state.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::removeScenarioPauseCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is put into the pause state.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::addScenarioRunCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is put into the run state.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::removeScenarioRunCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is put into the run state.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::addPreScenarioRewindCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is rewound.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::removePreScenarioRewindCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just before the scenario is rewound.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::addPostScenarioRewindCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the scenario is done rewinding.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::removePostScenarioRewindCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked just after the scenario is done rewinding.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::addPostTickCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked at the end of the tick function.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::removePostTickCallback ( DtNoArgumentCallbackList::DtCallbackFunctionType  fcn,
void *  usrData 
)
virtual

Callbacks invoked at the end of the tick function.

The callback function signature is: void callback(void* usr)

virtual void DtCgf::setTimeToQuit ( bool  )
virtual

If true, time for the app to quit.

virtual bool DtCgf::timeToQuit ( ) const
virtual

If true, time for the app to quit.

virtual bool DtCgf::executeSimCommand ( const DtSimCommand simCommand)
virtual

Executes the provided simulation command using the DtSimCommandExecutor from the factory.

Returns
True if the execution of the command succeeded.
static void DtCgf::objectParametersOpCallback ( DtSimMessage msg,
void *  usr 
)
static

Callback for parameter database load/save messages.

Expects messages of type DtObjectParametersOpMessageType. Calls processObjectParametersOp to handle the message.

static void DtCgf::scenarioDescriptionCallback ( DtSimMessage ,
void *  usr 
)
staticprotected

Callback for scenario description requests.

virtual void DtCgf::processScenarioDescription ( DtSimMessage )
protectedvirtual
static void DtCgf::actionCategoriesRequestCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Callback for request for action categories.

virtual void DtCgf::processActionCategoriesRequest ( DtSimMessage msg)
protectedvirtual
DtCgf& DtCgf::operator= ( const DtCgf original)
private

not implemented. Copying this class is not supported.

virtual void DtCgf::loadAllPlugins ( )
protectedvirtual

Called from init, will load all plugins scheduled to load by calling loadPlugin for each.

virtual bool DtCgf::loadComponentAttachmentTable ( const DtFilename &  filename)
protectedvirtual

Clears out the current component attachment table and loads the specified file.

virtual bool DtCgf::loadTerrain ( const DtFilename &  filename)
protectedvirtual

Load the given terrain database file filename, returning a pointer to the terrain data in terrain.

Looks for the terrain in the following order:

  • Load the path given in filename
  • Path relative to VRF_TERRAIN_PATH environment variable
  • Path relative to default terrain dir (..).
virtual DtFilename DtCgf::findTerrainFile ( const DtFilename &  startFile,
const std::vector< DtFilename > &  searchPaths,
const std::string &  extension 
) const
protectedvirtual

Given the terrain filename, searchpaths, and extension to use (instead of the supplied extension) see if the terrain file can be found.

If so, return the terrain filename, else return an empty string

virtual void DtCgf::unloadTerrain ( )
protectedvirtual

Unload the terrain from memory.

virtual bool DtCgf::loadOrderOfBattle ( const DtFilename &  filename)
protectedvirtual

Load the given order of battle file.

virtual bool DtCgf::loadScenarioScripts ( const DtFilename &  filename)
protectedvirtual

Load the given scenario scripts file.

virtual bool DtCgf::loadParameterDb ( const DtFilename &  filename)
protectedvirtual

Clears out the current parameter database and loads the given parameter database file.

virtual bool DtCgf::loadObjectParametersDBFile ( const DtFilename &  opdFile)
protectedvirtual

Load the given opd file; Returns true upon success, false otherwise.

virtual bool DtCgf::loadPhysicalWorldFile ( const DtFilename &  file,
bool  force = false 
)
protectedvirtual

Loads the file into the physical world object (if it exists).

Returns true if file is loaded. Note that if the file to be loaded has already been loaded, the file will not be reloaded unless the force flag is true

virtual bool DtCgf::loadPlans ( const DtFilename &  filename)
protectedvirtual

Load the given plan file.

virtual bool DtCgf::loadGlobalPlans ( const DtFilename &  filename)
protectedvirtual

Load the specified global plan file.

virtual void DtCgf::loadHostilityAndExtras ( const DtScenarioExplorer se)
protectedvirtual

A utility function that loads the following two sets of data.

virtual void DtCgf::loadModelSetFiles ( const DtScenarioExplorer )
protectedvirtual

Loads the model set files for use with possible create by name commands.

Assigns model set to sim manager

virtual void DtCgf::loadActionCategories ( const DtFilename &  f)
protectedvirtual

Loads the action categories that area available to resolve conflicting tasks.

Always loaded from simulation model set task set rules directory, action_categories.tsk file

virtual bool DtCgf::loadForceHostility ( const DtFilename &  filename)
protectedvirtual
virtual bool DtCgf::loadScenarioExtras ( const DtFilename &  filename)
protectedvirtual
virtual void DtCgf::processObjectParametersOp ( DtSimMessage msg)
protectedvirtual

Process load/save parameter database messages.

Expects messages of type processObjectParametersOp.

virtual void DtCgf::emptyParametersDB ( )
protectedvirtual

Empties contents of parameter database and clears myDefaultParameterDatabase.

virtual void DtCgf::setFrameRateMode ( const DtString mode,
DtReal  deltaTime 
)
protectedvirtual

Set the frame rate mode.

May be one of the following modes (defined in msgTypes.h):

"variable-frame" "fixed-frame" "fixed-frame-run-to-complete"

If the frame mode is of type "fixed-frame" or "fixed-frame-run-to-complete", then the deltaTime parameter is the duration of a single frame in seconds.

virtual void DtCgf::setAutoReorganization ( bool  onOff)
protectedvirtual

Enable/disable auto-reorganization.

virtual void DtCgf::drainInput ( )
protectedvirtual

Calls drainInput() on exercise connection with the network specific variables.

virtual DtVrfPlugin* DtCgf::loadPlugin ( const DtString )
protectedvirtual

Given the name of a plugin, load it from disk and initialize it with this cgf.

Note that this can only be called during cgf initialization and should not be called after

DtHlaExerciseClock* DtCgf::exerciseClock ( ) const
protected

Accessor for exercise clock (myExerciseClockPtr).

Exercise clock is actually owned by DtSimManager. This function is provided for convenience in this class, because the DtCgf class is the one primarily responsible for manipulating the exercise clock.

virtual bool DtCgf::setupCommModelsForScenario ( const DtScenarioExplorer e)
protectedvirtual

Given the names of the SMS and scenario comm model file names, sets up all comm models.

virtual void DtCgf::updateReadyStatus ( )
protectedvirtual

Updates the readiness status of the back end by: 1) Is there a scenario present (myScenario pointer is not 0) 2) Can the simulation be simulated (all pending operations are complete.

virtual void DtCgf::processOrganizationManagerReady ( const DtOrganizationManagerReadyCallbackInfo )
protectedvirtual

Callbacks invoked when the organization manager transitions states from ready to not ready.

static void DtCgf::organizationManagerReadyCallback ( const DtOrganizationManagerReadyCallbackInfo ,
void *  usr 
)
staticprotected
static void DtCgf::simCommandCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Callback for receiving sim commands coming over the network.

Calls executeSimCommand().

virtual void DtCgf::processSimCommand ( DtSimMessage msg)
protectedvirtual

Callback for receiving sim commands coming over the network.

Calls executeSimCommand().

static void DtCgf::deferredLoadScenarioCallback ( void *  data)
staticprotected

Callback that performs the second-half of the work needed to load a scenario.

Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

virtual void DtCgf::processDeferredLoadScenario ( )
protectedvirtual

Callback that performs the second-half of the work needed to load a scenario.

Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

static void DtCgf::deferredRewindCallback ( void *  data)
staticprotected

Callback that performs the second-half of the work needed to rewind a scenario.

Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

virtual void DtCgf::processDeferredRewind ( )
protectedvirtual

Callback that performs the second-half of the work needed to rewind a scenario.

Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.

static DtOutputLogger& DtCgf::getGlobalFrameRateStatsLogger ( )
staticprotected

Static Logging Functions.

static std::string DtCgf::createStatsLogFilename ( const std::string &  originalFilename,
const DtSimManager simManager,
const DtScenario scenario,
const DtFilename &  logFrameRateDir 
)
staticprotected
static void DtCgf::logScenarioLoad ( const DtSimManager simManager,
const DtScenario scenario,
const DtFilename &  logFrameOutDir 
)
staticprotected
static void DtCgf::logScenarioRewind ( )
staticprotected
static void DtCgf::logScenarioClose ( )
staticprotected
static void DtCgf::logFrameRateStatsToFile ( DtSimManager simManager)
staticprotected
void DtCgf::setVrfCreator ( DtVrfCreator creator)
protected

Sets the vrfCreator to use.

If the cgf already owns a creator, then it is deleted before the new vrfCreator is set. Just setting the vrfCreator does not transfer ownership. A user allocated creator should be deleted by the user.

bool DtCgf::ownVrfCreator ( ) const
protected

Set/get whether or not the vrfCreator is owned by the Cgf or not.

void DtCgf::setOwnVrfCreator ( bool  yesOrNo)
protected

Set/get whether or not the vrfCreator is owned by the Cgf or not.

Member Data Documentation

DtSimulationAddress DtCgf::mySimulationAddress
protected

Address for routing interface messages.

DtU32 DtCgf::mySessionId
protected

Session Id.

bool DtCgf::myOK
protected

Flag indicating whether we have been successfully initialized.

bool DtCgf::myTimeToQuit
protected

Flag indicating whether or not the app should quit.

DtVrfPluginManager* DtCgf::myPluginManager
protected

The current plugin manager.

std::vector<DtString> DtCgf::myPluginsToLoad
protected
bool DtCgf::myLoadPluginsIfVersionMismatch
protected
DtTerrainInterface* DtCgf::myTerrainInterface
protected

The current terrain database.

DtPhysicalWorld* DtCgf::myPhysicalWorld
protected

The current physical world.

DtCommModelManager* DtCgf::myCommModelManager
protected
DtExerciseConn* DtCgf::myExerciseConn
protected

The current exercise connection.

DtSimManager* DtCgf::mySimManager
protected

Pointer to the DtSimManager.

DtScenario* DtCgf::myScenario
protected

The current scenario.

DtVrfStatusPublisher* DtCgf::myStatusPublisher
protected

Pointer to the DtStatusPublisher.

DtVrfObjectManager* DtCgf::myVrfObjectManager
protected

Pointer to the DtVrfObjectManager.

DtAggregateSpatialModel* DtCgf::myAggregateSpatialModel
protected
DtDetonationManager* DtCgf::myDetonationManager
protected
DtScriptedTaskManager* DtCgf::myScriptedTaskManager
protected
DtScriptedObjectsMovementManager* DtCgf::myScriptedObjectsMovementManager
protected
DtFireManager* DtCgf::myFireManager
protected
DtLuaObjectSerializer* DtCgf::myLuaObjectSerializer
protected
DtResourceMonitor* DtCgf::myResourceMonitor
protected

Pointer to the DtResourceMonitor.

DtVrfObjectIdGenerator* DtCgf::myVrfObjectIdGenerator
protected

Pointer to the DtVrfObjectIdGenerator.

DtVrfParameterDb* DtCgf::myParameterDatabase
protected

Pointer to the DtVrfParameterDb.

bool DtCgf::myForceParameterDbReload
protected

Forces loadScenario to re-load the parameter database.

DtGlobalPlanManager* DtCgf::myGlobalPlanManager
protected
DtJoyDeviceManager* DtCgf::myJoyDeviceManager
protected

Pointer to the DtJoyDeviceManager.

DtHostilityManager* DtCgf::myHostilityManager
protected
DtScenarioExtrasMgr* DtCgf::myScenarioExtrasManager
protected
DtStealthRemoteController* DtCgf::myStealthRemoteController
protected

Pointer to the DtStealthRemoteController.

DtFactoryManager* DtCgf::myFactoryManager
protected

Pointer to the DtFactoryManager.

DtFilename DtCgf::myVrfTerrainPathDirectory
protected

Terrain data directory from environment variable VRF_TERRAIN_PATH.

If specified, this is the 3rd place to look for a terrain database file, after trying to locate it in its given path, and then relative to the path in the VRF_defaultTerrainDatabasePath vrfSim.mtl variable.

DtFilename DtCgf::myDefaultTerrainDirectory
protected

Terrain database directory, initialized from VRF_defaultTerrainDatabasePath variable.

This is the second place to look for a terrain database specified in a scenario file, if we can't locate it relative to the application path.

DtFilename DtCgf::myDefaultSimulationModelSetFilename
protected

Default simulation model set file to load.

bool DtCgf::myUseDIGuy
protected

Set true to use DI-Guy Characters in Vr-forces.

DtFilename DtCgf::myDIGuyCharacterDataFilename
protected

DI-Guy Character Data file.

DtFilename DtCgf::myDIGuyAnimationsFilename
protected

DI_Guy animation configuration file to load.

DtFilename DtCgf::myMsdlSIDCMappingFile
protected

MSDL SDIC mapping file to load.

DtFilename DtCgf::myCountryCodesMappingFile
protected

Country codes mapping file.

bool DtCgf::myParameterDbLoaded
protected

Set to true if parameter database has been loaded via loadParameterDatabase call.

If you load a parameter database by another call, set this flag to true

DtFilename DtCgf::myCurrentParameterDatabaseFilename
protected

Filename of currently loaded parameter database.

DtFilename DtCgf::myDefaultParameterDbDirectory
protected

Default parameter database directory to search in when parameter database being specified is not an absolute path.

By default, the directory is "../data/parameters".

DtCallbackList<const DtFilename&> DtCgf::myPreLoadTerrainCallbacks
protected
DtCallbackList<const DtFilename&> DtCgf::myPostLoadTerrainCallbacks
protected
DtCallbackList<DtScenario&> DtCgf::myPreLoadScenarioCallbacks
protected
DtCallbackList<const DtScenario&> DtCgf::myPostLoadScenarioCallbacks
protected
DtCallbackList<DtScenario&> DtCgf::myPreSaveScenarioCallbacks
protected
DtCallbackList<const DtScenario&> DtCgf::myPostSaveScenarioCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPreCloseScenarioCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPostCloseScenarioCallbacks
protected
DtNoArgumentCallbackList DtCgf::myScenarioRunCallbacks
protected
DtNoArgumentCallbackList DtCgf::myScenarioPauseCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPreScenarioRewindCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPostScenarioRewindCallbacks
protected
DtNoArgumentCallbackList DtCgf::myPostTickCallbacks
protected
DtFloat64 DtCgf::myMaxDrainInputTime
protected
DtFloat64 DtCgf::myMinDrainInputTime
protected
bool DtCgf::myLogFrameRateStatistics
protected

When set to true, the cgf will log frame rate statistics to disk.

DtFilename DtCgf::myLogFrameRateOutputDirectory
protected

Directory to place log file output.

bool DtCgf::myOwnVrfCreatorFlag
protected

These are essentially cached from the init call.

This is necessary as the load terrain

DtVrfCreator* DtCgf::myVrfCreator
protected
bool DtCgf::myRunInTimeManagementMode
protected
bool DtCgf::myFullyLoadTerrain
protected

Flag indicating whether to fully load terrain subpages for paged terrain.

bool DtCgf::myAssertOnBlockingTerrainCalls
protected

If true, blocking terrain calls will cause an assert when a debug back-end is in run mode.

When the DtCgf is initialized by DtVrfApp, this will be set by the vrfSim.mtl option read in by DtVrfSimOptions.

DtHlaExerciseClock* DtCgf::myExerciseClockPtr
protected

Cache a pointer to the exercise clock (created by the DtSimManager) for convenience.

While the DtSimManager creates the exercise clock, this class is primarily responsible for manipulating the clock.

DtSimulationModelSet* DtCgf::myDefaultModelSet
protected

Default simulation model set.

This is created when the default simulation model set filename is set or on init() if one does not exist

DtScenario DtCgf::myScenarioToLoad
protected

Used to contain the scenario we want to during loadScenario operation.

The act of loading a scenario starts out in the loadScenario call, but much of the work occurs in deferredScenarioLoad (executed in a post-tick callback). Both functions need access to this data.

bool DtCgf::myWasPaused
protected

Used to hold the paused state during a rewindScenario operaiton.

The act of rewinding ascenario starts out in the loadScenario call, but much of the work occurs in deferredScenarioLoad (executed in a post-tick callback). Both functions need access to this data.

DtImportExportScenarioDescriptionManager* DtCgf::myImportScenarioDescriptionManager
protected

The scenario description manager used to import scenario description files.

DtConsoleCommandOwner* DtCgf::myConsoleCommands
protected
ActionCategories DtCgf::myActionCategories
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)