VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtVrfRemoteController Class Reference

The main class for the remote control interface to VR-Forces. More...

List of all members.

Public Types

enum  ComponentAttachmentRule { AttachNone = 0, AttachFirst, AttachEven }

Public Member Functions

 DtVrfRemoteController (int receivePort=9000)
 Constructor.
virtual ~DtVrfRemoteController ()
virtual DtVrfMessageInterfacevrfMessageInterface () const
 Accessor for the message interface.
virtual const DtSimulationAddress & simulationAddress () const
 Get our simulation address.
virtual int sessionId () const
virtual double simTime (const DtSimulationAddress *a=NULL) const
 Returns the simulation time of the specified back-end.
virtual const DtList & backends () const
 Get a list of known back-end simulation addresses.
virtual const DtList & pendingBackends () const
 Get a list of back-ends which are still processing the current load or save operation (if any).
virtual DtVrfBackendListenerbackendListener () const
 Get the back-end listener.
virtual void addBackendDiscoveryCallback (DtBackendCallbackFcn fcn, void *usr)
 Register backend discovery callbacks.
virtual void removeBackendDiscoveryCallback (DtBackendCallbackFcn fcn, void *usr)
virtual void addBackendRemovalCallback (DtBackendCallbackFcn fcn, void *usr)
 Register backend removal callbacks.
virtual void removeBackendRemovalCallback (DtBackendCallbackFcn fcn, void *usr)
virtual int backendsControlState () const
 Get remote backends' control state Returns DtUnknownControlType if no remote backends exist.
virtual int numberBackendsLoaded () const
 Returns the number of backends loaded with a scenario.
virtual bool allBackendsReady () const
 Returns true if all the backends have a scenario loaded and they are ready to simulate.
virtual bool backendLoaded (const DtSimulationAddress &addr) const
 Returns true if the backend specified is loaded.
virtual void modifyBackEndSetting (const DtSettingsObject *setting, const DtSimulationAddress &addr=DtSimSendToAll)
 Modify the value of a back-end settings object.
virtual void requestBackEndSetting (std::string name, DtBackEndSettingRequestCompleteCallbackFcn fcn, void *usr=0, const DtSimulationAddress &addr=DtSimSendToAll)
 Request the value of a back-end setting from the DtVrfSimSettingsManager.
virtual void setSpotReportsGloballyEnabled (bool enabled)
 Sets the global state of spot reports - all entities set to use the global setting (which is the default) will obey this value.
virtual void setDRThresholds (double translation, double rotation)
 Set the dead reckoning settings to be used by any entities that allow gui overrides.
virtual void setCommModelSettings (bool useExternalComms)
 Set the comm model settings to be used by entities that have radios.
virtual void setRoadDrivingSettings (bool driveOnLeft)
 Set which side of the road entities drive on.
virtual void setAutomaticAggregationDisaggregationEnabled (bool enabled)
 Sets whether or not automatic aggregation/disaggregation should be enabled.
virtual void setPublishAggregateFormationRoutes (bool yesNo)
 Sets whether or not aggregate formation-following routes should be published.
virtual bool loadScenario (const DtFilename &filename, DtBackendRemappingFcn fcn=0, void *usrRemapping=0, DtLoadBalancingFcn=0, void *usrBalancing=0, const std::vector< DtString > &simulationModelSetFiles=std::vector< DtString >(), ComponentAttachmentRule compAttachRule=DtVrfRemoteController::AttachNone)
 I. Scenario management.
virtual bool loadScenario (const DtScenario &scenario, DtBackendRemappingFcn fcn=0, void *usrRemapping=0, DtLoadBalancingFcn=0, void *usrBalancing=0, const std::vector< DtString > &simulationModelSetFiles=std::vector< DtString >())
 Loads scenario specified by DtScenario.
virtual DtString guiTerrainDatabaseFilename () const
 Accessor for front end Gui terrain database.
virtual void setGuiTerrainDatabaseFilename (DtString db)
virtual const DtRwKeyValueListscenarioData () const
 Set the scenario data used to save with the scenario.
virtual void setScenarioData (const DtRwKeyValueList &)
virtual bool newScenario (const DtFilename &dbname, const DtFilename &guidbname, const DtFilename &opdname=DtFilename::nullFilename(), const DtFilename &physicalWorldName=DtFilename::nullFilename(), const DtScenario *baseScenario=0, int startTimeOfDay=12 *3600)
 Create a new scenario.
virtual bool newScenario (const DtFilename &dbname, const DtFilename &guidbname, const std::vector< DtString > &simulationModelSetFiles, const DtScenario *baseScenario=0, int startTimeOfDay=12 *3600)
 Create a new scenario from a simulation model set files.
virtual bool sendLoadScenarioMessage (const DtScenario &scenario, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a load scenario message based on the information inside scenario.
virtual DtIfLoadScenariocreateLoadScenarioMessage () const
 Called by sendLoadScenarioMessage to create an instance of DtIfLoadScenario.
virtual void addBackendLoadedCallback (DtBackendCallbackFcn fcn, void *usr)
 Register callback to be invoked whenever a backend has finished loading a scenario.
virtual void removeBackendLoadedCallback (DtBackendCallbackFcn fcn, void *usr)
virtual void addScenarioLoadedCallback (DtScenarioCallbackFcn fcn, void *usr)
 Register callback to be invoked when a scenario is completely loaded.
virtual void removeScenarioLoadedCallback (DtScenarioCallbackFcn fcn, void *usr)
virtual bool saveScenario (const DtFilename &saveName, DtPreserveMappingsFcn fcn=0, void *userData=0)
 Save a scenario.
virtual void sendSaveScenarioMessage (const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a save scenario message Use this function to send a save message to a single backend.
virtual void addBackendSavedCallback (DtBackendSaveCallbackFcn fcn, void *usr)
 Register a callback to be invoked whenever a backend has finished saving a scenario.
virtual void removeBackendSavedCallback (DtBackendSaveCallbackFcn fcn, void *usr)
virtual void addScenarioSavedCallback (DtScenarioCallbackFcn fcn, void *usr)
 Register callback to be invoked when a scenario is completely saved.
virtual void removeScenarioSavedCallback (DtScenarioCallbackFcn fcn, void *usr)
virtual void addScenarioSavedCallback (DtScenarioSavedCallbackFcn fcn, void *usr)
 Register callback to be invoked when a scenario is completely saved.
virtual void removeScenarioSavedCallback (DtScenarioSavedCallbackFcn fcn, void *usr)
virtual void closeScenario (const DtSimulationAddress &addr=DtSimSendToAll)
 Close the current scenario.
virtual void setScenarioExtrasFilename (const DtFilename &extras)
virtual const DtFilename & scenarioExtrasFilename () const
virtual void saveParameterDb (const DtFilename &filename)
 Save currently loaded parameter database in backend to file.
virtual void deleteObject (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 II. VR-Forces Object management.
virtual void deleteObject (const DtEntityIdentifier &id, const DtSimulationAddress &addr=DtSimSendToAll) const
 Delete VR-Force's object by entity id.
virtual void createWaypoint (const DtVector &geocentricPosition, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll) const
 A. Control objects.
virtual void createWaypoint (DtVrfObjectCreatedCallbackFcn fcn, void *usr, const DtVector &geocentricPosition, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll)
 Create a new waypoint.
virtual void modifyWaypoint (const DtEntityIdentifier &uniqueId, DtString *uniqueName=0, DtString *label=0, DtVector *geocentricPosition=0, const DtSimulationAddress &addr=DtSimSendToAll) const
 Modify the given waypoint.
virtual void createRoute (const DtList &vertices, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll) const
 Routes.
virtual void createRoute (DtVrfObjectCreatedCallbackFcn fcn, void *usr, const DtList &vertices, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll)
 Create a new route.
virtual void modifyRoute (const DtEntityIdentifier &uniqueId, DtString *uniqueName=0, DtString *label=0, DtList *vertices=0, const DtSimulationAddress &addr=DtSimSendToAll) const
 Modify the given route.
virtual void createPhaseLine (const DtVector &dbPoint1, const DtVector &dbPoint2, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll) const
 Phase Lines.
virtual void createPhaseLine (DtVrfObjectCreatedCallbackFcn fcn, void *usr, const DtVector &dbPoint1, const DtVector &dbPoint2, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll)
 Create a new phase line.
virtual void modifyPhaseLine (const DtEntityIdentifier &uniqueId, DtString *uniqueName=0, DtString *label=0, DtVector *newDbPoint1=0, DtVector *newDbPoint2=0, const DtSimulationAddress &addr=DtSimSendToAll) const
 Modify the given phase line.
virtual void createControlArea (const DtList &vertices, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll) const
 Control Areas.
virtual void createControlArea (DtVrfObjectCreatedCallbackFcn fcn, void *usr, const DtList &vertices, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll)
 Create a new control area.
virtual void modifyControlArea (const DtEntityIdentifier &uniqueId, DtString *uniqueName=0, DtString *label=0, DtList *newVertices=0, const DtSimulationAddress &addr=DtSimSendToAll) const
 modify the given control area
virtual void createObstacle (const DtList &vertices, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll) const
 Obstacle.
virtual void createObstacle (DtVrfObjectCreatedCallbackFcn fcn, void *usr, const DtList &vertices, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll)
 Create a new obstacle.
virtual void modifyObstacle (const DtEntityIdentifier &uniqueId, DtString *uniqueName=0, DtString *label=0, DtList *newVertices=0, const DtSimulationAddress &addr=DtSimSendToAll) const
 modify the given obstacle
virtual void createDisaggregationArea (const DtList &vertices, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll) const
 Disaggregation Area.
virtual void createDisaggregationArea (DtVrfObjectCreatedCallbackFcn fcn, void *usr, const DtList &vertices, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll)
 Create a new disaggregation area (triggers automatic disaggregation whenever an aggregate enters the area).
virtual void modifyDisaggregationArea (const DtEntityIdentifier &uniqueId, DtString *uniqueName=0, DtString *label=0, DtList *newVertices=0, const DtSimulationAddress &addr=DtSimSendToAll) const
 Modify given disaggregation area.
virtual void createOverlayObject (const DtEntityType &type, const DtList &vertices, const DtForceType &force, const DtString &name, const DtString &label, int color, const DtString &parentName, bool projection, bool closedFigure, const DtAppearance &appearance=DtAppearance::nullAppearance(), const DtString &attachTo=DtString(), char *userData=0, int dataSize=0, DtOverlayCreatedCallbackFcn fcn=0, const DtSimulationAddress &addr=DtSimSendToAll, unsigned int rId=0)
 Overlay objects.
virtual void createIndirectArtillery (const DtVrfIndirectArtilleryObjectModify *params, const DtSimulationAddress &addr)
virtual void createObject (const DtEntityType &type, DtForceType force, DtList *vertices, const DtString &name, const DtSimulationAddress &addr)
 B. Entity and Aggregate management.
virtual void createEntity (const DtEntityType &type, const DtVector &geocentricPosition, DtForceType force, DtReal heading, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll, bool groundClamp=true) const
 Create a new entity.
virtual void createEntity (DtVrfObjectCreatedCallbackFcn fcn, void *usr, const DtEntityType &type, const DtVector &geocentricPosition, DtForceType force, DtReal heading, const DtString &uniqueName=DtString::nullString(), const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll, bool groundClamp=true)
 Create a new entity.
virtual void createAggregate (DtVrfObjectCreatedCallbackFcn fcn, void *usr, const DtEntityType &type, const DtVector &geocentricPosition, DtForceType force, DtReal heading, const DtString &uniqueName, const DtString &label=DtString::nullString(), const DtSimulationAddress &addr=DtSimSendToAll, DtAggregateState initialAggregateState=DtDisaggregated)
virtual void createAggregate (const DtEntityType &type, const DtVector &geocentricPosition, DtForceType force, DtReal heading, DtList *entityNames=0, const DtSimulationAddress &addr=DtSimSendToAll, DtAggregateState initialAggregateState=DtDisaggregated, unsigned int requestId=0) const
 Create an aggregate.
virtual void createAggregate (DtVrfObjectCreatedCallbackFcn fcn, void *usr, const DtEntityType &type, const DtVector &geocentricPosition, DtForceType force, DtReal heading, DtList *entityNames=0, const DtSimulationAddress &addr=DtSimSendToAll, DtAggregateState initialAggregateState=DtDisaggregated)
 Create an aggregate.
virtual void addToOrganization (const DtEntityIdentifier &objectId, const DtEntityIdentifier &newSuperiorId, const DtSimulationAddress &addr=DtSimSendToAll)
 Adds the specified object to as a subordinate to the specified superior.
virtual void addToForceLevelOrganization (const DtEntityIdentifier &orjectId, const DtSimulationAddress &addr=DtSimSendToAll)
 Adds the specified object as a subordinate to the Force Level aggregate corresponding to the objects force type.
virtual void removeFromOrganization (const DtEntityIdentifier &objectId, const DtSimulationAddress &addr=DtSimSendToAll)
 Removes the specified object from whatever aggregate it is a part of and leaves it with no superior.
virtual void sendVrfObjectCreateMsg (const DtSimulationAddress &addr, unsigned int requestId, const DtString &name, const DtObjectType &type, const DtList &vertices, const DtString &label, const DtAppearance &appearance, DtForceType force, bool projection, bool closedFigure, DtReal heading, bool createSubObjects, bool clampToGroundFlag=true, const DtString &initialFormation=DtString::nullString(), DtAggregateState initialAggregateState=DtDisaggregated, const DtString &userData=DtString::nullString(), std::list< DtAdminContent * > *initialAdminContent=0, std::list< DtSimInterfaceContent * > *initialInterfaceContent=0) const
 C. Advanced.
virtual void sendVrfObjectModifyMsg (const DtSimulationAddress &addr, const DtEntityIdentifier &id, DtString *name=0, DtList *vertices=0, DtForceType *force=0, DtReal *heading=0, DtString *label=0, DtAppearance *appearance=0, DtString *overlayParent=0, DtString *userData=0) const
 This function can be used to modify vrf objects that cannot be created using the more specific methods above.
virtual void sendVrfOverlayObjectModifyMsg (const DtSimulationAddress &addr, const DtEntityIdentifier &id, int color, DtString parentName, DtString attachTo, bool keepExistingAttachment=true, char *userData=0, int len=0) const
 This function is only used to modify information that is specific to an overlay object (waypoint, route, overlay objects, etc.)
virtual void sendVrfIndirectArtilleryObjectModifyMsg (const DtSimulationAddress &addr, const DtEntityIdentifier &id, const DtVrfIndirectArtilleryObjectModify *mod) const
virtual void moveAlongRoute (const DtString &entityName, const DtString &routeName, const DtSimulationAddress &addr=DtSimSendToAll) const
 III. Plans and tasks.
virtual void moveToWaypoint (const DtString &entityName, const DtString &waypoint, bool planPath=false, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a 'move to waypoint' task to the entity/aggregate specified by 'name'.
virtual void moveToLocation (const DtString &entityName, const DtVector &destinationLocation, bool planPath=false, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a 'move to location' task to the entity/aggregate specified by 'name'.
virtual void patrolBetweenWaypoints (const DtString &name, const DtString &waypoint1, const DtString &waypoint2, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a 'patrol waypoints' task to the entity/aggregate specified by 'name'.
virtual void patrolAlongRoute (const DtString &name, const DtString &route, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a 'patrol route' task to the entity/aggregate specified by 'name'.
virtual void followEntity (const DtString &name, const DtString &leader, const DtVector &offset, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a 'follow' task to the given entity/aggregate.
virtual void wait (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a 'wait' task to the entity/aggregate specified by 'name'.
virtual void waitDuration (const DtString &name, DtTime duration, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a 'wait X seconds' task to the entity/aggregate specified by 'name'.
virtual void waitElapsed (const DtString &name, DtTime elapsed, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a 'wait until the simulation time has increased by X' task to the entity/aggregate specified by 'name'.
virtual void sendTaskMsg (const DtString &recipient, DtSimTask *task, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a general task message to the entity/aggregate specified by 'recipient' argument, which is the name of the entity/aggregate to receive the task message.
virtual void abandonPlan (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 Command the entity/aggregate corresponding to the given entity to abandon its plan.
virtual void skipTask (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 Command the entity/aggregate to skip the current task.
virtual void restartPlan (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 Command the entity/aggregate corresponding to the given entity to abandon its plan.
virtual void assignPlanByName (const DtString &name, const DtPlan &plan, const DtSimulationAddress &addr=DtSimSendToAll, int *retiStatus=NULL, DtString *retsStmt=NULL) const
 Assign a plan to the echelon ID held by the entity/aggregate corresponding to the given entity name.
virtual void assignMultiplePlanByName (const std::vector< DtString > &entities, const DtPlan &plan, const DtSimulationAddress &addr=DtSimSendToAll, int *retiStatus=NULL, DtString *retsStmt=NULL) const
 Same as assignPlanByName, except send DtMultiplePlanSet message.
virtual void requestPlan (const DtString &name, bool addStmtCallback=true, const DtSimulationAddress &addr=DtSimSendToAll) const
 Send a message to all VRF sim engines requesting plan updates messages for the specified entity name.
virtual void subscribePlan (const DtString &name, DtPlanCallbackFcn fn, void *usr, const DtSimulationAddress &addr=DtSimSendToAll)
 Requests plan messages from the sim engine for a particular entity, and registers a callback to receive the messages.
virtual void requestMultiplePlan (const std::vector< DtString > &entities, DtMultiplePlanRequestCallbackFcn fcn, void *usr, const DtSimulationAddress &addr=DtSimSendToAll)
 Send a message to the specified backend (or all) to check to see if all locally simulated entities contain the same plan.
virtual void requestMultiplePlan (const std::vector< DtString > &entities, const DtSimulationAddress &addr=DtSimSendToAll)
virtual void unsubscribePlan (const DtString &name, DtPlanCallbackFcn fn, void *usr)
 Removes a plan message callback function registered with subscribePlan.
virtual void unsubscribeAllPlans ()
 Unregisters all plan message callbacks.
virtual void addPlanStatementCallback (const DtString &name, DtPlanStatementCallbackFcn callback, void *usrData)
 Register callback for an entity's or aggregate's current statement.
virtual void removePlanStatementCallback (const DtString &name, DtPlanStatementCallbackFcn callback, void *usrData)
 Unregister callback for an entity's or aggregate's current statement.
virtual void removeAllPlanStatementCallbacks ()
 Unregister current statement callbacks for all entities/aggregates and global plans.
virtual void addPlanCompleteCallback (const DtString &name, DtPlanCompleteCallbackFcn callback, void *usrData)
 Register callback for an entity's or aggregate's plan completion.
virtual void removePlanCompleteCallback (const DtString &name, DtPlanCompleteCallbackFcn callback, void *usrData)
 Unregister callback for an entity's or aggregate's plan completion.
virtual void removeAllPlanCompleteCallbacks ()
 Unregister plan completion callbacks for all entities/aggregates and global plans.
virtual void requestGlobalPlansList (const DtSimulationAddress &addr)
 ------- Global Plans
virtual void assignGlobalPlan (const DtString &name, const DtPlan &plan, const DtSimulationAddress &addr=DtSimSendToAll, int *retiStatus=NULL, DtString *retsStmt=NULL) const
 Assigns a global plan of the specified name to the sim engine specified in addr.
virtual void deleteGlobalPlan (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 Deletes any global plan matching the specified name.
virtual void requestGlobalPlan (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 Sends message requesting the contents of the names global plan.
virtual void subscribeGlobalPlan (const DtString &name, DtPlanCallbackFcn fn, void *usr, const DtSimulationAddress &addr=DtSimSendToAll)
 Requests plan messages from the sim engine for a particular global plan, and registers a callback to receive the messages.
virtual void unsubscribeGlobalPlan (const DtString &name, DtPlanCallbackFcn fn, void *usr)
 Removes a plan message callback function registered with subscribeGlobalPlan().
virtual void addGlobalPlanStatementCallback (const DtString &name, DtPlanStatementCallbackFcn callback, void *usrData)
 Register callback for a global plan's current statement.
virtual void removeGlobalPlanStatementCallback (const DtString &name, DtPlanStatementCallbackFcn callback, void *usrData)
 Unregister callback for a global plan's current statement.
virtual void addGlobalPlanCompleteCallback (const DtString &name, DtPlanCompleteCallbackFcn callback, void *usrData)
 Register callback for a global plan's completion.
virtual void removeGlobalPlanCompleteCallback (const DtString &name, DtPlanCompleteCallbackFcn callback, void *usrData)
 Unregister callback for a global plan's completion.
virtual
DtVrfObjectMessageExecutive
objectMessageExecutive ()
 Communication From Entities Register callbacks with this message executive to receive messages sent from entities and objects to the GUI.
virtual void sendMessageToObject (DtVrfObjectMessage *objectMessage, const DtSimulationAddress &addr=DtSimSendToAll) const
 Sends the specified message to the entity identified in the message receiver field.
virtual void loadedScenario (const DtSimulationAddress &addr, unsigned int requestId)
 Invoked when a backend notifies us that it has received and loaded the given scenario information.
virtual void processSaveMessages ()
 Called before the scenario is saved, this routine will go through the saved save interface messages and store scenario data common to all servers.
virtual DtTime scenarioSimTimeForSave ()
 This routine will return the simulation time based upon the saved messages that should be saved in the scenario file.
virtual void setTerrainDatabaseFilename (DtScenario *scen)
 This routine will set the terrain database filename into the supplied scenario.
virtual void setParameterDatabaseFilename (DtScenario *scen)
 This routine will set the parameter database filename into the supplied scenario.
virtual void setPhysicalWorldFilename (DtScenario *scen)
 This routine will set the physical world filename into the supplied scenario.
virtual void setTimeMultiplier (DtScenario *scen)
 This routine will set the time multiplier into the supplied scenario.
virtual void setAutoReorganize (DtScenario *scen)
 This routine will set the auto reorganize flag into the supplied scenario.
virtual void setRandomNumberSeed (DtScenario *scen)
 This routine will set the random number seed into the supplied scenario.
virtual void setFrameRateMode (DtScenario *scen)
 This routine will set the frame rate mode into the supplied scenario.
virtual void setFrameDeltaTime (DtScenario *scen)
 This routine will set the frame delta time into the supplied scenario.
virtual void setExerciseStartTime (DtScenario *scen)
 This routine will set the exercise start time into the supplied scenario.
virtual bool save ()
 Write out scenario files.
virtual void save (const DtSimulationAddress &addr, DtIfSaveComplete *s)
 Invoked when a backend notifies us that it has saved and sent its scenario information.
virtual void savedScenario (const DtSimulationAddress &addr, DtSaveResult result, unsigned int requestId)
 Invoked when a backend notifies us that it has saved and sent its scenario information.
virtual void doPendingSaveWork ()
 Perform periodic processing that's needed for saving a scenario.
virtual void doPendingLoadWork ()
 Perform periodic processing that's needed for loading a scenario.
virtual void objectCreated (unsigned int requestId, const DtString &name, const DtEntityIdentifier &id)
 Invoked when an object we've requested has been created.
virtual unsigned int generateRequestId () const
 Generate a request id.
virtual void receivedPlan (const DtString &name, bool isGlobal, const DtList &statements)
 Invoked when we receive a plan (usually it will be in response to a requestPlan() command)
virtual void receivedPlanStmt (const DtString &name, bool isGlobal, DtPlanStatus planStatus)
 Invoked when we receive a current statement message.
virtual void embarkObject (const DtSimulationAddress &addr, const DtString &entity, const DtString &ontoEntity, bool loadOverride=false, const DtVector &loadOverridePosition=DtVector::zero())
 These routines will send interface messages to tell the back-end to embark or disembark the specified objects.
virtual void disembarkObject (const DtSimulationAddress &addr, const DtString &entity)
virtual void disembarkAllObjects (const DtSimulationAddress &addr, const DtString &entity)
virtual void requestTasksAndSetsFor (const DtSimulationAddress &addr, const DtString &entityName)
 Requests the tasks and sets that are available for this object, using the DtIfCapableTaskAndSetQuery.
virtual void requestTasksAndSetsFor (const std::vector< DtString > &names)
 Requests the tasks and sets that are available for the list of named objects.
virtual void requestDIGuyAppearancesAndAnimations (const DtSimulationAddress &addr, const DtString &entityName)
 Requests the DI-Guy Appearances and animations available for the DI-Guy character associated with this entity.
virtual void requestDIGuyAppearancesAndAnimations (const std::vector< DtString > &names)
 Requests the DI-Guy Appearances and animations available for the DI-Guy character associated with these entities.
virtual
DtDefaultRadioMessageFactory
radioMsgFactory ()
 IV. Factories.
virtual DtDefaultCondExprFactorycondExprFactory ()
virtual DtDefaultStatementFactorystmtFactory ()
virtual DtDefaultSimReportFactoryreportFactory ()
virtual DtDefaultSimTaskFactorytaskFactory ()
virtual
DtDefaultSetDataRequestFactory
setDataFactory ()
virtual
DtDefaultSimCommandFactory
simCommandFactory ()
virtual
DtDefaultAdminContentFactory
adminContentFactory ()
virtual void setRotationThreshold (DtReal thresh)
 IV. Misc.
virtual void setTranslationThreshold (DtReal thresh)
 Set translation threshold (in meters) for all back-ends.
virtual void setAggDimensionThreshold (DtReal thresh)
 Set the aggregate dimension threshold for all back-ends.
virtual void setHostInetAddr (DtInetAddr)
 Internet address setting.
virtual DtInetAddr hostInetAddr () const
virtual void querySpatialSubdivisionConfiguration (const DtSimulationAddress &backendAddress, DtSpatialSubdivisionType spatialSubdivisionType, DtServerRequestResponseCallbackFcn fcn=0, void *usr=0)
 Request spatial subdivision configuration of a given type, from a given back-end.
virtual void setSpatialSubdivsionConfiguration (const DtSimulationAddress &backendAddress, DtSpatialSubdivisionType spatialSubdivisionType, const int spatialSubdivisionXResolution, const int spatialSubdivisionYResolution, const int spatialSubdivisionZResolution)
 Set spatial subdivision configuration for given back-end.
virtual void requestIndirectArtilleryInformation (const DtString &)
 Request indirect artillery information by environmental name.
virtual void requestResources (const DtString &name=DtString::nullString(), const std::list< DtString > *list=0, DtServerRequestResponseCallbackFcn fcn=0, void *usr=0)
 V. Resource information.
virtual void setObjectNotifyLevel (const DtString &objectName, DtNotifyLevelType notifyLevel, const DtSimulationAddress &addr=DtSimSendToAll)
 Sends a request to the sim engine to change the notification level of the specified object.
virtual void logObjectConsoleToFile (const DtString &objectName, const DtFilename filename)
 Starts the sim engine logging this object console to the specified file.
virtual void stopLoggingObjectConsoleToFile (const DtString &objectName)
 Stops any sim engine which is currently writing a log file for this object.
virtual void requestResourceNames (const std::list< DtString > &list, DtServerRequestResponseCallbackFcn fcn=0, void *usr=0)
 Sends a request to the server to return a list of resource names associated with the entities supplied.
virtual DtRadioMessageListenerradioMessageListener ()
 Returns a pointer to the radio message listener.
DtRemoteEnvironmentControllerremoteEnvironmentController ()
 Weather.
virtual void initializeGlobalEnvironment (const DtSimulationAddress &environmentSimBackend=DtSimSendToAll)
 Starts the environment simulation on one of the available simulation engines.
DtRemoteEnvironmentControllercreateRemoteEnvironmentController ()
 Instantiates a new DtRemoteEnvironmentController, override to install a subclass.
virtual void processReceivedMultiPlan (DtIfMultiplePlanResponse *msg)
 Invokes callback for request id.
virtual void processOverlayObjectCreated (const DtString &name, const DtEntityIdentifier &id, DtVrfOverlayObjectModify *modifications)
virtual void processIndirectArtilleryObjectCreated (const DtString &name, const DtEntityIdentifier &id, DtVrfIndirectArtilleryObjectModify *modifications)
virtual void processResourcesProcessedCb (const DtIfServerRequestResponse &rsp)
 Process this message if the request id is one we generated.
virtual void processSpatialSubdivisionConfigurationCb (const DtIfServerRequestResponse &rsp)
 Process this message if the request id is one we generated.
virtual void processCommentInteraction (DtCommentInteraction *inter)
 Processes an incoming comment interaction.
virtual bool newScenario (const DtFilename &dbname, const DtFilename &guidbname, const DtFilename &opdname, const DtFilename &physicalWorldName, const std::vector< DtString > &simulationModelSetFiles, const DtScenario *baseScenario=0, int startTimeOfDay=12 *3600)
 Called internally from new scenario methods.
virtual void init (DtExerciseConn *exConn, DtReflectedEnvironmentProcessList *rel=NULL)
 Initialization.
virtual void init (DtVrfMessageInterface *msgIf, DtReflectedEnvironmentProcessList *rel=NULL)
 Initialization.
virtual void run (const DtSimulationAddress &addr=DtSimSendToAll) const
 Control the scenario.
virtual void pause (const DtSimulationAddress &addr=DtSimSendToAll) const
 Control the scenario.
virtual void rewind (const DtSimulationAddress &addr=DtSimSendToAll) const
 Control the scenario.
virtual void exit (const DtSimulationAddress &addr=DtSimSendToAll) const
 Control the scenario.
virtual void step (const DtSimulationAddress &addr=DtSimSendToAll) const
 Control the scenario.
virtual void setOpdSaveName (const DtFilename &f)
 Get/Set the Object Parameters Database filename to be written to the scenario file during a save.
virtual const DtFilename & opdSaveName () const
 Get/Set the Object Parameters Database filename to be written to the scenario file during a save.
virtual void setMaxWaitSaveTime (DtTime t)
 Set the maximum amount of time to wait for backends to respond to a 'save' message.
virtual DtTime maxWaitSaveTime () const
 Set the maximum amount of time to wait for backends to respond to a 'save' message.
virtual void setMaxWaitLoadTime (DtTime t)
 Set the maximum amount of time to wait for backends to respond to a 'load' message.
virtual DtTime maxWaitLoadTime () const
 Set the maximum amount of time to wait for backends to respond to a 'load' message.
virtual void setOverlayFilename (const DtFilename &overlay)
 If there is a local overlay file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual const DtFilename & overlayFilename () const
 If there is a local overlay file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual void setHostilityFilename (const DtFilename &hostilty)
 If there is a local hostility file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual const DtFilename & hostilityFilename () const
 If there is a local hostility file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual void setSelectionGroupsFilename (const DtFilename &sel)
 If there is a local selection groups file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual const DtFilename & selectionGroupsFilename () const
 If there is a local selection groups file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual void setSymbolMapFilename (const DtFilename &overlay)
 If there is a local symbol map that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual const DtFilename & symbolMapFilename () const
 If there is a local symbol map that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual void setCreateMenuFilename (const DtFilename &overlay)
 If there is a local create menu that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual const DtFilename & createMenuFilename () const
 If there is a local create menu that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.
virtual void setLabel (const DtEntityIdentifier &id, const DtString &label, const DtSimulationAddress &addr=DtSimSendToAll) const
 Modify an existing entity or aggregate.
virtual void setOverlayParent (const DtEntityIdentifier &id, const DtString &label, const DtSimulationAddress &addr=DtSimSendToAll) const
 Sets the overlay parent of this object. Calls down to sendVrfModifyMessage.
virtual void setAltitude (const DtString &name, double altitude, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set altitude (in meters)
virtual void setLocation (const DtString &name, DtVector coord, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set location (geocentric coordinates)
virtual void setAppearance (const DtString &name, int appearance, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set appearance of entity.
virtual void setCapabilities (const DtString &name, int capabilities, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set capabilities of entity.
virtual void setHeading (const DtString &name, double degrees, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set heading (in degrees)
virtual void setForce (const DtString &name, DtForceType force, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set force.
virtual void requestSpotReports (const DtString &name, bool onOff, const DtSimulationAddress &addr=DtSimSendToAll) const
 Spot reports Requests that spot reports for the specified entity be sent or turned off.
virtual void setResource (const DtString &name, const char *resourceType, double value, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set resource See resourceTypes.h for a list of pre-defined resource types that can be passed as the resourceType.
virtual void setRulesOfEngagement (const DtString &name, const char *rulesType, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set rules of engagement.
virtual void setSectorOfResponsibility (const DtString &name, double center, double size, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set sector of responsibility (center and size are in degrees)
virtual void setSpeed (const DtString &name, double speed, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set speed (in meters per second)
virtual void setTarget (const DtString &name, const DtString &target, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set target.
virtual void setTaskedBySuperior (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set tasked by superior.
virtual void setConcealed (const DtString &name, bool yes, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set concealed.
virtual void setEmitter (const DtString &name, int emitterId, bool on, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set emitter.
virtual void setIff (const DtString &name, bool mode1on, int mode1code, bool mode2on, int mode2code, bool mode3on, int mode3code, bool mode4on, int mode4code, DtIffAtcNavaidsAltParm4 altParm4, bool mode5on, bool useAltMode5, bool modeSon, bool emergency, bool flash, bool sti, bool modeSTcasI, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set iff.
virtual void restore (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 Restore to start state.
virtual void setDestroyed (const DtString &name, const DtSimulationAddress &addr=DtSimSendToAll) const
 Sets the damage state of the specified entity/aggregate to destroyed.
virtual void setLifeformWeaponState (const DtString &name, DtWeaponState weapon, const DtSimulationAddress &addr) const
 Set lifeform weapon If 'name' does not correspond to a lifeform entity, making this call has no effect.
virtual void setLifeformPosture (const DtString &name, DtLifeformState posture, const DtSimulationAddress &addr) const
 Set lifeform posture If 'name' does not correspond to a lifeform entity, making this call has no effect.
virtual void setAggregateFormation (const DtString &leader, const DtString &formationName, const DtSimulationAddress &addr=DtSimSendToAll) const
 Set an aggregate formation.
virtual void reorganizeAggregate (const DtString &leader, const DtSimulationAddress &addr=DtSimSendToAll) const
 Reorganize the aggregate.
virtual void disaggregateEntity (const DtString &entity, const DtSimulationAddress &addr=DtSimSendToAll) const
 Disaggregate the entity, resulting in its DtAggregateState to become DtDisaggregated, and simulation of its subordinates as distinct entities.
virtual void aggregateEntity (const DtString &entity, const DtSimulationAddress &addr=DtSimSendToAll) const
 Aggregate the entity, resulting in its DtAggregateState to become DtAggregated, with subordinates not simulated as distinct entities.
virtual void sendSetDataMsg (const DtString &recipient, DtSetDataRequest *msg, const DtSimulationAddress &addr) const
 General set data message.
virtual void addObjectConsoleMessageCallback (DtObjectConsoleMessageCallbackFcn fcn, void *usr=0)
 Object Console Information.
virtual void removeObjectConsoleMessageCallback (DtObjectConsoleMessageCallbackFcn fcn, void *usr=0)
 Object Console Information.
virtual void addBackendConsoleMessageCallback (DtBackendConsoleMessageCallbackFcn fcn, void *usr=0)
 Back-end Console Information.
virtual void removeBackendConsoleMessageCallback (DtBackendConsoleMessageCallbackFcn fcn, void *usr=0)
 Back-end Console Information.

Static Public Member Functions

static void doPendingSaveWorkCb (void *usr)
 Invoked periodically while waiting for a save command to complete.
static void doPendingLoadWorkCb (void *usr)
 Invoked periodically while waiting for a load command to complete.
static void savedScenarioCb (DtSimMessage *msg, void *usr)
 Invoked when a backend notifies us that it has saved and send it scenario information.
static void loadedScenarioCb (DtSimMessage *msg, void *usr)
 Invoked when a backend notifies us that it has received and loaded the given scenario information.
static void receiveFileCb (const DtFilename &filename, void *usr)
 Invoked when a file has been received from our dedicated TCP socket.
static void receivedMultiPlanCb (DtSimMessage *msg, void *usr)
 Invoked when we receive a multiple plan response.
static void objectCreatedCb (DtSimMessage *msg, void *usr)
 Invoked when an object we've requested has been created.
static void receivedPlanCb (DtSimMessage *msg, void *usr)
 Invoked when we receive a plan as a result of a plan request.
static void receivedPlanStmtCb (DtSimMessage *msg, void *usr)
 Invoked when we receive a plan statement message.
static void overlayObjectCreatedCallback (const DtString &name, const DtEntityIdentifier &id, void *usr)
 Invoked when an overlay object is created.
static void indirectArtilleryObjectCreatedCallback (const DtString &name, const DtEntityIdentifier &id, void *usr)
 Invoked when an indirect artillery object is created.
static void resourcesProcessedCb (DtSimMessage *msg, void *usr)
 Invoked when a resource request is called via requestResources.
static void spatialSubdivisionConfigurationCb (DtSimMessage *msg, void *usr)
 Invoked when a query spatial subdivision configuration request is made via querySpatialSubdivisionConfiguration().
static void commentInteractionCallback (DtCommentInteraction *inter, void *usr)
 Invoked when a comment interaction is received from the network.

Protected Types

typedef std::list< PlanCbInfoDtPlanCallbackListType
typedef std::list< StmtCbInfoDtStatementCallbackListType
typedef std::list
< PlanCompleteCbInfo
DtPlanCompleteCallbaclListType
typedef std::list< std::pair
< DtObjectConsoleMessageCallbackFcn,
void * > > 
DtObjectConsoleMessageCallbackListType
 hashed by request id
typedef std::list< std::pair
< DtBackendConsoleMessageCallbackFcn,
void * > > 
DtBackendConsoleMessageCallbackListType

Protected Member Functions

virtual void onInit ()
 Initializes myTempDirectory, host inet address, myListener, myRadioMessageListener, myRemoteEnvironmentController.
virtual void resetStateData ()
virtual void emptyLists ()
virtual void sendAggregateAsMsg (const DtSimulationAddress &addr, unsigned int requestId, const DtObjectType &objectType, DtForceType force, const DtVector &position, DtReal heading, DtList *entityNames, DtAggregateState initialAggregateState) const
 Fills out and sends an aggregate-as message.
virtual
DtVrfConfigurationFileComposer
createComposer ()
 Initializes the myComposer variable.
virtual void sendQuerySpatialSubdivisionConfigurationRequest (const DtSimulationAddress &backendAddress, DtSpatialSubdivisionType spatialSubdivisionType, DtServerRequestResponseCallbackFcn fcn, void *usr)
 Sends DtIfQuerySpatialSubdivisionConfiguration request for given spatial subdivision type.
virtual bool arbitrarySimAddress (DtSimulationAddress &address) const
 Chooses an arbitrary simulation address from the current set of registered backends.
virtual bool addStatementsAndSendPlan (const DtPlan &plan, DtIfPlan &planMsg, const DtSimulationAddress &addr=DtSimSendToAll, int *retiStatus=0, DtString *retsStmt=0) const
 Adds the statements from plan to planMsg, and sends planMsg to the specified address.
virtual void processVrfObjectMessage (const DtVrfObjectMessage *objectMsg)
 If the message is addressed to the front end, passes it to the objectMessageExecutive for processing by any registered callbacks.
virtual void processGlobalEnvironmentCreated (const DtString &name, const DtEntityIdentifier &id)

Static Protected Member Functions

static void deliverRadioMessageCallback (DtSimMessage *msg, void *usr)
 Callback registered with the message interface for vrfObjectMessages.
static void vrfObjectMessageCallback (const DtVrfObjectMessage *objMsg, void *usr)
static void globalEnvironmentCreatedCb (const DtString &name, const DtEntityIdentifier &id, void *usr)
 Called when global weather object is created, will then set time of day.

Protected Attributes

DtExerciseConn * myExConn
DtReflectedEnvironmentProcessListmyReflectedEnvironmentProcessList
bool myCreatedReflectedEnvironmentProcessList
DtVrfMessageInterfacemyMsgIf
DtVrfBackendListenermyListener
DtCompressedFileTransportermyTransporter
DtList myReceivedFiles
DtList myReceivedSaves
DtU32 myCurrentRequestId
DtTime myLastCommandTime
DtTime myMaxWaitLoadTime
DtTime myMaxWaitSaveTime
DtList myBeList
DtList myScenLoadedCbs
DtList myBeLoadedCbs
DtList myScenSavedOldCbs
DtList myScenSavedCbs
 list of any deprecated old-style save callbacks that have been registered
DtList myBeSavedCbs
 list of any preferred new-style save callbacks that have been registered
DtPlanCallbackListType myPlanCbs
DtStatementCallbackListType myStmtCbs
DtPlanCompleteCallbaclListType myPlanCompleteCbs
DtHashlist myObjectCbs
DtObjectConsoleMessageCallbackListType myObjectConsoleMessageCallbackList
DtBackendConsoleMessageCallbackListType myBackendConsoleMessageCallbackList
bool myCreatedMsgIf
DtFilename mySaveName
DtFilename myOverlayFilename
DtFilename mySelectionGroupsFilename
DtFilename mySymbolMapFilename
DtFilename myCreateMenuFilename
DtFilename myOpdName
DtFilename myHostilityFilename
DtFilename myScenarioExtrasFilename
DtScenariomySaveScen
DtScenariomyLoadScen
DtVrfConfigurationFileComposermyComposer
bool myRemapped
 true if a DtBackendRemappingFcn was called on the current scenario
bool myPreserveMappings
 false if a DtPreserveMappingsFcn returned false when saving a scenario
bool myDidRemap
 true if at some point during the save of this scenario the user decided to remap the objects to the new back end.
bool myNeedsGlobalEnvironment
 Set to true if needs to create global environment on first load of simulation.
DtDefaultRadioMessageFactory myRadioMsgFact
 These are needed for message callbacks to work.
DtDefaultCondExprFactory myCondExprFact
DtDefaultStatementFactory myStmtFact
DtDefaultSimReportFactory myReportFact
DtDefaultSimTaskFactory myTaskFact
DtDefaultSetDataRequestFactory mySetDataFact
DtDefaultSimCommandFactory mySimCommandFact
DtDefaultAdminContentFactory myAdminContentFact
DtString myGuiTerrainDatabaseFilename
 This member variable will contain the front end database (if different from backe-end).
DtRwKeyValueList myScenarioData
 Extra data used to be saved with the scenarip.
DtFilename myTempDirectory
 Location for temporary files generated by the configuration composer and file transporter.
DtInetAddr myInetAddr
 This is the Internet address to send saved files back to from the server.
unsigned int myRequestIdCounter
 Incremented by generateRequestId() to assign new request id's.
DtVrfObjectMessageExecutive myObjectMessageExecutive
 Used to processes VrfObjectMessages addressed to the Front End.
DtRadioMessageListenermyRadioMessageListener
 Used to spy on radio messages sent between VRF Entities.
DtRemoteEnvironmentControllermyRemoteEnvironmentController
 Used to monitor and change the weather state.
int myStartTimeOfDay
 Only set for a new scenario.

Detailed Description

The main class for the remote control interface to VR-Forces.

Instantiating this class allows the sending and received on control messages over the network to control one or more vrfSim executables on the same exercise. It allows for all control, such as loading/saving scenarios, creating/deleting entities and objects, tasking entities, and so fourth. This includes encoding and decoding of all the VR-Forces specific messages that are send though data interactions/PDUs over the network. The DtVrfRemoteController does not instantiate reflected lists or maintain lists of the objects in the simulation. This should be done directly with the VR-Link API and the DtExerciseConnection. This class requires an active DtExerciseConnection in order to operate.


Member Typedef Documentation

hashed by request id


Member Enumeration Documentation

Enumerator:
AttachNone 
AttachFirst 
AttachEven 

Constructor & Destructor Documentation

DtVrfRemoteController::DtVrfRemoteController ( int  receivePort = 9000)

Constructor.

Parameters:
receivePortPort used by the file transporter to receive order of battle and plan files from a back-end in response to a save scenario request. If the port requested cannot be opened, the next open port will be used.

Member Function Documentation

virtual void DtVrfRemoteController::init ( DtExerciseConn *  exConn,
DtReflectedEnvironmentProcessList rel = NULL 
) [virtual]

Initialization.

One of these init functions must be called before any other member functions are called. If the version with the DtExerciseConn argument is called, the DtVrfRemoteController will create its own DtVrfMessageInterface. If a DtReflectedEnvironmentProcessList is not passed in, the DtVrfRemoteController will create one. If the application which is instantiating the DtVrfRemoteController already has a DtVrfMessageInterface or DtReflectedEnvironmentProcessList, they should be passed into init in order to avoid the overhead of maintaining extra instances of those classes.

virtual void DtVrfRemoteController::init ( DtVrfMessageInterface msgIf,
DtReflectedEnvironmentProcessList rel = NULL 
) [virtual]

Initialization.

One of these init functions must be called before any other member functions are called. If the version with the DtExerciseConn argument is called, the DtVrfRemoteController will create its own DtVrfMessageInterface. If a DtReflectedEnvironmentProcessList is not passed in, the DtVrfRemoteController will create one. If the application which is instantiating the DtVrfRemoteController already has a DtVrfMessageInterface or DtReflectedEnvironmentProcessList, they should be passed into init in order to avoid the overhead of maintaining extra instances of those classes.

Accessor for the message interface.

virtual const DtSimulationAddress& DtVrfRemoteController::simulationAddress ( ) const [virtual]

Get our simulation address.

virtual int DtVrfRemoteController::sessionId ( ) const [virtual]
virtual double DtVrfRemoteController::simTime ( const DtSimulationAddress *  a = NULL) const [virtual]

Returns the simulation time of the specified back-end.

If no back-end specified, returns the first back-ends simulation time

virtual const DtList& DtVrfRemoteController::backends ( ) const [virtual]

Get a list of known back-end simulation addresses.

virtual const DtList& DtVrfRemoteController::pendingBackends ( ) const [virtual]

Get a list of back-ends which are still processing the current load or save operation (if any).

Get the back-end listener.

virtual void DtVrfRemoteController::addBackendDiscoveryCallback ( DtBackendCallbackFcn  fcn,
void *  usr 
) [virtual]

Register backend discovery callbacks.

virtual void DtVrfRemoteController::removeBackendDiscoveryCallback ( DtBackendCallbackFcn  fcn,
void *  usr 
) [virtual]
virtual void DtVrfRemoteController::addBackendRemovalCallback ( DtBackendCallbackFcn  fcn,
void *  usr 
) [virtual]

Register backend removal callbacks.

virtual void DtVrfRemoteController::removeBackendRemovalCallback ( DtBackendCallbackFcn  fcn,
void *  usr 
) [virtual]
virtual int DtVrfRemoteController::backendsControlState ( ) const [virtual]

Get remote backends' control state Returns DtUnknownControlType if no remote backends exist.

Returns either DtPauseControlType or DtRunControlType otherwise.

virtual int DtVrfRemoteController::numberBackendsLoaded ( ) const [virtual]

Returns the number of backends loaded with a scenario.

virtual bool DtVrfRemoteController::allBackendsReady ( ) const [virtual]

Returns true if all the backends have a scenario loaded and they are ready to simulate.

virtual bool DtVrfRemoteController::backendLoaded ( const DtSimulationAddress &  addr) const [virtual]

Returns true if the backend specified is loaded.

virtual void DtVrfRemoteController::modifyBackEndSetting ( const DtSettingsObject setting,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Modify the value of a back-end settings object.

The object's name must exist on the back-end(s) receiving the modification message.

virtual void DtVrfRemoteController::requestBackEndSetting ( std::string  name,
DtBackEndSettingRequestCompleteCallbackFcn  fcn,
void *  usr = 0,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Request the value of a back-end setting from the DtVrfSimSettingsManager.

By default the request is sent to all available back-ends, but it can also be targeted to individual back-ends. The request is added to myBackendSettingRequestMap and when responses for all the requested back-ends have been received the given DtBackEndSettingRequestCompleteCallbackFcn will be called with the given user data to indicate that the back-ends can now be interrogated for the setting. NOTE: This function is a pass through to DtVrfBackendListener::requestBackEndSetting

virtual void DtVrfRemoteController::setSpotReportsGloballyEnabled ( bool  enabled) [virtual]

Sets the global state of spot reports - all entities set to use the global setting (which is the default) will obey this value.

virtual void DtVrfRemoteController::setDRThresholds ( double  translation,
double  rotation 
) [virtual]

Set the dead reckoning settings to be used by any entities that allow gui overrides.

Note this does not set the aggregate dimension threshold.

virtual void DtVrfRemoteController::setCommModelSettings ( bool  useExternalComms) [virtual]

Set the comm model settings to be used by entities that have radios.

virtual void DtVrfRemoteController::setRoadDrivingSettings ( bool  driveOnLeft) [virtual]

Set which side of the road entities drive on.

Sets whether or not automatic aggregation/disaggregation should be enabled.

Default is false.

Sets whether or not aggregate formation-following routes should be published.

Turning off publishing of these routes can improve performance, if the aggregates are large (individual routes are generated for each member in an aggregate).

virtual bool DtVrfRemoteController::loadScenario ( const DtFilename &  filename,
DtBackendRemappingFcn  fcn = 0,
void *  usrRemapping = 0,
DtLoadBalancingFcn  = 0,
void *  usrBalancing = 0,
const std::vector< DtString > &  simulationModelSetFiles = std::vector< DtString >(),
ComponentAttachmentRule  compAttachRule = DtVrfRemoteController::AttachNone 
) [virtual]

I. Scenario management.

Loads scenario file specified by filename. Parses and transfers configuration files to the appro- private backends; Then tells backends to load the relevant files. NOTES: Calling this function replaces any previous call to loadScenario. Also, this function does not send a message if no backends are running in our session.

NOTE::

Before loading a scenario you must call closeScenario and wait for all backends to close before loading or creating a new scenario. This is so any scenario data that might exist in the backend is cleaned up. NOT calling closeScenario before a load or a new can leave the backend in an undefined state. This is especially important to do for distributed scenarios

If simulation model set files are not blank, then, if the scenario loaded does not have simulation model set files associated with load, sets them to the values in the vector

virtual bool DtVrfRemoteController::loadScenario ( const DtScenario scenario,
DtBackendRemappingFcn  fcn = 0,
void *  usrRemapping = 0,
DtLoadBalancingFcn  = 0,
void *  usrBalancing = 0,
const std::vector< DtString > &  simulationModelSetFiles = std::vector< DtString >() 
) [virtual]

Loads scenario specified by DtScenario.

Parses and transfers configuration files to the appro- private backends based on the info in scenario; Then tells backends to load the relevant files. NOTES: Calling this function replaces any previous call to loadScenario. Also, this function does not send a message if no backends are running in our session.

Accessor for front end Gui terrain database.

If the myGuiTerrainDatabase is empty and there is a scenario loaded, returns the Gui terrain database of the loaded scenario

virtual const DtRwKeyValueList& DtVrfRemoteController::scenarioData ( ) const [virtual]

Set the scenario data used to save with the scenario.

virtual void DtVrfRemoteController::setScenarioData ( const DtRwKeyValueList ) [virtual]
virtual bool DtVrfRemoteController::newScenario ( const DtFilename &  dbname,
const DtFilename &  guidbname,
const DtFilename &  opdname = DtFilename::nullFilename(),
const DtFilename &  physicalWorldName = DtFilename::nullFilename(),
const DtScenario baseScenario = 0,
int  startTimeOfDay = 12 *3600 
) [virtual]

Create a new scenario.

Note:
Calling this function replaces any previous call to loadScenario. Also, this function does not send a message if no backends are running in our session.
virtual bool DtVrfRemoteController::newScenario ( const DtFilename &  dbname,
const DtFilename &  guidbname,
const std::vector< DtString > &  simulationModelSetFiles,
const DtScenario baseScenario = 0,
int  startTimeOfDay = 12 *3600 
) [virtual]

Create a new scenario from a simulation model set files.

virtual bool DtVrfRemoteController::sendLoadScenarioMessage ( const DtScenario scenario,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a load scenario message based on the information inside scenario.

Assumes that backends already have the relevant files for loading. If the scenario does not contain an .oob or .pln file, calling this method creates a new scenario.

Called by sendLoadScenarioMessage to create an instance of DtIfLoadScenario.

The caller is responsible for deleting the returned pointer.

virtual void DtVrfRemoteController::addBackendLoadedCallback ( DtBackendCallbackFcn  fcn,
void *  usr 
) [virtual]

Register callback to be invoked whenever a backend has finished loading a scenario.

virtual void DtVrfRemoteController::removeBackendLoadedCallback ( DtBackendCallbackFcn  fcn,
void *  usr 
) [virtual]
virtual void DtVrfRemoteController::addScenarioLoadedCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
) [virtual]

Register callback to be invoked when a scenario is completely loaded.

virtual void DtVrfRemoteController::removeScenarioLoadedCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
) [virtual]
virtual bool DtVrfRemoteController::saveScenario ( const DtFilename &  saveName,
DtPreserveMappingsFcn  fcn = 0,
void *  userData = 0 
) [virtual]

Save a scenario.

Note:
Calling this function replaces any previous call to saveScenario. Also, this function does not send a message if no backends are running in our session. If the scenario was remapped during load by a DtBackendRemappingFcn, an optional DtPreserveMappingsFcn is called to determine if the original mappings should be preserved (default), or if the current mappings should be saved. To get notification when the save is complete, call addScenarioSavedCallback.
Returns:
bool indicates if the save message was sent
Return values:
truethe save message was sucessfully sent to the back-end
falseeither a file or directory was not writable or the DtPreserveMappingsFcn returned false.
virtual void DtVrfRemoteController::sendSaveScenarioMessage ( const DtSimulationAddress &  addr = DtSimSendToAll) const [virtual]

Send a save scenario message Use this function to send a save message to a single backend.

virtual void DtVrfRemoteController::addBackendSavedCallback ( DtBackendSaveCallbackFcn  fcn,
void *  usr 
) [virtual]

Register a callback to be invoked whenever a backend has finished saving a scenario.

virtual void DtVrfRemoteController::removeBackendSavedCallback ( DtBackendSaveCallbackFcn  fcn,
void *  usr 
) [virtual]
virtual void DtVrfRemoteController::addScenarioSavedCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
) [virtual]

Register callback to be invoked when a scenario is completely saved.

Deprecated:
starting in VRF 3.12; this does not provide success or failure information about the save to the callback.
virtual void DtVrfRemoteController::removeScenarioSavedCallback ( DtScenarioCallbackFcn  fcn,
void *  usr 
) [virtual]
virtual void DtVrfRemoteController::addScenarioSavedCallback ( DtScenarioSavedCallbackFcn  fcn,
void *  usr 
) [virtual]

Register callback to be invoked when a scenario is completely saved.

This interface is preferred, since the callback interface it exposes allows the calling code to determine whether the save succeeded.

virtual void DtVrfRemoteController::removeScenarioSavedCallback ( DtScenarioSavedCallbackFcn  fcn,
void *  usr 
) [virtual]
virtual void DtVrfRemoteController::closeScenario ( const DtSimulationAddress &  addr = DtSimSendToAll) [virtual]

Close the current scenario.

virtual void DtVrfRemoteController::run ( const DtSimulationAddress &  addr = DtSimSendToAll) const [virtual]

Control the scenario.

virtual void DtVrfRemoteController::pause ( const DtSimulationAddress &  addr = DtSimSendToAll) const [virtual]

Control the scenario.

virtual void DtVrfRemoteController::rewind ( const DtSimulationAddress &  addr = DtSimSendToAll) const [virtual]

Control the scenario.

virtual void DtVrfRemoteController::exit ( const DtSimulationAddress &  addr = DtSimSendToAll) const [virtual]

Control the scenario.

virtual void DtVrfRemoteController::step ( const DtSimulationAddress &  addr = DtSimSendToAll) const [virtual]

Control the scenario.

virtual void DtVrfRemoteController::setOpdSaveName ( const DtFilename &  f) [virtual]

Get/Set the Object Parameters Database filename to be written to the scenario file during a save.

Backends will load their own opd file if a scenario file does not specify one. This value is automatically set by a 'newScenario' or 'loadScenario' call. Users should only set the opd file name if they want to specify a file that is different from the one that was loaded during 'new' or 'load'.

virtual const DtFilename& DtVrfRemoteController::opdSaveName ( ) const [virtual]

Get/Set the Object Parameters Database filename to be written to the scenario file during a save.

Backends will load their own opd file if a scenario file does not specify one. This value is automatically set by a 'newScenario' or 'loadScenario' call. Users should only set the opd file name if they want to specify a file that is different from the one that was loaded during 'new' or 'load'.

virtual void DtVrfRemoteController::setMaxWaitSaveTime ( DtTime  t) [virtual]

Set the maximum amount of time to wait for backends to respond to a 'save' message.

The default timeout interval is 1 minute. t should be specified in seconds.

virtual DtTime DtVrfRemoteController::maxWaitSaveTime ( ) const [virtual]

Set the maximum amount of time to wait for backends to respond to a 'save' message.

The default timeout interval is 1 minute. t should be specified in seconds.

virtual void DtVrfRemoteController::setMaxWaitLoadTime ( DtTime  t) [virtual]

Set the maximum amount of time to wait for backends to respond to a 'load' message.

The default timeout interval is 1 minute. t should be specified in seconds.

virtual DtTime DtVrfRemoteController::maxWaitLoadTime ( ) const [virtual]

Set the maximum amount of time to wait for backends to respond to a 'load' message.

The default timeout interval is 1 minute. t should be specified in seconds.

virtual void DtVrfRemoteController::setOverlayFilename ( const DtFilename &  overlay) [virtual]

If there is a local overlay file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

virtual const DtFilename& DtVrfRemoteController::overlayFilename ( ) const [virtual]

If there is a local overlay file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

virtual void DtVrfRemoteController::setHostilityFilename ( const DtFilename &  hostilty) [virtual]

If there is a local hostility file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

virtual const DtFilename& DtVrfRemoteController::hostilityFilename ( ) const [virtual]

If there is a local hostility file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

virtual void DtVrfRemoteController::setScenarioExtrasFilename ( const DtFilename &  extras) [virtual]
virtual const DtFilename& DtVrfRemoteController::scenarioExtrasFilename ( ) const [virtual]
virtual void DtVrfRemoteController::setSelectionGroupsFilename ( const DtFilename &  sel) [virtual]

If there is a local selection groups file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

virtual const DtFilename& DtVrfRemoteController::selectionGroupsFilename ( ) const [virtual]

If there is a local selection groups file that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

virtual void DtVrfRemoteController::setSymbolMapFilename ( const DtFilename &  overlay) [virtual]

If there is a local symbol map that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

Blank means keep currently loaded file, the default

virtual const DtFilename& DtVrfRemoteController::symbolMapFilename ( ) const [virtual]

If there is a local symbol map that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

Blank means keep currently loaded file, the default

virtual void DtVrfRemoteController::setCreateMenuFilename ( const DtFilename &  overlay) [virtual]

If there is a local create menu that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

Blank means keep currently loaded file, the default

virtual const DtFilename& DtVrfRemoteController::createMenuFilename ( ) const [virtual]

If there is a local create menu that will be loaded up the next time the scenario is opened, set this value here BEFORE calling to save out the scenario.

Blank means keep currently loaded file, the default

virtual void DtVrfRemoteController::saveParameterDb ( const DtFilename &  filename) [virtual]

Save currently loaded parameter database in backend to file.

virtual void DtVrfRemoteController::deleteObject ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

II. VR-Forces Object management.

Delete VR-Force's object by name

virtual void DtVrfRemoteController::deleteObject ( const DtEntityIdentifier &  id,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Delete VR-Force's object by entity id.

virtual void DtVrfRemoteController::createWaypoint ( const DtVector geocentricPosition,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

A. Control objects.

Waypoints Create a new waypoint. Note that the name must be unique (if specified) and that the position needs to be in geocentric coordinates. This function simply sends the info to the given address -- it's up to users to do error checking before making this call!

virtual void DtVrfRemoteController::createWaypoint ( DtVrfObjectCreatedCallbackFcn  fcn,
void *  usr,
const DtVector geocentricPosition,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Create a new waypoint.

This version of create allows users to register a callback function that will be invoked once the object has been created.

virtual void DtVrfRemoteController::modifyWaypoint ( const DtEntityIdentifier &  uniqueId,
DtString uniqueName = 0,
DtString label = 0,
DtVector geocentricPosition = 0,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Modify the given waypoint.

virtual void DtVrfRemoteController::createRoute ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Routes.

Create a new route. Note that the name must be unique (if specified) and that the vertices needs to be in geocentric coordinates. This function simply sends the info to the given address -- it's up to users to do error checking before making this call!

virtual void DtVrfRemoteController::createRoute ( DtVrfObjectCreatedCallbackFcn  fcn,
void *  usr,
const DtList &  vertices,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Create a new route.

This version of create allows users to register a callback function that will be invoked once the object has been created.

virtual void DtVrfRemoteController::modifyRoute ( const DtEntityIdentifier &  uniqueId,
DtString uniqueName = 0,
DtString label = 0,
DtList *  vertices = 0,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Modify the given route.

virtual void DtVrfRemoteController::createPhaseLine ( const DtVector dbPoint1,
const DtVector dbPoint2,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Phase Lines.

Create a new phase line. Note that the name must be unique (if specified) and that the vertices needs to be in geocentric coordinates. This function simply sends the info to the given address -- it's up to users to do error checking before making this call!

virtual void DtVrfRemoteController::createPhaseLine ( DtVrfObjectCreatedCallbackFcn  fcn,
void *  usr,
const DtVector dbPoint1,
const DtVector dbPoint2,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Create a new phase line.

This version of create allows users to register a callback function that will be invoked once the object has been created.

virtual void DtVrfRemoteController::modifyPhaseLine ( const DtEntityIdentifier &  uniqueId,
DtString uniqueName = 0,
DtString label = 0,
DtVector newDbPoint1 = 0,
DtVector newDbPoint2 = 0,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Modify the given phase line.

virtual void DtVrfRemoteController::createControlArea ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Control Areas.

Create a new control area. Note that the name must be unique (if specified) and that the vertices needs to be in geocentric coordinates. Also, the vertices should form a convex polygon! This function simply sends the info to the given address -- it's up to users to do error checking before making this call!

virtual void DtVrfRemoteController::createControlArea ( DtVrfObjectCreatedCallbackFcn  fcn,
void *  usr,
const DtList &  vertices,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Create a new control area.

This version of create allows users to register a callback function that will be invoked once the object has been created.

virtual void DtVrfRemoteController::modifyControlArea ( const DtEntityIdentifier &  uniqueId,
DtString uniqueName = 0,
DtString label = 0,
DtList *  newVertices = 0,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

modify the given control area

virtual void DtVrfRemoteController::createObstacle ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Obstacle.

Create a new obstacle. Note that the name must be unique (if specified) and that the vertices needs to be in geocentric coordinates. Also, the vertices should form a convex polygon! This function simply sends the info to the given address -- it's up to users to do error checking before making this call!

virtual void DtVrfRemoteController::createObstacle ( DtVrfObjectCreatedCallbackFcn  fcn,
void *  usr,
const DtList &  vertices,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Create a new obstacle.

This version of create allows users to register a callback function that will be invoked once the object has been created.

virtual void DtVrfRemoteController::modifyObstacle ( const DtEntityIdentifier &  uniqueId,
DtString uniqueName = 0,
DtString label = 0,
DtList *  newVertices = 0,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

modify the given obstacle

virtual void DtVrfRemoteController::createDisaggregationArea ( const DtList &  vertices,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Disaggregation Area.

Create a new disaggregation area (triggers automatic disaggregation whenever an aggregate enters the area). Note that the name must be unique (if specified) and that the vertices needs to be in geocentric coordinates. This function simply sends the info to the given address -- it's up to users to do error checking before making this call!

virtual void DtVrfRemoteController::createDisaggregationArea ( DtVrfObjectCreatedCallbackFcn  fcn,
void *  usr,
const DtList &  vertices,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Create a new disaggregation area (triggers automatic disaggregation whenever an aggregate enters the area).

This version of create allows users to register a callback function that will be invoked once the object has been created.

virtual void DtVrfRemoteController::modifyDisaggregationArea ( const DtEntityIdentifier &  uniqueId,
DtString uniqueName = 0,
DtString label = 0,
DtList *  newVertices = 0,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Modify given disaggregation area.

virtual void DtVrfRemoteController::createOverlayObject ( const DtEntityType &  type,
const DtList &  vertices,
const DtForceType &  force,
const DtString name,
const DtString label,
int  color,
const DtString parentName,
bool  projection,
bool  closedFigure,
const DtAppearance &  appearance = DtAppearance::nullAppearance(),
const DtString attachTo = DtString(),
char *  userData = 0,
int  dataSize = 0,
DtOverlayCreatedCallbackFcn  fcn = 0,
const DtSimulationAddress &  addr = DtSimSendToAll,
unsigned int  rId = 0 
) [virtual]

Overlay objects.

Overlay objects are considered objects that both be used in a simulated environment (control objects as listed above) and objects that can be used to annotate a scenario as one might do with an overlay on an overhead projector.

Creating an overlay object is a two step process. The first step is to create the object, and the second is to apply modifications to that created object (color, parent). This call will do both. It will send the create message, wait for the object to be created, and then send the modify message for that object. If rId is non zero will use that generated id rather than a newly created one

virtual void DtVrfRemoteController::createIndirectArtillery ( const DtVrfIndirectArtilleryObjectModify params,
const DtSimulationAddress &  addr 
) [virtual]
virtual void DtVrfRemoteController::createObject ( const DtEntityType &  type,
DtForceType  force,
DtList *  vertices,
const DtString name,
const DtSimulationAddress &  addr 
) [virtual]

B. Entity and Aggregate management.

Very simple call that will create an object (entity or overlay) with a heading of 0 and the supplied points

virtual void DtVrfRemoteController::createEntity ( const DtEntityType &  type,
const DtVector geocentricPosition,
DtForceType  force,
DtReal  heading,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll,
bool  groundClamp = true 
) const [virtual]

Create a new entity.

virtual void DtVrfRemoteController::createEntity ( DtVrfObjectCreatedCallbackFcn  fcn,
void *  usr,
const DtEntityType &  type,
const DtVector geocentricPosition,
DtForceType  force,
DtReal  heading,
const DtString uniqueName = DtString::nullString(),
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll,
bool  groundClamp = true 
) [virtual]

Create a new entity.

This version of create allows users to register a callback function that will be invoked once the object has been created.

virtual void DtVrfRemoteController::createAggregate ( DtVrfObjectCreatedCallbackFcn  fcn,
void *  usr,
const DtEntityType &  type,
const DtVector geocentricPosition,
DtForceType  force,
DtReal  heading,
const DtString uniqueName,
const DtString label = DtString::nullString(),
const DtSimulationAddress &  addr = DtSimSendToAll,
DtAggregateState  initialAggregateState = DtDisaggregated 
) [virtual]
virtual void DtVrfRemoteController::createAggregate ( const DtEntityType &  type,
const DtVector geocentricPosition,
DtForceType  force,
DtReal  heading,
DtList *  entityNames = 0,
const DtSimulationAddress &  addr = DtSimSendToAll,
DtAggregateState  initialAggregateState = DtDisaggregated,
unsigned int  requestId = 0 
) const [virtual]

Create an aggregate.

virtual void DtVrfRemoteController::createAggregate ( DtVrfObjectCreatedCallbackFcn  fcn,
void *  usr,
const DtEntityType &  type,
const DtVector geocentricPosition,
DtForceType  force,
DtReal  heading,
DtList *  entityNames = 0,
const DtSimulationAddress &  addr = DtSimSendToAll,
DtAggregateState  initialAggregateState = DtDisaggregated 
) [virtual]

Create an aggregate.

This version of create allows users to register a callback function that will be invoked once the object has been created.

virtual void DtVrfRemoteController::addToOrganization ( const DtEntityIdentifier &  objectId,
const DtEntityIdentifier &  newSuperiorId,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Adds the specified object to as a subordinate to the specified superior.

Object will be detached from any superior it currently belongs to first.

virtual void DtVrfRemoteController::addToForceLevelOrganization ( const DtEntityIdentifier &  orjectId,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Adds the specified object as a subordinate to the Force Level aggregate corresponding to the objects force type.

It will be detached from any superior it currently belongs to first.

virtual void DtVrfRemoteController::removeFromOrganization ( const DtEntityIdentifier &  objectId,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Removes the specified object from whatever aggregate it is a part of and leaves it with no superior.

virtual void DtVrfRemoteController::setLabel ( const DtEntityIdentifier &  id,
const DtString label,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Modify an existing entity or aggregate.

NOTE: If any of the following set commands are specified for an aggregate leader, the change will apply to the entire aggregate. Set label

virtual void DtVrfRemoteController::setOverlayParent ( const DtEntityIdentifier &  id,
const DtString label,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Sets the overlay parent of this object. Calls down to sendVrfModifyMessage.

virtual void DtVrfRemoteController::setAltitude ( const DtString name,
double  altitude,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set altitude (in meters)

virtual void DtVrfRemoteController::setLocation ( const DtString name,
DtVector  coord,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set location (geocentric coordinates)

virtual void DtVrfRemoteController::setAppearance ( const DtString name,
int  appearance,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set appearance of entity.

virtual void DtVrfRemoteController::setCapabilities ( const DtString name,
int  capabilities,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set capabilities of entity.

virtual void DtVrfRemoteController::setHeading ( const DtString name,
double  degrees,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set heading (in degrees)

virtual void DtVrfRemoteController::setForce ( const DtString name,
DtForceType  force,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set force.

virtual void DtVrfRemoteController::requestSpotReports ( const DtString name,
bool  onOff,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Spot reports Requests that spot reports for the specified entity be sent or turned off.

virtual void DtVrfRemoteController::setResource ( const DtString name,
const char *  resourceType,
double  value,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set resource See resourceTypes.h for a list of pre-defined resource types that can be passed as the resourceType.

virtual void DtVrfRemoteController::setRulesOfEngagement ( const DtString name,
const char *  rulesType,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set rules of engagement.

See setEngRules.h for a list of pre-defined rules of engagement types that can be passed as the rulesType.

virtual void DtVrfRemoteController::setSectorOfResponsibility ( const DtString name,
double  center,
double  size,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set sector of responsibility (center and size are in degrees)

virtual void DtVrfRemoteController::setSpeed ( const DtString name,
double  speed,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set speed (in meters per second)

virtual void DtVrfRemoteController::setTarget ( const DtString name,
const DtString target,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set target.

virtual void DtVrfRemoteController::setTaskedBySuperior ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set tasked by superior.

virtual void DtVrfRemoteController::setConcealed ( const DtString name,
bool  yes,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set concealed.

virtual void DtVrfRemoteController::setEmitter ( const DtString name,
int  emitterId,
bool  on,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set emitter.

virtual void DtVrfRemoteController::setIff ( const DtString name,
bool  mode1on,
int  mode1code,
bool  mode2on,
int  mode2code,
bool  mode3on,
int  mode3code,
bool  mode4on,
int  mode4code,
DtIffAtcNavaidsAltParm4  altParm4,
bool  mode5on,
bool  useAltMode5,
bool  modeSon,
bool  emergency,
bool  flash,
bool  sti,
bool  modeSTcasI,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set iff.

virtual void DtVrfRemoteController::restore ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Restore to start state.

virtual void DtVrfRemoteController::setDestroyed ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Sets the damage state of the specified entity/aggregate to destroyed.

virtual void DtVrfRemoteController::setLifeformWeaponState ( const DtString name,
DtWeaponState  weapon,
const DtSimulationAddress &  addr 
) const [virtual]

Set lifeform weapon If 'name' does not correspond to a lifeform entity, making this call has no effect.

virtual void DtVrfRemoteController::setLifeformPosture ( const DtString name,
DtLifeformState  posture,
const DtSimulationAddress &  addr 
) const [virtual]

Set lifeform posture If 'name' does not correspond to a lifeform entity, making this call has no effect.

virtual void DtVrfRemoteController::setAggregateFormation ( const DtString leader,
const DtString formationName,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Set an aggregate formation.

If 'leader' is not an aggregate leader making this call will have no effect.

virtual void DtVrfRemoteController::reorganizeAggregate ( const DtString leader,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Reorganize the aggregate.

This function is only useful when automatic reorganization is not enabled. If 'leader' is not an aggregate leader making this call will have no effect.

virtual void DtVrfRemoteController::disaggregateEntity ( const DtString entity,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Disaggregate the entity, resulting in its DtAggregateState to become DtDisaggregated, and simulation of its subordinates as distinct entities.

virtual void DtVrfRemoteController::aggregateEntity ( const DtString entity,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Aggregate the entity, resulting in its DtAggregateState to become DtAggregated, with subordinates not simulated as distinct entities.

virtual void DtVrfRemoteController::sendSetDataMsg ( const DtString recipient,
DtSetDataRequest msg,
const DtSimulationAddress &  addr 
) const [virtual]

General set data message.

The recipient is the name of the object to receive the set message.

virtual void DtVrfRemoteController::sendVrfObjectCreateMsg ( const DtSimulationAddress &  addr,
unsigned int  requestId,
const DtString name,
const DtObjectType type,
const DtList &  vertices,
const DtString label,
const DtAppearance &  appearance,
DtForceType  force,
bool  projection,
bool  closedFigure,
DtReal  heading,
bool  createSubObjects,
bool  clampToGroundFlag = true,
const DtString initialFormation = DtString::nullString(),
DtAggregateState  initialAggregateState = DtDisaggregated,
const DtString userData = DtString::nullString(),
std::list< DtAdminContent * > *  initialAdminContent = 0,
std::list< DtSimInterfaceContent * > *  initialInterfaceContent = 0 
) const [virtual]

C. Advanced.

This function can be used to create vrf objects that cannot be created using the more specific methods above. In general, users should not need to call this.

virtual void DtVrfRemoteController::sendVrfObjectModifyMsg ( const DtSimulationAddress &  addr,
const DtEntityIdentifier &  id,
DtString name = 0,
DtList *  vertices = 0,
DtForceType *  force = 0,
DtReal *  heading = 0,
DtString label = 0,
DtAppearance *  appearance = 0,
DtString overlayParent = 0,
DtString userData = 0 
) const [virtual]

This function can be used to modify vrf objects that cannot be created using the more specific methods above.

Please note that calling this function for entity values will not work in most cases. Instead, the SetData family of methods should be used. In general, users should not need to call this.

virtual void DtVrfRemoteController::sendVrfOverlayObjectModifyMsg ( const DtSimulationAddress &  addr,
const DtEntityIdentifier &  id,
int  color,
DtString  parentName,
DtString  attachTo,
bool  keepExistingAttachment = true,
char *  userData = 0,
int  len = 0 
) const [virtual]

This function is only used to modify information that is specific to an overlay object (waypoint, route, overlay objects, etc.)

virtual void DtVrfRemoteController::sendVrfIndirectArtilleryObjectModifyMsg ( const DtSimulationAddress &  addr,
const DtEntityIdentifier &  id,
const DtVrfIndirectArtilleryObjectModify mod 
) const [virtual]
virtual void DtVrfRemoteController::moveAlongRoute ( const DtString entityName,
const DtString routeName,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

III. Plans and tasks.

Send a 'move along route' task to the entity/aggregate specified by 'name'.

virtual void DtVrfRemoteController::moveToWaypoint ( const DtString entityName,
const DtString waypoint,
bool  planPath = false,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a 'move to waypoint' task to the entity/aggregate specified by 'name'.

virtual void DtVrfRemoteController::moveToLocation ( const DtString entityName,
const DtVector destinationLocation,
bool  planPath = false,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a 'move to location' task to the entity/aggregate specified by 'name'.

destinationLocation is specified in geocentric coordinates.

virtual void DtVrfRemoteController::patrolBetweenWaypoints ( const DtString name,
const DtString waypoint1,
const DtString waypoint2,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a 'patrol waypoints' task to the entity/aggregate specified by 'name'.

virtual void DtVrfRemoteController::patrolAlongRoute ( const DtString name,
const DtString route,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a 'patrol route' task to the entity/aggregate specified by 'name'.

virtual void DtVrfRemoteController::followEntity ( const DtString name,
const DtString leader,
const DtVector offset,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a 'follow' task to the given entity/aggregate.

The vrf object specified by 'name' will follow 'leader' at the given offset . The offset should be specified in meters. To specify an offset in front, to the right, or below, use a negative sign for x, y, or z.

virtual void DtVrfRemoteController::wait ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a 'wait' task to the entity/aggregate specified by 'name'.

virtual void DtVrfRemoteController::waitDuration ( const DtString name,
DtTime  duration,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a 'wait X seconds' task to the entity/aggregate specified by 'name'.

Parameters:
addrseconds
virtual void DtVrfRemoteController::waitElapsed ( const DtString name,
DtTime  elapsed,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a 'wait until the simulation time has increased by X' task to the entity/aggregate specified by 'name'.

Parameters:
addrsimulation time
virtual void DtVrfRemoteController::sendTaskMsg ( const DtString recipient,
DtSimTask task,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a general task message to the entity/aggregate specified by 'recipient' argument, which is the name of the entity/aggregate to receive the task message.

virtual void DtVrfRemoteController::abandonPlan ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Command the entity/aggregate corresponding to the given entity to abandon its plan.

virtual void DtVrfRemoteController::skipTask ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Command the entity/aggregate to skip the current task.

virtual void DtVrfRemoteController::restartPlan ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Command the entity/aggregate corresponding to the given entity to abandon its plan.

virtual void DtVrfRemoteController::assignPlanByName ( const DtString name,
const DtPlan plan,
const DtSimulationAddress &  addr = DtSimSendToAll,
int *  retiStatus = NULL,
DtString retsStmt = NULL 
) const [virtual]

Assign a plan to the echelon ID held by the entity/aggregate corresponding to the given entity name.

If plan fails, will contains failure code. Currently if status is 0, it is because an individual statement was too long to add retsStmt will contain the string representation of the statement that to encode.

Note:
As of VR-Forces 3.10, assigning plans by echelon ID is no longer supported. Assign all plans by name.
virtual void DtVrfRemoteController::assignMultiplePlanByName ( const std::vector< DtString > &  entities,
const DtPlan plan,
const DtSimulationAddress &  addr = DtSimSendToAll,
int *  retiStatus = NULL,
DtString retsStmt = NULL 
) const [virtual]

Same as assignPlanByName, except send DtMultiplePlanSet message.

virtual void DtVrfRemoteController::requestPlan ( const DtString name,
bool  addStmtCallback = true,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Send a message to all VRF sim engines requesting plan updates messages for the specified entity name.

You must have a plan callback registered for this entity to receive the plan message from the sim engine.

virtual void DtVrfRemoteController::subscribePlan ( const DtString name,
DtPlanCallbackFcn  fn,
void *  usr,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Requests plan messages from the sim engine for a particular entity, and registers a callback to receive the messages.

The given callback will be invoked whenever a relevant plan message arrives.

virtual void DtVrfRemoteController::requestMultiplePlan ( const std::vector< DtString > &  entities,
DtMultiplePlanRequestCallbackFcn  fcn,
void *  usr,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Send a message to the specified backend (or all) to check to see if all locally simulated entities contain the same plan.

If they do, a response is sent back with the plan. If they do not, a response is sent back with a flag stating that the plans are not common (rather than an empty plan

virtual void DtVrfRemoteController::requestMultiplePlan ( const std::vector< DtString > &  entities,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]
virtual void DtVrfRemoteController::unsubscribePlan ( const DtString name,
DtPlanCallbackFcn  fn,
void *  usr 
) [virtual]

Removes a plan message callback function registered with subscribePlan.

virtual void DtVrfRemoteController::unsubscribeAllPlans ( ) [virtual]

Unregisters all plan message callbacks.

Both entity/aggregate as well as global plan subscriptions are removed.

virtual void DtVrfRemoteController::addPlanStatementCallback ( const DtString name,
DtPlanStatementCallbackFcn  callback,
void *  usrData 
) [virtual]

Register callback for an entity's or aggregate's current statement.

requestPlan() or subscribePlan() must be called for the same entity for the callback to be invoked.

virtual void DtVrfRemoteController::removePlanStatementCallback ( const DtString name,
DtPlanStatementCallbackFcn  callback,
void *  usrData 
) [virtual]

Unregister callback for an entity's or aggregate's current statement.

Unregister current statement callbacks for all entities/aggregates and global plans.

virtual void DtVrfRemoteController::addPlanCompleteCallback ( const DtString name,
DtPlanCompleteCallbackFcn  callback,
void *  usrData 
) [virtual]

Register callback for an entity's or aggregate's plan completion.

requestPlan() or subscribePlan() must be called for the same entity for the callback to be invoked.

virtual void DtVrfRemoteController::removePlanCompleteCallback ( const DtString name,
DtPlanCompleteCallbackFcn  callback,
void *  usrData 
) [virtual]

Unregister callback for an entity's or aggregate's plan completion.

Unregister plan completion callbacks for all entities/aggregates and global plans.

virtual void DtVrfRemoteController::requestGlobalPlansList ( const DtSimulationAddress &  addr) [virtual]

------- Global Plans

Requests the list of all global plans

virtual void DtVrfRemoteController::assignGlobalPlan ( const DtString name,
const DtPlan plan,
const DtSimulationAddress &  addr = DtSimSendToAll,
int *  retiStatus = NULL,
DtString retsStmt = NULL 
) const [virtual]

Assigns a global plan of the specified name to the sim engine specified in addr.

If addr is DtSimSendToAll, the first sim engine is chosen. If plan fails, will contains failure code. Currently if status is 0, it is because an individual statement was too long to add retsStmt will contain the string representation of the statement that to encode.

Note:
As of VR-Forces 3.10, assigning plans by echelon ID is no longer supported. Assign all plans by name.
virtual void DtVrfRemoteController::deleteGlobalPlan ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Deletes any global plan matching the specified name.

virtual void DtVrfRemoteController::requestGlobalPlan ( const DtString name,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Sends message requesting the contents of the names global plan.

You must have a plan callback registered before calling this to receive the plan.

virtual void DtVrfRemoteController::subscribeGlobalPlan ( const DtString name,
DtPlanCallbackFcn  fn,
void *  usr,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Requests plan messages from the sim engine for a particular global plan, and registers a callback to receive the messages.

The given callback will be invoked whenever a relevant plan message arrives.

virtual void DtVrfRemoteController::unsubscribeGlobalPlan ( const DtString name,
DtPlanCallbackFcn  fn,
void *  usr 
) [virtual]

Removes a plan message callback function registered with subscribeGlobalPlan().

virtual void DtVrfRemoteController::addGlobalPlanStatementCallback ( const DtString name,
DtPlanStatementCallbackFcn  callback,
void *  usrData 
) [virtual]

Register callback for a global plan's current statement.

requestGlobalPlan() or subscribeGlobalPlan() must be called for the same plan name for the callback to be invoked.

virtual void DtVrfRemoteController::removeGlobalPlanStatementCallback ( const DtString name,
DtPlanStatementCallbackFcn  callback,
void *  usrData 
) [virtual]

Unregister callback for a global plan's current statement.

virtual void DtVrfRemoteController::addGlobalPlanCompleteCallback ( const DtString name,
DtPlanCompleteCallbackFcn  callback,
void *  usrData 
) [virtual]

Register callback for a global plan's completion.

requestGlobalPlan() or subscribeGlobalPlan() must be called for the same plan name for the callback to be invoked.

virtual void DtVrfRemoteController::removeGlobalPlanCompleteCallback ( const DtString name,
DtPlanCompleteCallbackFcn  callback,
void *  usrData 
) [virtual]

Unregister callback for a global plan's completion.

Communication From Entities Register callbacks with this message executive to receive messages sent from entities and objects to the GUI.

Only messages addressed to DtVrfMessageFrontEndAddress will be received in these callbacks.

virtual void DtVrfRemoteController::sendMessageToObject ( DtVrfObjectMessage objectMessage,
const DtSimulationAddress &  addr = DtSimSendToAll 
) const [virtual]

Sends the specified message to the entity identified in the message receiver field.

The transmitter field of the message is filled in by this class to be DtVrfObjectMessageFrontEndAddress. Normally, the default simulation address of DtSimSendToAll should be used.

virtual void DtVrfRemoteController::loadedScenario ( const DtSimulationAddress &  addr,
unsigned int  requestId 
) [virtual]

Invoked when a backend notifies us that it has received and loaded the given scenario information.

Users should never need to call this function.

virtual void DtVrfRemoteController::processSaveMessages ( ) [virtual]

Called before the scenario is saved, this routine will go through the saved save interface messages and store scenario data common to all servers.

virtual DtTime DtVrfRemoteController::scenarioSimTimeForSave ( ) [virtual]

This routine will return the simulation time based upon the saved messages that should be saved in the scenario file.

This routine will set the terrain database filename into the supplied scenario.

It will warn if any of the backends do not match the first backend's terrain database filename

This routine will set the parameter database filename into the supplied scenario.

It will warn if any of the backends do not match the first backend's parameter database filename

virtual void DtVrfRemoteController::setPhysicalWorldFilename ( DtScenario scen) [virtual]

This routine will set the physical world filename into the supplied scenario.

It will warn if any of the backends do not match the first backend's parameter database filename

virtual void DtVrfRemoteController::setTimeMultiplier ( DtScenario scen) [virtual]

This routine will set the time multiplier into the supplied scenario.

It will warn if any of the backends do not match the first backend's time multiplier

virtual void DtVrfRemoteController::setAutoReorganize ( DtScenario scen) [virtual]

This routine will set the auto reorganize flag into the supplied scenario.

It will warn if any of the backends do not match the first backend's auto reorganize flag

virtual void DtVrfRemoteController::setRandomNumberSeed ( DtScenario scen) [virtual]

This routine will set the random number seed into the supplied scenario.

It will warn if any of the backends do not match the first backend's random number seed

virtual void DtVrfRemoteController::setFrameRateMode ( DtScenario scen) [virtual]

This routine will set the frame rate mode into the supplied scenario.

It will warn if any of the backends do not match the first backend's frame rate mode

virtual void DtVrfRemoteController::setFrameDeltaTime ( DtScenario scen) [virtual]

This routine will set the frame delta time into the supplied scenario.

It will warn if any of the backends do not match the first backend's frame delta time

virtual void DtVrfRemoteController::setExerciseStartTime ( DtScenario scen) [virtual]

This routine will set the exercise start time into the supplied scenario.

It will warn if any of the backends do not match the first backend's exercise start time

virtual bool DtVrfRemoteController::save ( ) [virtual]

Write out scenario files.

This function will compose the saved backend data that we have received so far. Ideally, this is only invoked when all backends have responded to a save request. Users generally should never call this function.

virtual void DtVrfRemoteController::save ( const DtSimulationAddress &  addr,
DtIfSaveComplete s 
) [virtual]

Invoked when a backend notifies us that it has saved and sent its scenario information.

The information in 's' is saved to be processed later. Users generally should never call this function.

virtual void DtVrfRemoteController::savedScenario ( const DtSimulationAddress &  addr,
DtSaveResult  result,
unsigned int  requestId 
) [virtual]

Invoked when a backend notifies us that it has saved and sent its scenario information.

Calls user callbacks. Users generally should never call this function.

virtual void DtVrfRemoteController::doPendingSaveWork ( ) [virtual]

Perform periodic processing that's needed for saving a scenario.

This function will get executed in a VR-Link post drain callback.

virtual void DtVrfRemoteController::doPendingLoadWork ( ) [virtual]

Perform periodic processing that's needed for loading a scenario.

This function will get executed in a VR-Link post drain callback.

virtual void DtVrfRemoteController::objectCreated ( unsigned int  requestId,
const DtString name,
const DtEntityIdentifier &  id 
) [virtual]

Invoked when an object we've requested has been created.

Calls any user registered callbacks

virtual unsigned int DtVrfRemoteController::generateRequestId ( ) const [virtual]

Generate a request id.

virtual void DtVrfRemoteController::receivedPlan ( const DtString name,
bool  isGlobal,
const DtList &  statements 
) [virtual]

Invoked when we receive a plan (usually it will be in response to a requestPlan() command)

virtual void DtVrfRemoteController::receivedPlanStmt ( const DtString name,
bool  isGlobal,
DtPlanStatus  planStatus 
) [virtual]

Invoked when we receive a current statement message.

This message also contains information about whether or not the plan has been completed. This method invokes either current statement callbacks or plan complete callbacks.

virtual void DtVrfRemoteController::embarkObject ( const DtSimulationAddress &  addr,
const DtString entity,
const DtString ontoEntity,
bool  loadOverride = false,
const DtVector loadOverridePosition = DtVector::zero() 
) [virtual]

These routines will send interface messages to tell the back-end to embark or disembark the specified objects.

All information sent is by object name. If loadOverride is false, then the system will use to occupancy director to determine where to embark the entity, else it will use the offset (in body coordinates) supplied by the user

virtual void DtVrfRemoteController::disembarkObject ( const DtSimulationAddress &  addr,
const DtString entity 
) [virtual]
virtual void DtVrfRemoteController::disembarkAllObjects ( const DtSimulationAddress &  addr,
const DtString entity 
) [virtual]
virtual void DtVrfRemoteController::requestTasksAndSetsFor ( const DtSimulationAddress &  addr,
const DtString entityName 
) [virtual]

Requests the tasks and sets that are available for this object, using the DtIfCapableTaskAndSetQuery.

The response to this message will be a DtIfCapableTaskAndSetResponse message

virtual void DtVrfRemoteController::requestTasksAndSetsFor ( const std::vector< DtString > &  names) [virtual]

Requests the tasks and sets that are available for the list of named objects.

virtual void DtVrfRemoteController::requestDIGuyAppearancesAndAnimations ( const DtSimulationAddress &  addr,
const DtString entityName 
) [virtual]

Requests the DI-Guy Appearances and animations available for the DI-Guy character associated with this entity.

virtual void DtVrfRemoteController::requestDIGuyAppearancesAndAnimations ( const std::vector< DtString > &  names) [virtual]

Requests the DI-Guy Appearances and animations available for the DI-Guy character associated with these entities.

IV. Factories.

Accessors for factories that create the various kinds of interface messages and interface message content objects.

virtual void DtVrfRemoteController::setRotationThreshold ( DtReal  thresh) [virtual]

IV. Misc.

Set rotation threshold (in radians) for all back-ends.

virtual void DtVrfRemoteController::setTranslationThreshold ( DtReal  thresh) [virtual]

Set translation threshold (in meters) for all back-ends.

virtual void DtVrfRemoteController::setAggDimensionThreshold ( DtReal  thresh) [virtual]

Set the aggregate dimension threshold for all back-ends.

Thresh is a number between 0 and 1, indicating the percentage change that an aggregate's dimensions can undergo before causing an update to be generated.

virtual void DtVrfRemoteController::setHostInetAddr ( DtInetAddr  ) [virtual]

Internet address setting.

virtual DtInetAddr DtVrfRemoteController::hostInetAddr ( ) const [virtual]
virtual void DtVrfRemoteController::querySpatialSubdivisionConfiguration ( const DtSimulationAddress &  backendAddress,
DtSpatialSubdivisionType  spatialSubdivisionType,
DtServerRequestResponseCallbackFcn  fcn = 0,
void *  usr = 0 
) [virtual]

Request spatial subdivision configuration of a given type, from a given back-end.

virtual void DtVrfRemoteController::setSpatialSubdivsionConfiguration ( const DtSimulationAddress &  backendAddress,
DtSpatialSubdivisionType  spatialSubdivisionType,
const int  spatialSubdivisionXResolution,
const int  spatialSubdivisionYResolution,
const int  spatialSubdivisionZResolution 
) [virtual]

Set spatial subdivision configuration for given back-end.

Request indirect artillery information by environmental name.

virtual void DtVrfRemoteController::requestResources ( const DtString name = DtString::nullString(),
const std::list< DtString > *  list = 0,
DtServerRequestResponseCallbackFcn  fcn = 0,
void *  usr = 0 
) [virtual]

V. Resource information.

Sends a request the server to send back a PDU which contains the resource values for the specified object and resource values. If the object specified is the default value, then a single PDU will contain information for all entities in the simulation. If the resource string list is not specified, then all resources for each entity specified will be returned.

Object Console Information.

Manage callbacks which will get called each time a object console message is received over the network.

Object Console Information.

Manage callbacks which will get called each time a object console message is received over the network.

virtual void DtVrfRemoteController::setObjectNotifyLevel ( const DtString objectName,
DtNotifyLevelType  notifyLevel,
const DtSimulationAddress &  addr = DtSimSendToAll 
) [virtual]

Sends a request to the sim engine to change the notification level of the specified object.

virtual void DtVrfRemoteController::logObjectConsoleToFile ( const DtString objectName,
const DtFilename  filename 
) [virtual]

Starts the sim engine logging this object console to the specified file.

This file will be written by the sim engine that is simulating this object.

virtual void DtVrfRemoteController::stopLoggingObjectConsoleToFile ( const DtString objectName) [virtual]

Stops any sim engine which is currently writing a log file for this object.

Back-end Console Information.

Manage callbacks that will get called each time a back-end console message is received over the network.

Back-end Console Information.

Manage callbacks that will get called each time a back-end console message is received over the network.

virtual void DtVrfRemoteController::requestResourceNames ( const std::list< DtString > &  list,
DtServerRequestResponseCallbackFcn  fcn = 0,
void *  usr = 0 
) [virtual]

Sends a request to the server to return a list of resource names associated with the entities supplied.

The response will only contain a list of resources. It will not associate the resource with the entity has that has

Returns a pointer to the radio message listener.

Callbacks can be registered with this listener to pick up radio messages that are send by VR-Forces objects.

Note:
Callbacks are invoked on sending of the radios messages, which does not necessarily mean the message was received.

Weather.

Returns myRemoteEnvironmentController.

virtual void DtVrfRemoteController::initializeGlobalEnvironment ( const DtSimulationAddress &  environmentSimBackend = DtSimSendToAll) [virtual]

Starts the environment simulation on one of the available simulation engines.

Must be called before setting environment state settings in the DtRemoteEnvironmentController. If DtSimSendToAll passed, then an arbitrary sim engine is chosen to simulate the environment.

Instantiates a new DtRemoteEnvironmentController, override to install a subclass.

static void DtVrfRemoteController::doPendingSaveWorkCb ( void *  usr) [static]

Invoked periodically while waiting for a save command to complete.

static void DtVrfRemoteController::doPendingLoadWorkCb ( void *  usr) [static]

Invoked periodically while waiting for a load command to complete.

static void DtVrfRemoteController::savedScenarioCb ( DtSimMessage msg,
void *  usr 
) [static]

Invoked when a backend notifies us that it has saved and send it scenario information.

static void DtVrfRemoteController::loadedScenarioCb ( DtSimMessage msg,
void *  usr 
) [static]

Invoked when a backend notifies us that it has received and loaded the given scenario information.

static void DtVrfRemoteController::receiveFileCb ( const DtFilename &  filename,
void *  usr 
) [static]

Invoked when a file has been received from our dedicated TCP socket.

static void DtVrfRemoteController::receivedMultiPlanCb ( DtSimMessage msg,
void *  usr 
) [static]

Invoked when we receive a multiple plan response.

Invokes callback for request id.

static void DtVrfRemoteController::objectCreatedCb ( DtSimMessage msg,
void *  usr 
) [static]

Invoked when an object we've requested has been created.

static void DtVrfRemoteController::receivedPlanCb ( DtSimMessage msg,
void *  usr 
) [static]

Invoked when we receive a plan as a result of a plan request.

static void DtVrfRemoteController::receivedPlanStmtCb ( DtSimMessage msg,
void *  usr 
) [static]

Invoked when we receive a plan statement message.

static void DtVrfRemoteController::overlayObjectCreatedCallback ( const DtString name,
const DtEntityIdentifier &  id,
void *  usr 
) [static]

Invoked when an overlay object is created.

Will call the processOverlayObjectCreated() method

virtual void DtVrfRemoteController::processOverlayObjectCreated ( const DtString name,
const DtEntityIdentifier &  id,
DtVrfOverlayObjectModify modifications 
) [virtual]
static void DtVrfRemoteController::indirectArtilleryObjectCreatedCallback ( const DtString name,
const DtEntityIdentifier &  id,
void *  usr 
) [static]

Invoked when an indirect artillery object is created.

Will call the processOverlayObjectCreated() method

virtual void DtVrfRemoteController::processIndirectArtilleryObjectCreated ( const DtString name,
const DtEntityIdentifier &  id,
DtVrfIndirectArtilleryObjectModify modifications 
) [virtual]
static void DtVrfRemoteController::resourcesProcessedCb ( DtSimMessage msg,
void *  usr 
) [static]

Invoked when a resource request is called via requestResources.

Process this message if the request id is one we generated.

static void DtVrfRemoteController::spatialSubdivisionConfigurationCb ( DtSimMessage msg,
void *  usr 
) [static]

Invoked when a query spatial subdivision configuration request is made via querySpatialSubdivisionConfiguration().

Calls process

Process this message if the request id is one we generated.

Calls sendQuerySpatialSubdivisionConfigurationRequest() to send out request.

static void DtVrfRemoteController::commentInteractionCallback ( DtCommentInteraction *  inter,
void *  usr 
) [static]

Invoked when a comment interaction is received from the network.

Calls processCommentInteraction().

virtual void DtVrfRemoteController::processCommentInteraction ( DtCommentInteraction *  inter) [virtual]

Processes an incoming comment interaction.

Object console messages are sent via comment interactions.

virtual void DtVrfRemoteController::onInit ( ) [protected, virtual]

Initializes myTempDirectory, host inet address, myListener, myRadioMessageListener, myRemoteEnvironmentController.

Registers all callbacks and factories.

virtual void DtVrfRemoteController::resetStateData ( ) [protected, virtual]
virtual void DtVrfRemoteController::emptyLists ( ) [protected, virtual]
virtual void DtVrfRemoteController::sendAggregateAsMsg ( const DtSimulationAddress &  addr,
unsigned int  requestId,
const DtObjectType objectType,
DtForceType  force,
const DtVector position,
DtReal  heading,
DtList *  entityNames,
DtAggregateState  initialAggregateState 
) const [protected, virtual]

Fills out and sends an aggregate-as message.

Initializes the myComposer variable.

virtual void DtVrfRemoteController::sendQuerySpatialSubdivisionConfigurationRequest ( const DtSimulationAddress &  backendAddress,
DtSpatialSubdivisionType  spatialSubdivisionType,
DtServerRequestResponseCallbackFcn  fcn,
void *  usr 
) [protected, virtual]

Sends DtIfQuerySpatialSubdivisionConfiguration request for given spatial subdivision type.

virtual bool DtVrfRemoteController::arbitrarySimAddress ( DtSimulationAddress &  address) const [protected, virtual]

Chooses an arbitrary simulation address from the current set of registered backends.

This is used for commands that must be sent to only one sim engine, but have DtSimSendToAll specified. Chooses the first address on the list.

Returns:
True if filled in a valid address. False if there were no registered sim engines.
virtual bool DtVrfRemoteController::addStatementsAndSendPlan ( const DtPlan plan,
DtIfPlan planMsg,
const DtSimulationAddress &  addr = DtSimSendToAll,
int *  retiStatus = 0,
DtString retsStmt = 0 
) const [protected, virtual]

Adds the statements from plan to planMsg, and sends planMsg to the specified address.

If the plan gets too long, multiple plan messages are sent, to be appended on the sim engine side. If any of the statements are too large to be encoded into the planMsg, an error code and the text of the invalid statement are returned in retiStatus and retsStmt.

Returns:
True if successful.
static void DtVrfRemoteController::deliverRadioMessageCallback ( DtSimMessage msg,
void *  usr 
) [static, protected]

Callback registered with the message interface for vrfObjectMessages.

Calls processVrfObjectMessage().

static void DtVrfRemoteController::vrfObjectMessageCallback ( const DtVrfObjectMessage objMsg,
void *  usr 
) [static, protected]
virtual void DtVrfRemoteController::processVrfObjectMessage ( const DtVrfObjectMessage objectMsg) [protected, virtual]

If the message is addressed to the front end, passes it to the objectMessageExecutive for processing by any registered callbacks.

static void DtVrfRemoteController::globalEnvironmentCreatedCb ( const DtString name,
const DtEntityIdentifier &  id,
void *  usr 
) [static, protected]

Called when global weather object is created, will then set time of day.

This will only be called during new scenario creation

virtual void DtVrfRemoteController::processGlobalEnvironmentCreated ( const DtString name,
const DtEntityIdentifier &  id 
) [protected, virtual]
virtual bool DtVrfRemoteController::newScenario ( const DtFilename &  dbname,
const DtFilename &  guidbname,
const DtFilename &  opdname,
const DtFilename &  physicalWorldName,
const std::vector< DtString > &  simulationModelSetFiles,
const DtScenario baseScenario = 0,
int  startTimeOfDay = 12 *3600 
) [virtual]

Called internally from new scenario methods.

Create a new scenario from a simulation model set files. Creates and sends the load scenario message. Creates the environmental weather object on the first available back-end by calling createEntity().


Member Data Documentation

DtExerciseConn* DtVrfRemoteController::myExConn [protected]
DtList DtVrfRemoteController::myBeList [protected]

list of any deprecated old-style save callbacks that have been registered

list of any preferred new-style save callbacks that have been registered

DtFilename DtVrfRemoteController::mySaveName [protected]
DtFilename DtVrfRemoteController::myOpdName [protected]

true if a DtBackendRemappingFcn was called on the current scenario

false if a DtPreserveMappingsFcn returned false when saving a scenario

true if at some point during the save of this scenario the user decided to remap the objects to the new back end.

If true, the user will no longer be prompted to preserve mappings

Set to true if needs to create global environment on first load of simulation.

These are needed for message callbacks to work.

This member variable will contain the front end database (if different from backe-end).

It is set on new scenario, load scenario or by accessor function

Extra data used to be saved with the scenarip.

Location for temporary files generated by the configuration composer and file transporter.

DtInetAddr DtVrfRemoteController::myInetAddr [protected]

This is the Internet address to send saved files back to from the server.

If this program is run on a machine that has multiple Internet cards, call the setHostInetAddr method to the Internet address to use

unsigned int DtVrfRemoteController::myRequestIdCounter [mutable, protected]

Incremented by generateRequestId() to assign new request id's.

This value should only be changed by generateRequestId(). It's declared as mutable so that generateRequestId() and all the functions that call it can be const functions.

Used to processes VrfObjectMessages addressed to the Front End.

Used to spy on radio messages sent between VRF Entities.

Used to monitor and change the weather state.

Only set for a new scenario.


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)