![]() |
VR-Forces 4.7 Class Documentation
|
An instance of DtCgf is an object representing a CGF (Computer Generated Forces). More...
Classes | |
| struct | SimulationObjectGroupInformation |
Public Member Functions | |
| DtCgf (const DtSimulationAddress &addr, DtU32 sessionId=1, const DtU32 &capabilities=0xffff) | |
| Constructor. | |
| virtual bool | 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 const DtVrfSimOptionsInterface * | simOptions () const |
| Access sim options object. | |
| virtual void | setSimOptions (const DtVrfSimOptionsInterface &) |
| Takes ownership. | |
| 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 void | setAppDataDir (const DtString &) |
| Sets the app data directory. Must be called before init. | |
| virtual DtFilename | appDataDir () const |
| virtual void | setUserDataDir (const DtString &) |
| Sets the user data directory. Must be called before init. | |
| virtual DtFilename | userDataDir () const |
| virtual void | setDataDir (const DtString &) |
| Sets the data directory. Must be called before init. | |
| virtual DtFilename | dataDir () const |
| virtual bool | loadScenario (const DtFilename &name, int scenarioRunId=0, bool isOrbatEnabled=false, bool createGlobalEnv=false, bool createGlobalDynamicTerrain=false) |
| Load the specified scenario file, making it the current scenario. | |
| virtual bool | loadScenario (const DtScenario &scenario, int scenarioRunId=0, bool isOrbatEnabled=false, bool createGlobalEnv=false, bool createGlobalDynamicTerrain=false) |
| Load the specified scenario, making it the current scenario. | |
| virtual void | queueRollbackTo (DtInMemorySnapshot *chkp, int scenarioRunId=0) |
| Queues a rollback to the scenario at the given in memory snapshot. If supplied, the new scenario run id. | |
| virtual bool | rollbackTo (DtInMemorySnapshot *chkp, int scenarioRunId=0) |
| Rolls back to the scenario at the given in memory snapshot. If supplied, the new scenario run id. | |
| virtual void | clearSimulationObjects () |
| Clears out all simulation objects in scenario. | |
| virtual bool | importScenario (const DtScenario &) |
| Imports the scenario into the currently loaded scenario. | |
| virtual bool | importScenario (const DtFilename &) |
| virtual bool | newScenario (const DtFilename &dbname=DtFilename::nullFilename(), const DtFilename &simulationModelSet=DtFilename::nullFilename()) |
| Create a new scenario, making it the current scenario. | |
| DtIfScenarioStatus * | scenarioStatus () |
| Returns the scenario status object. | |
| const DtIfScenarioStatus * | scenarioStatus () const |
| virtual void | sendScenarioStatusMessage () |
| virtual bool | saveScenario (const DtFilename &savename, bool saveAsSip=false) |
| Save the current scenario. | |
| virtual bool | takeSnapshot (DtInMemorySnapshot *) |
| Snapshots scenario to given in memory structure. | |
| virtual void | rollbackToSimTime (double simTime) |
| Rolls back the snapshot to the current simulation time. | |
| virtual void | takeSnapshot (bool makeBase) |
| Calls to Snapshot manager to snapshot scenario. | |
| virtual bool | saveSnapshot (const DtFilename &saveFolder, DtCompressedFileTransporter &, DtIfSaveScenario *msg, const DtSimulationAddress &requestor) |
| Saves the Snapshot to the disk and sends it to the front-end requested as well as sends back a Snapshot saved message with the status of the save. | |
| virtual bool | saveSimulationObjectGroup (DtFilename saveFolder, const DtString &groupName, int flags, boost::unordered_set< DtUUID > &uuidsSaved, bool &savAsZipFile) |
| Saves enough information to create a simulation object group. | |
| virtual bool | createSimulationObjectGroup (const DtString &group, int flags, int force, const DtVector &geocentricLocation, double offsetRotation, bool storedInZipFile=false) |
| Creates the simulation object group specified by the name as long as it exists in the objectGroups directory of the current simulation model set. | |
| virtual void | closeScenario (const DtFilename &terrainToOpen="", bool forceCloseAll=false) |
| Close the current scenario Removes all objects, unloads terrain. | |
| virtual bool | loadAdditionalObjectParameters (const DtFilename ¶msFileName, const DtReaderWriter::SearchPaths &searchPaths, bool preloadParameters=false) |
| Loads an additional OPD file. | |
| virtual void | run () |
| Put the simulation engine into run mode. | |
| virtual void | pause () |
| Put the simulation engine into pause mode. | |
| virtual void | rewind (int scenarioRunId=0) |
| Rewind the simulation engine. | |
| virtual void | setRejectMismatchedScenarioMessages (bool) |
| Sets whether or not to reject mismatched scenario run messages (default is true). Will set in scenario manager. | |
| virtual bool | rejectMismatchedScenarioMessages () const |
| virtual bool | canSimulate () const |
| Whether or not the cgf is ready to simulate. | |
| virtual bool | aboutToLoadOrRewindScenario () const |
| Whether or not this cgf is about to rewind, rollback or load. | |
| virtual void | setSmsValidationEnabled (bool b) |
| Enables or disabled the validation of SMSs when a scenario is created or loaded. | |
| virtual void | sendServerLoadMessage (const DtString &error, int level=DtNlWarn) |
| Sends a load message with the particular info level. | |
| virtual DtSimulationModelSet * | defaultModelSet () |
| Returns default model set. | |
| virtual void | deleteObject (const DtUUID &name, bool andRemoveFromOrbat=true) const |
| II. VR-Forces Object management. | |
| virtual void | deleteObject (const DtEntityIdentifier &objectIdentifier, bool andRemoveFromOrbat=true) const |
| All VR-Force's objects can be deleted by their object identifier (site id : application id : object number). | |
| virtual DtVrfObject * | createWaypoint (const DtVector &localPosition, const DtString &uniqueName=DtString::nullString()) const |
| A. Control objects. | |
| virtual DtVrfObject * | createRoute (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const |
| Routes. | |
| virtual DtVrfObject * | createPhaseLine (const DtVector &dbPoint1, const DtVector &dbPoint2, const DtString &uniqueName=DtString::nullString()) const |
| Phase Lines. | |
| virtual DtVrfObject * | createControlArea (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const |
| Control Areas. | |
| virtual DtVrfObject * | createObstacle (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const |
| Obstacles. | |
| virtual DtVrfObject * | createDisaggregationArea (const DtList &vertices, const DtString &uniqueName=DtString::nullString()) const |
| Disaggregation Area. | |
| virtual DtVrfObject * | createEntity (const DtEntityType &entityType, DtForceType force, const DtVector &dbPosition, DtReal heading, const DtString &entityName=DtString::nullString(), bool allowBlocking=true, std::list< DtAdminContent * > *initialAdminContent=0, bool addToOrbat=true) const |
| B. Entity and Aggregate management. | |
| virtual DtVrfObject * | createAggregate (const DtEntityType &aggregateType, DtForceType force, const DtVector &localPosition, DtReal heading, const std::vector< DtUUID > &subordinates=std::vector< DtUUID >(), const DtString &aggregateName=DtString::nullString(), bool addToOrbat=true) const |
| Aggregates. | |
| virtual DtVrfObject * | createAggregate (const DtEntityType &aggregateType, DtForceType force, const DtVector &localPosition, DtReal heading, bool createSubordinates, const DtString &aggregateName=DtString::nullString(), bool allowBlocking=true, bool addToOrbat=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 | assignPlanByUUID (const DtUUID &, 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 void | setPublishZeroVelocityWhenPaused (bool) |
| Sets whether or not to publish zero velocity (and acceleration) when paused. | |
| virtual bool | publishZeroVelocityWhenPaused () const |
| virtual void | setSetDeadReckoningAlgorithmToStaticOnPause (bool) |
| When the simulation is paused set the dead reckoning algorithm for aggregates and entities to static. | |
| virtual bool | setDeadReckoningAlgorithmToStaticOnPause () const |
| virtual bool | reuseEntityIdentifiersOnScenarioLoad () const |
| Set to true in order to reuse object identifiers that might be part of the scenario. | |
| virtual void | setReuseEntityIdentifiersOnScenarioLoad (bool) |
| virtual void | setTaskVisualizationPublicationMode (DtTaskVisualizationPublicationMode mode) |
| If and when task visualizations should be published to the network. | |
| virtual DtTaskVisualizationPublicationMode | taskVisualizationPublicationMode () const |
| virtual void | setUseDrawControlForTaskVisualizations (bool) |
| Publish task visualizations as VRV draw control objects rather than their standard, VR-Forces specific format. | |
| virtual bool | useDrawControlForTaskVisualizations () const |
| virtual DtSimManager * | simManager () const |
| Accessors. | |
| virtual DtImportExportScenarioDescriptionManager * | importExportScenarioDescriptionManager () const |
| Import scenario description manager. | |
| virtual DtResourceMonitor * | resourceMonitor () const |
| DtResourceMonitor maintains the requests for updating resources to the network or to the console. | |
| virtual DtRadarCoverageMonitor * | radarCoverageMonitor () const |
| DtRadarCoverageMonitor maintains the requests for updating radar coverage display areas. | |
| virtual DtVrfObjectIdGenerator * | vrfObjectIdGenerator () const |
| DtVrfObjectIdGenerator creates new object ids for newly created publishers. | |
| virtual DtFactoryManager * | factoryManager () const |
| DtFactoryManager contains all of the class factories (e.g. | |
| virtual DtSnapshotManager * | snapshotManager () const |
| Returns the snapshot manager. | |
| virtual DtVrfObjectManager * | vrfObjectManager () const |
| DtVrfObjectManager maintains all of the simulated entities, aggregates, and control objects in the simulation. | |
| virtual DtScriptedTaskManager * | scriptedTaskManager () const |
| DtScriptedTaskManager contains all the scripted tasks available. | |
| virtual DtScenarioEventManager * | scenarioEventManager () const |
| DtScenarioEventManager contains all the scenario events. | |
| virtual DtHazardAreaManager * | hazardAreaManager () const |
| DtHazardAreaManager contains all the hazard areas. | |
| virtual DtIntelCollectionAreaManager * | intelCollectionAreaManager () const |
| DtIntelCollectionAreaManager contains all the intel collection areas. | |
| virtual DtScriptedObjectsMovementManager * | ScriptedObjectsMovementManager () const |
| DtScriptedObjectsMovementManager contains all the scripted movement objects. | |
| virtual DtAggregateSpatialModel * | aggregateSpatialModel () const |
| DtAggregateSpatialModel maintains the aggregate location state (position, orientation, and extent) of all aggregates in the simulation. | |
| virtual DtDetonationManager * | detonationManager () const |
| The detonation manager processes all the detonation interactions in the simulation and notifies the appropriate entities of relevant detonations. | |
| virtual DtVrfAmmunitionManager * | ammunitionManager () const |
| The ammunition manager simply reads and has knowledge of ammunition types and the objects they can target. | |
| virtual DtFireManager * | fireManager () const |
| The fire manager processes all the fire interactions in the simulation and notifies the appropriate entities of relevant for under-fire determination. | |
| virtual DtScenarioExtrasMgr * | scenarioExtrasMgr () const |
| The Scenario Extras manager holds scenario data not tied to a particular entity: Force and hostility data Spawn templates. | |
| virtual DtVrfParameterDb * | parameterDatabase () const |
| Parameter database used in creation and initialization of DtVrfObjects. | |
| virtual DtGlobalPlanManager * | globalPlanManager () |
| DtGlobalPlanManager maintains the list of global (non-entity) plans. | |
| virtual DtStealthCommandsManager * | stealthCommandsManager () |
| DtStealthCommandsManager maintains the list of available stealth commands. | |
| virtual void | setPhysicalWorld (DtPhysicalWorld *newPhysicalWorld) |
| Sets the physical world. | |
| virtual DtVrfNavAreaManager * | vrfNavAreaManager () |
| virtual const DtVrfNavAreaManager * | vrfNavAreaManager () const |
| virtual void | setVrfNavAreaManager (DtVrfNavAreaManager *newVrfNavAreaManager) |
| virtual DtSpawnSinkManager * | spawnSinkManager () |
| virtual const DtSpawnSinkManager * | spawnSinkManager () const |
| virtual DtSimCommandDistributor * | simCommandDistributor () |
| Manages callbacks for sim commands. | |
| virtual DtScenario * | scenario () 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 DtVrfStatusPublisher * | statusPublisher () 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 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 | 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 DtFilename | objectGroupsRoot () const |
| Model set that is considered the parent of those loaded. | |
| 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 bool | reinitializeScenario () |
| This call will reinitialize the scenario by deleting all local items and recreating them from the order of battle saved for the local items. | |
| 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 void | runForDuration (double) |
| Starts a run duration. | |
| virtual void | stopSimulationDurationTimer () |
| Stops the current duration run timer. | |
| virtual void | processRunDurationComplete () |
| virtual void | setPublishingGlobalEnvironment (bool) |
| Sets whether or not to publish global environment (if not already published) when loading scenario. | |
| virtual bool | executeSimCommand (const DtSimCommand &simCommand) |
| Executes the provided simulation command using the DtSimCommandExecutor from the factory. | |
| virtual void | unloadTerrain () |
| Unload the terrain from memory. | |
| virtual bool | isOrbatEnabled () const |
| If enabled for sending orbat messages. | |
| virtual bool | canSleep () const |
| If last ticked. | |
| virtual double | timeScale () const |
| virtual void | setForceParameterDbReload (bool reload) |
| Forces loadScenario to reload the OPD when loadParameterDb() is called. | |
| virtual bool | forceParameterDbReload () const |
| virtual void | setEnableResourceMonitor (bool b) |
| Enable/disable resource manager. | |
| virtual bool | isResourceMonitorEnabled () const |
| virtual const DtFilename & | defaultTerrainDirectory () |
| Set/Get the default directory where terrain databases are searched for. | |
| virtual void | setDefaultTerrainDirectory (const DtFilename &directory) |
| 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) |
| virtual void | setUseDIGuy (bool diguy) |
| Turn on/off using DI-Guy Characters in Vr-forces. | |
| virtual bool | useDIGuy () const |
| virtual const DtFilename & | diGuyAnimationsFilename () |
| Set/get the name of the DI-Guy configuration files to load 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) |
| virtual void | setMsdlSidcMappingFile (const DtFilename &) |
| Set/get the msdl mapping file for SIDC codes to Dis Enumerations. | |
| virtual const DtFilename & | msdlSidcMappingFile () const |
| virtual void | setCountryCodesMappingFile (const DtFilename &) |
| Set/get the country codes to Dis Enumerations. | |
| virtual const DtFilename & | countryCodesMappingFile () const |
| virtual DtTerrainInterface * | terrainInterface () |
| virtual const DtTerrainInterface * | terrainInterface () const |
| virtual DtPhysicalWorld * | physicalWorld () |
| virtual const DtPhysicalWorld * | physicalWorld () const |
| virtual DtCommModelManager * | commModelManager () |
| virtual const DtCommModelManager * | commModelManager () const |
| virtual DtSimTerrainRequestManager * | simTerrainRequestManager () |
| virtual const DtSimTerrainRequestManager * | simTerrainRequestManager () const |
| virtual DtU32 | scenarioCapabilities () const |
| Indicates the capabilities this VRF based application. | |
| virtual void | setScenarioCapabilities (DtU32 v) |
| virtual void | setScenarioCapability (DtU32 v, bool) |
| virtual DtString | applicationType () const |
| A human readable string indicating the type of this application which will be sent in the status message, such as "VR-Forces Sim Engine" or "VR-Engage Sim Engine". | |
| virtual void | setApplicationType (const DtString &type) |
| 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 |
| DtVrfCreator * | vrfCreator () |
| Access the vrfCreator. | |
| const DtVrfCreator * | vrfCreator () const |
| 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) |
| 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) |
| 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) |
| virtual void | addPreScenarioReinitializeCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked just before the scenario objects are told to prepare for reinitialization. | |
| virtual void | removePreScenarioReinitializeCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| virtual void | addPostScenarioReinitializeCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked just after the scenario objects are told to prepare for reinitialization, but before the reinitialize has begun. | |
| virtual void | removePostScenarioReinitializeCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| virtual void | addPreCreateSimulationObjectGroupCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked just before a simulation group is created. | |
| virtual void | removePreCreateSimulationObjectGroupCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| 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) |
| virtual void | addPostCreateSimulationObjectGroupCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked after a simulation group is created. | |
| virtual void | removePostCreateSimulationObjectGroupCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| virtual void | addPreImportScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked just before a new scenario is imported. | |
| virtual void | removePreImportScenarioCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| virtual void | addPostImportScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked after a scenario is imported. | |
| virtual void | removePostImportScenarioCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| 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) |
| 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) |
| 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) |
| 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) |
| virtual void | addPreSaveSimulationObjectGroupsCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked just before a simulation object group is saved. | |
| virtual void | removePreSaveSimulationObjectGroupsCallback (DtCallbackList< DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| virtual void | addPostSaveSimulationObjectGroupsCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked just after the simulation object group is saved. | |
| virtual void | removePostSaveSimulationObjectGroupsCallback (DtCallbackList< const DtScenario & >::DtCallbackFunctionType fcn, void *usrData) |
| 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) |
| 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) |
| virtual void | addPreScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData) |
| Callbacks invoked just before the scenario is rewound by calling the rewind() method. | |
| virtual void | removePreScenarioRewindCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData) |
| 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) |
| 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) |
| virtual void | setTimeToQuit (bool) |
| If true, time for the app to quit. | |
| virtual bool | timeToQuit () const |
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 | runDurationCompleteCallback (void *) |
| Callback for when duration run timer has completed. | |
| 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 |
| typedef std::map< DtString, SimulationObjectGroupInformation > | StoredSimulationObjectGroupInformation |
Protected Member Functions | |
| virtual void | processScenarioDescription (DtSimMessage *) |
| virtual void | processSetScenarioFilename (DtSimMessage *) |
| virtual void | processSetRunDuration (DtSimMessage *) |
| virtual void | processActionCategoriesRequest (DtSimMessage *msg) |
| virtual void | processScenarioStatusRequest (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 bool | loadOrderOfBattle (const DtFilename &filename) |
| Load the given order of battle file. | |
| virtual bool | loadOrderOfBattleFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename) |
| virtual bool | loadOrderOfBattle (const DtInMemorySnapshot::OOB &) |
| virtual bool | loadScenarioScripts (const DtFilename &filename) |
| Load the given scenario scripts file. | |
| virtual bool | loadScenarioScriptsFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename) |
| virtual bool | loadScenarioScripts (const std::string &buffer) |
| virtual bool | loadOrbat (const DtFilename &filename, DtOrbatManager *intoOm=0, bool clearBeforeLoading=true) |
| Load the orbat from the data source. | |
| virtual bool | loadOrbatFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename, DtOrbatManager *intoOm=0, bool clearBeforeLoading=true) |
| virtual bool | loadOrbat (const std::string &buffer, DtOrbatManager *intoOm=0, bool clearBeforeLoading=true) |
| virtual void | prepareForScenarioReinitialize () |
| Will take all locally simulated vrf objects and tell them to prepare for scenario reinitialization. | |
| virtual bool | isScenarioReinitializing () const |
| Returns true if the scenario is reinitializing. | |
| virtual bool | loadParameterDb (const DtFilename &filename, const DtReaderWriter::SearchPaths &searchPaths, bool clearLoadedObjects=true, bool preloadParameters=false) |
| Clears out the current parameter database and loads the given parameter database file. | |
| virtual bool | loadObjectParametersDBFile (const DtFilename &opdFile, const DtReaderWriter::SearchPaths &searchPaths, bool clearLoadedObjects=true, bool preloadParameters=false) |
| 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 | loadDetonationParametersFile (const DtFilename &file, bool force=false) |
| Loads the file into the detonation manager (if it exists). | |
| virtual bool | loadAmmunitionParametersFile (const DtFilename &file, bool force=false) |
| Loads the file into the ammunition manager (if it exists). | |
| virtual bool | loadPlans (const DtFilename &filename) |
| Load the given plan file. | |
| virtual bool | loadPlansFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename) |
| virtual bool | loadPlans (const std::string &buffer) |
| virtual bool | loadGlobalPlans (const DtFilename &filename) |
| Load the specified global plan file. | |
| virtual bool | loadGlobalPlansFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename) |
| virtual void | loadHostilityAndExtras (const DtScenarioExplorer &se) |
| A utility function that loads the following two sets of data. | |
| virtual void | loadHostilityAndExtrasFromZipFile (const DtFilename &scenarioZipFile, const DtScenarioExplorer &se) |
| virtual void | loadHostilityAndExtras (const std::string &buffer) |
| virtual void | loadActivities (const DtScenarioExplorer &) |
| Loads the activities that area available to this simulation modelset. | |
| 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, bool clear=true) |
| virtual bool | loadForceHostilityFromZipFile (const DtFilename &scenarioZipFile, const DtFilename &filename, bool clear=true) |
| virtual bool | loadScenarioExtras (const DtFilename &filename) |
| virtual bool | loadScenarioExtrasFromZipFile (const DtFilename &, const DtFilename &filename) |
| virtual bool | loadScenarioExtras (const std::string &buffer) |
| 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 DtVrfPlugin * | loadPlugin (const DtString &) |
| Given the name of a plugin, load it from disk and initialize it with this cgf. | |
| DtHlaExerciseClock * | exerciseClock () 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 | rolloverStatsLogFilename (const DtScenario *scenario) |
| Logging Functions. | |
| void | logScenarioLoad (const DtScenario *scenario) |
| void | logScenarioRewind () |
| void | logScenarioClose () |
| virtual void | clearAllSimulationModelSetInformation () |
| When loading (or closing) a scenario this method will get rid of all SMS specific data. | |
| virtual void | adjustSettingsForTimeMultiplier (double timeMultiplier) |
| void | setVrfCreator (DtVrfCreator *creator) |
| Sets the vrfCreator to use. | |
| virtual bool | differingModelSets (DtScenario *) const |
| Return true if the supplied scenario uses different model sets than what is loaded. | |
| bool | ownVrfCreator () const |
| Set/get whether or not the vrfCreator is owned by the Cgf or not. | |
| void | setOwnVrfCreator (bool yesOrNo) |
Static Protected Member Functions | |
| static void | scenarioDescriptionCallback (DtSimMessage *, void *usr) |
| Callback for scenario description requests. | |
| static void | setScenarioFilenameCallback (DtSimMessage *, void *usr) |
| Callback for scenario description requests. | |
| static void | setRunDurationCallback (DtSimMessage *, void *usr) |
| Callback for setting the duration of the simulation run in absolute simulationtime. | |
| static void | actionCategoriesRequestCallback (DtSimMessage *msg, void *usr) |
| Callback for request for action categories. | |
| static void | scenarioStatusRequestCallback (DtSimMessage *msg, void *usr) |
| Callback for scenario status message. | |
| static void | adjustSettingsForTimeMultiplierCallback (DtFloat64 timeMult, void *usr) |
| Callback to adjust settings based on time multiplier. | |
| static void | organizationManagerReadyCallback (const DtOrganizationManagerReadyCallbackInfo &, void *usr) |
Private Member Functions | |
| DtCgf (const DtCgf &original) | |
| not implemented. Copying this class is not supported. | |
| DtCgf & | operator= (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) |
| static void | deferredLoadScenarioCallback (void *data) |
| Callback that performs the second-half of the work needed to load a scenario. | |
| virtual void | processDeferredLoadScenario () |
| virtual void | processLoadScenario (const DtScenario *=0, const DtInMemorySnapshot *=0) |
| Shared routine for loading a scenario. | |
| static void | deferredReinitializeScenarioCallback (void *data) |
| Callback that performs the reinitializing of the scenario. | |
| virtual void | processDeferredReinitializeScenario () |
| static void | deferredRollbackCallback (void *data) |
| Callback that performs the second-half of the work needed to rollback to a Snapshot. | |
| virtual void | processDeferredRollback () |
| static void | deferredImportScenarioCallback (void *data) |
| Callback that performs the second-half of the work needed to import a scenario. | |
| virtual void | processDeferredImportScenario () |
| static void | deferredRewindCallback (void *data) |
| Callback that performs the second-half of the work needed to rewind a scenario. | |
| virtual void | processDeferredRewind () |
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:
|
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
|
protected |
|
protected |
| DtCgf::DtCgf | ( | const DtSimulationAddress & | addr, |
| DtU32 | sessionId = 1, |
||
| const DtU32 & | capabilities = 0xffff |
||
| ) |
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 |
Destructor.
|
private |
not implemented. Copying this class is not supported.
|
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.
| conn | A preexisting exercise connection. The cgf does not take ownership of the connect - the user is responsible for deleting it. |
| creator | An 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. |
| entityAdvisory | An estimate of the expected number of vrfobjects to be simulated. Defaults to 100. |
|
virtual |
Access sim options object.
|
virtual |
Takes ownership.
|
virtual |
Tick the simulation engine, allowing our internal clock to determine the current time.
|
virtual |
Sends a final status which is to indicate this cgf is being deleted and ticks the exercise connection to send out.
|
virtual |
I. Scenario management.
Imports the specified scenario description file into the current scenario.
|
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 |
Sets the app data directory. Must be called before init.
|
virtual |
|
virtual |
Sets the user data directory. Must be called before init.
|
virtual |
|
virtual |
Sets the data directory. Must be called before init.
|
virtual |
|
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). If supplied, the new scenario run id
|
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. If supplied, the new scenario run id
|
virtual |
Queues a rollback to the scenario at the given in memory snapshot. If supplied, the new scenario run id.
|
virtual |
Rolls back to the scenario at the given in memory snapshot. If supplied, the new scenario run id.
|
virtual |
Clears out all simulation objects in scenario.
|
virtual |
Imports the scenario into the currently loaded scenario.
Terrain and simulation model sets will be ignored for the currently loaded terrain and simulation model set
|
virtual |
|
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.
|
inline |
Returns the scenario status object.
|
inline |
|
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 |
Snapshots scenario to given in memory structure.
|
virtual |
Rolls back the snapshot to the current simulation time.
Note that this is only good for this cgf. In a multiple cgf environment calling this method will have unpredictable, and possibly buggy, results
|
virtual |
Calls to Snapshot manager to snapshot scenario.
If makeBase is true makes this snapshot the new "base" snapshot (which is one the front-end can rewind to by a single click)
|
virtual |
Saves the Snapshot to the disk and sends it to the front-end requested as well as sends back a Snapshot saved message with the status of the save.
|
virtual |
Saves enough information to create a simulation object group.
All placements will be saved from center of mass, except for any location that is part of a task, plan or global plan. See scenario.h DtGroupCreationFlags for flags. Will save all files in the directory specified by the saveFolder with the files groupName
|
virtual |
Creates the simulation object group specified by the name as long as it exists in the objectGroups directory of the current simulation model set.
The flags are defined in scenario.h, however, the terrain flag is only respected as saved in the simulation object group order of battle file. The offset rotation is the amount to rotate the entire simulation object group around the center of mass (including changing headings). Angle is in radians. If stored in zip file is true and a .sogx file with the group name exists use that, else use directory root
|
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 |
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. searchPaths is the list of additional search paths from included SMSs.
|
virtual |
Put the simulation engine into run mode.
By default, the CGF starts out in run mode.
|
virtual |
Put the simulation engine into pause mode.
|
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. If supplied the new scenario run id
|
virtual |
Sets whether or not to reject mismatched scenario run messages (default is true). Will set in scenario manager.
|
virtual |
|
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.
|
virtual |
|
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 |
|
inlinevirtual |
Whether or not the cgf is ready to simulate.
|
inlinevirtual |
Whether or not this cgf is about to rewind, rollback or load.
|
virtual |
Enables or disabled the validation of SMSs when a scenario is created or loaded.
Defaults to true. If disabled, protocol and other restrictions will not be applied when loading an SMS.
|
virtual |
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 |
Sends a load message with the particular info level.
|
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 |
|
virtual |
Turn on/off using DI-Guy Characters in Vr-forces.
|
virtual |
|
virtual |
Set/get the name of the DI-Guy configuration files to load The Animations file is an mtl file used to extend and more fully define the animations from the character data file.
|
virtual |
|
virtual |
Set/get the msdl mapping file for SIDC codes to Dis Enumerations.
|
virtual |
|
virtual |
Set/get the country codes to Dis Enumerations.
|
virtual |
|
virtual |
Returns default model set.
If one does not exist, will create and load one from the current default model set filename
|
virtual |
II. VR-Forces Object management.
All VR-Force's objects can be deleted by their unique name regardless of their type.
|
virtual |
All VR-Force's objects can be deleted by their object identifier (site id : application id : object number).
|
virtual |
A. Control objects.
Waypoints Create a new waypoint. Returns a pointer to a newly created DtVrfObject representing the waypoint.
|
virtual |
Routes.
Create a new route. Returns a pointer to a newly created DtVrfObject representing the route.
|
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.
|
virtual |
Control Areas.
Create a new control area. Returns a pointer to a newly created DtVrfObject representing the control area.
|
virtual |
Obstacles.
Create a new obstacle. Returns a pointer to a newly created DtVrfObject representing the obstacle.
|
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.
|
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.
| Input | |
| entityType | the DIS/RPR 7-byte enumeration. See EntityTypes.h for enumerations. |
| force | the DIS/RPR enumeration for force types, extended to allow up to 255 different types. See disEnums.h for the standard enumerations. |
| dbPosition | the coordinate system of the loaded terrain database. |
| heading | heading in radians, measured clockwise from North. |
| entityName | the 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. |
| allowBlocking | Determines 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. |
| initialAdminContent | If included, the adminContent messages are passed to the entity immediately upon creation, as if you had sent adminMessages on the creation instant. |
|
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.
| Input | |
| aggregateType | The extended entity type (super type + DIS/RPR entity type). See EntityTypes.h for the standard enumerations and objTypeEnums.h for VR-Forces extended enumerations. |
| force | The DIS/RPR enumeration for force types, extended to allow up to 255 different types. See disEnums.h for the standard enumerations. |
| localPosition | is in the coordinate system of the loaded terrain database. |
| heading | heading in radians, measured clockwise from North. |
| subordinates | is an optional list of subordinate uuids of entities and/or aggregates to be aggregated under this new aggregate. The listi s an ordered vector of DtUUIDs, 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()). |
| aggregateName | The 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. |
|
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.
| allowBlocking | Determines 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. |
|
virtual |
Add a subordinate to a given aggregate.
|
virtual |
Remove a subordinate from given aggregate.
|
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.
|
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).
Assigns a plan to the named object.
|
virtual |
Command the entity/aggregate corresponding to abandon its plan.
|
virtual |
Command the entity/aggregate corresponding to restart its plan.
|
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 |
Stops logging the console output for the object to a file.
|
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 |
Sets whether or not to publish zero velocity (and acceleration) when paused.
Default is true
|
virtual |
|
virtual |
When the simulation is paused set the dead reckoning algorithm for aggregates and entities to static.
This turned on in conjunction with publishZeroVelocityWhenPaused turn off will pause the objects in a VR-Forces run simulation and still show current values for velocity, speed, acceleration, etc.
|
virtual |
|
virtual |
Set to true in order to reuse object identifiers that might be part of the scenario.
If the object identifier saved in the order of battle does not currently match the site/app of the back-end loading that object, then the user will be warned and the object will be assigned a new entity identifier that is compliant with that site/app. This will not apply to simulation object groups or scenario import. They will always get new entity identifiers
|
virtual |
|
virtual |
If and when task visualizations should be published to the network.
|
virtual |
|
virtual |
Publish task visualizations as VRV draw control objects rather than their standard, VR-Forces specific format.
|
virtual |
|
virtual |
Accessors.
DtSimManager maintains the simulation clock, the scheduler, and the message interface.
|
virtual |
Import scenario description manager.
|
virtual |
DtResourceMonitor maintains the requests for updating resources to the network or to the console.
|
virtual |
DtRadarCoverageMonitor maintains the requests for updating radar coverage display areas.
|
virtual |
DtVrfObjectIdGenerator creates new object ids for newly created publishers.
|
virtual |
DtFactoryManager contains all of the class factories (e.g.
component factory, state repository factory, etc.).
|
virtual |
Returns the snapshot manager.
|
virtual |
DtVrfObjectManager maintains all of the simulated entities, aggregates, and control objects in the simulation.
|
virtual |
DtScriptedTaskManager contains all the scripted tasks available.
|
virtual |
DtScenarioEventManager contains all the scenario events.
|
virtual |
DtHazardAreaManager contains all the hazard areas.
|
virtual |
DtIntelCollectionAreaManager contains all the intel collection areas.
|
virtual |
DtScriptedObjectsMovementManager contains all the scripted movement objects.
|
virtual |
DtAggregateSpatialModel maintains the aggregate location state (position, orientation, and extent) of all aggregates in the simulation.
|
virtual |
The detonation manager processes all the detonation interactions in the simulation and notifies the appropriate entities of relevant detonations.
|
virtual |
The ammunition manager simply reads and has knowledge of ammunition types and the objects they can target.
|
virtual |
The fire manager processes all the fire interactions in the simulation and notifies the appropriate entities of relevant for under-fire determination.
|
virtual |
The Scenario Extras manager holds scenario data not tied to a particular entity: Force and hostility data Spawn templates.
|
virtual |
Parameter database used in creation and initialization of DtVrfObjects.
|
virtual |
DtGlobalPlanManager maintains the list of global (non-entity) plans.
|
virtual |
DtStealthCommandsManager maintains the list of available stealth commands.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Sets the physical world.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Manages callbacks for sim commands.
|
virtual |
Current scenario. May be 0, if there is no scenario currently loaded.
|
virtual |
DIS/RPR site Id/application Id simulation address.
Uniquely identifies our simulator in an exercise.
|
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 |
Indicates the capabilities this VRF based application.
This doesn't specifically limit the capabilities of this class, but publishes this capabilities as part of the status, changing the way a VRF GUI or remote control application interacts with this application.
|
virtual |
|
virtual |
|
virtual |
A human readable string indicating the type of this application which will be sent in the status message, such as "VR-Forces Sim Engine" or "VR-Engage Sim Engine".
|
virtual |
|
virtual |
Status publisher.
Publishes our presence as a VR-Forces simulator on the network.
|
virtual |
Returns a pointer to the VR-Link exercise connection, through which all network PDUs/interactions are sent/received.
|
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 |
Set to false to reload parameter database on next tick.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
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 |
Model set that is considered the parent of those loaded.
|
virtual |
Run in HLA time management mode.
If true, back-end will act as both a time regulating and time constrained federate.
|
virtual |
|
static |
Callback functions to be executed as post-drain callbacks on the DtExerciseConnection.
Calls corresponding virtual process{Start,Stop}TimeManagement() functions.
|
static |
|
virtual |
Starts/stops HLA time management.
Enables/disables back-end as a time regulating and constrained federate.
|
virtual |
|
virtual |
This call will reinitialize the scenario by deleting all local items and recreating them from the order of battle saved for the local items.
This will use the checkpoint manager to checkpoint the scenario and recreate objects from that checkpoint. This will add a post tick callback to handle this in a post tick. This will also call the pre/post load scenario callbacks. To see if this is a scenario reinitialize check the isScenarioReinitializing() call to see if the flag is true
|
virtual |
|
virtual |
|
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 |
|
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 |
Set to true if want to load plugins even if version mismatch.
By default false. Passes to plugin manager
|
virtual |
| DtVrfCreator* DtCgf::vrfCreator | ( | ) |
Access the vrfCreator.
| const DtVrfCreator* DtCgf::vrfCreator | ( | ) | const |
|
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 |
|
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 |
|
virtual |
Starts a run duration.
If there is an existing run duration cancels that duration and creates a new one. When the run duration is complete the timer is removed and the scenario is paused
|
virtual |
Stops the current duration run timer.
|
static |
Callback for when duration run timer has completed.
|
virtual |
|
virtual |
Sets whether or not to publish global environment (if not already published) when loading scenario.
|
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 |
|
virtual |
Callbacks invoked just before the scenario objects are told to prepare for reinitialization.
|
virtual |
|
virtual |
Callbacks invoked just after the scenario objects are told to prepare for reinitialization, but before the reinitialize has begun.
|
virtual |
|
virtual |
Callbacks invoked just before a simulation group is created.
|
virtual |
|
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 |
|
virtual |
Callbacks invoked after a simulation group is created.
|
virtual |
|
virtual |
Callbacks invoked just before a new scenario is imported.
|
virtual |
|
virtual |
Callbacks invoked after a scenario is imported.
|
virtual |
|
virtual |
Callbacks invoked just before the current scenario is saved.
The callback function signature is callback(DtScenario&, void* usr)
|
virtual |
|
virtual |
Callbacks invoked just after the current scenario is saved.
The callback function signature is callback(const DtScenario&, void* usr)
|
virtual |
|
virtual |
Callbacks invoked just before the current scenario is closed.
The callback function signature is callback(void* usr)
|
virtual |
|
virtual |
Callbacks invoked just after the current scenario is closed.
The callback function signature is: void callback(void* usr)
|
virtual |
|
virtual |
Callbacks invoked just before a simulation object group is saved.
|
virtual |
|
virtual |
Callbacks invoked just after the simulation object group is saved.
|
virtual |
|
virtual |
Callbacks invoked just before the scenario is put into the pause state.
The callback function signature is: void callback(void* usr)
|
virtual |
|
virtual |
Callbacks invoked just before the scenario is put into the run state.
The callback function signature is: void callback(void* usr)
|
virtual |
|
virtual |
Callbacks invoked just before the scenario is rewound by calling the rewind() method.
If the scenario is rolled back (as it does in 4.4.2 and beyond) you should add callbacks for preLoadScenario and postLoadScenario The callback function signature is: void callback(void* usr)
|
virtual |
|
virtual |
Callbacks invoked just after the scenario is done rewinding.
The callback function signature is: void callback(void* usr)
|
virtual |
|
virtual |
Callbacks invoked at the end of the tick function.
The callback function signature is: void callback(void* usr)
|
virtual |
|
virtual |
If true, time for the app to quit.
|
virtual |
|
virtual |
Executes the provided simulation command using the DtSimCommandExecutor from the factory.
|
virtual |
Unload the terrain from memory.
|
virtual |
If enabled for sending orbat messages.
|
virtual |
If last ticked.
|
virtual |
|
static |
Callback for parameter database load/save messages.
Expects messages of type DtObjectParametersOpMessageType. Calls processObjectParametersOp to handle the message.
|
staticprotected |
Callback for scenario description requests.
|
protectedvirtual |
|
staticprotected |
Callback for scenario description requests.
|
protectedvirtual |
|
staticprotected |
Callback for setting the duration of the simulation run in absolute simulationtime.
|
protectedvirtual |
|
staticprotected |
Callback for request for action categories.
|
protectedvirtual |
|
staticprotected |
Callback for scenario status message.
|
protectedvirtual |
|
staticprotected |
Callback to adjust settings based on time multiplier.
not implemented. Copying this class is not supported.
|
protectedvirtual |
Called from init, will load all plugins scheduled to load by calling loadPlugin for each.
|
protectedvirtual |
Clears out the current component attachment table and loads the specified file.
|
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:
|
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
|
protectedvirtual |
Load the given order of battle file.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Load the given scenario scripts file.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Load the orbat from the data source.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Will take all locally simulated vrf objects and tell them to prepare for scenario reinitialization.
This will invoke the pre/post scenario reinitialize callbacks before and after the objects have been prepared for reinitialization
|
protectedvirtual |
Returns true if the scenario is reinitializing.
|
protectedvirtual |
Clears out the current parameter database and loads the given parameter database file.
searchPaths is the list of additional search paths from included SMSs.
|
protectedvirtual |
Load the given opd file; Returns true upon success, false otherwise.
searchPaths is the list of additional search paths from included SMSs.
|
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
|
protectedvirtual |
Loads the file into the detonation manager (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
|
protectedvirtual |
Loads the file into the ammunition manager (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
|
protectedvirtual |
Load the given plan file.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Load the specified global plan file.
|
protectedvirtual |
|
protectedvirtual |
A utility function that loads the following two sets of data.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Loads the activities that area available to this simulation modelset.
Then sets these activities into the object manager for reference by controllers (if needed)
|
protectedvirtual |
Loads the model set files for use with possible create by name commands.
Assigns model set to sim manager
|
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
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Process load/save parameter database messages.
Expects messages of type processObjectParametersOp.
|
protectedvirtual |
Empties contents of parameter database and clears myDefaultParameterDatabase.
|
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.
|
protectedvirtual |
Enable/disable auto-reorganization.
|
protectedvirtual |
Calls drainInput() on exercise connection with the network specific variables.
|
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
|
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.
|
protectedvirtual |
Given the names of the SMS and scenario comm model file names, sets up all comm models.
|
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.
|
protectedvirtual |
Callbacks invoked when the organization manager transitions states from ready to not ready.
|
staticprotected |
|
staticprotected |
Callback for receiving sim commands coming over the network.
Calls executeSimCommand().
|
protectedvirtual |
|
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.
|
protectedvirtual |
|
protectedvirtual |
Shared routine for loading a scenario.
Only one (from scenario or from in memory) should be specified. If both are specified the in memory Snapshot is used
|
staticprotected |
Callback that performs the reinitializing of the scenario.
|
protectedvirtual |
|
staticprotected |
Callback that performs the second-half of the work needed to rollback to a Snapshot.
Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario. If you wish to be notified when a rollback occurs connect to the pre and post load scenario callbacks. Those are used in the process of rolling back a scenario
|
protectedvirtual |
|
staticprotected |
Callback that performs the second-half of the work needed to import a scenario.
Deferred to the end of DtCgf::tick to avoid messages from one scenario getting handled in a new scenario.
|
protectedvirtual |
|
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.
|
protectedvirtual |
|
protected |
Logging Functions.
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
When loading (or closing) a scenario this method will get rid of all SMS specific data.
If there are snapshots available when closing a scenario keep this around (unless a load happens)
|
protectedvirtual |
|
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.
|
protected |
Set/get whether or not the vrfCreator is owned by the Cgf or not.
|
protected |
|
protectedvirtual |
Return true if the supplied scenario uses different model sets than what is loaded.
|
protected |
|
protected |
Address for routing interface messages.
|
protected |
Session Id.
|
protected |
Flag indicating whether we have been successfully initialized.
|
protected |
Flag indicating whether or not the app should quit.
|
protected |
The current plugin manager.
|
protected |
|
protected |
|
protected |
The current terrain database.
|
protected |
The current physical world.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The current exercise connection.
|
protected |
Pointer to the DtSimManager.
|
protected |
The current scenario.
|
protected |
Pointer to the DtStatusPublisher.
|
protected |
Pointer to the DtVrfObjectManager.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Pointer to the DtResourceMonitor.
|
protected |
Pointer to the DtRadarCoverageMonitor.
|
protected |
Pointer to the DtVrfObjectIdGenerator.
|
protected |
Pointer to the DtVrfParameterDb.
|
protected |
Pointer to the DtEmbeddedEntityInfoManager.
|
protected |
Forces loadScenario to re-load the parameter database.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Pointer to the DtFactoryManager.
|
protected |
Stealth commands manager.
|
protected |
|
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.
|
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.
|
protected |
Default simulation model set file to load.
|
protected |
Set true to use DI-Guy Characters in Vr-forces.
|
protected |
DI_Guy animation configuration file to load.
|
protected |
MSDL SDIC mapping file to load.
|
protected |
Country codes mapping file.
|
protected |
Fast forward settings file.
|
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
|
protected |
Filename of currently loaded parameter database.
|
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".
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
These are essentially cached from the init call.
This is necessary as the load terrain
|
protected |
|
protected |
|
protected |
Flag indicating whether to fully load terrain subpages for paged terrain.
|
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.
|
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.
|
protected |
|
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
|
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.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Used to hold the paused state during a rewindScenario operation.
The act of rewinding 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.
|
protected |
The scenario description manager used to import scenario description files.
|
protected |
|
protected |
|
protected |
Scenario status message to be sent out upon request.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |