![]() |
VR-Forces 4.3.1 Class Documentation
|
Maintains and signals state of the simulation engines that are currently connected to the GUI. More...

Public Types | |
| typedef std::map< std::string, DtVrfBackendState * > | DtVrfSimBackendStates |
Public Member Functions | |
| DtVrfSimBackendManager (makVrv::DtDe &) | |
| virtual | ~DtVrfSimBackendManager () |
| virtual bool | backEndsPresent () const |
| Returns true if there are any back-ends present. | |
| virtual bool | anyBackendsLoading () const |
| Returns true if any back-ends are loading. | |
| virtual bool | anyBackendsClosing () const |
| Returns true if any back-ends are closing. | |
| virtual bool | anyBackendsLoaded () const |
| Returns true if any back-ends are loaded. | |
| virtual bool | allBackendsLoaded () const |
| Returns true if all back-ends are loaded. | |
| virtual bool | backendLoaded (const DtSimulationAddress &) const |
| Returns true if specified back-end is loaded. | |
| virtual bool | backendSaving (const DtSimulationAddress &) const |
| Returns true if specified back-end is saving. | |
| virtual bool | anyBackendsPlaying () const |
| Returns true if any back-ends are playing a scenario | |
| virtual bool | anyBackendsInControlState (int state) const |
| Returns true any backend is in the particular control state (play, pause) | |
| virtual bool | allBackendsCanSimulate () const |
| Returns true if all back-ends are ready to simulate. | |
| virtual bool | backendCanSimulate (const DtSimulationAddress &) const |
| Returns true if the specified backend can simulate. | |
| virtual void | duplicateBackendDiscovered (const DtSimulationAddress &) |
| Called when a duplicate backend is discovered. Will queue duplicateSimulationBackendDiscovered. | |
| virtual double | timeMultiplier () const |
| Returns the time multiplier of the scenario. | |
| virtual DtVrfBackendState * | stateFor (const DtSimulationAddress &) const |
| virtual const DtSimulationAddress & | selectedBackend () const |
| void | setSelectedBackend (const DtSimulationAddress &) |
| virtual int | numberOfBackends () const |
| virtual void | clearSelectedBackend () |
| Clears the currently selected backend. | |
| virtual double | simTime () const |
| Returns the maximum sim time of all known, loaded back-ends. | |
| virtual double | runDurationTime () const |
| Returns the run duration time. 0 means run until user pauses. | |
| virtual double | timeOfDay () const |
| Returns the current time of day (in seconds). | |
| virtual double | simStartSimTime () const |
| Returns the maximum sim start sim time of all known, loaded back-ends. | |
| const DtVrfSimBackendStates & | backendStates () const |
| virtual std::map< short, int > | currentObjectCounts () const |
| Returns a map which is the total of all objects (key of kind/domain and count) of all backends. | |
| virtual const std::map< short, int > & | currentObjectCount (const DtSimulationAddress &) const |
| Returns a map of the objects counts of the particular back-end. | |
| virtual void | signalWhenAllBackendsClosed () |
| Sets the back-end manager to watch for all back-ends closed. Once closed, will stop watching. | |
| virtual void | signalIfAllBackendsClosed () |
| If there are no back-ends loaded, signals so and then sets the mySignalWhenAllBackendsClosed flag to false. | |
| virtual void | signalWhenAllBackendsLoaded () |
| Sets the back-end manager to watch for all back-ends loaded. | |
| virtual void | signalIfAllBackendsLoaded () |
| Will signal if all back-ends are loaded and the mySignalWhenAllBackendsClosed is false. | |
| virtual void | signalWhenAllBackendsSaved () |
| Sets the back-end manager to watch for all back-ends switching from saving to non-saving state. | |
| virtual void | signalIfAllBackendsSaved () |
| Will signal saved if the myBackendsWaitingForSave list is empty. | |
| std::string | sessionScenario () const |
| virtual void | setSessionScenario (const std::string &) |
| std::string | sessionGuiTerrain () const |
| virtual void | setSessionGuiTerrain (const std::string &) |
| std::string | sessionSimTerrain () const |
| const std::vector< DtFilename > & | simulationModelSets () const |
| virtual void | setSimulationModelSets (const DtRwNLengthStringVector &) |
| virtual void | sessionStatusChanged (const DtSessionStatus &status) |
| Called when session status has changed. Queues a function to deal with it. | |
| virtual time_t | dateAndTimeOfDay () const |
| virtual void | setDateAndTimeOfDay (time_t) |
| virtual void | resetDateAndTimeOfDay () |
| virtual const std::map < std::string, bool > | backendsLoading () const |
| virtual const std::map < std::string, bool > | backendsClosing () const |
| virtual void | removeAllBackends () |
| Called by the DtVrfBackendInterceptor when backend status has changed in some way. | |
| virtual void | addBackend (const DtBackend *) |
| Called by the DtVrfBackendInterceptor when backend status has changed in some way. | |
| virtual void | backendRemoved (const DtSimulationAddress &) |
| Called by the DtVrfBackendInterceptor when backend status has changed in some way. | |
| virtual void | backendUpdated (const DtSimulationAddress &, const DtBackend *) |
| Called by the DtVrfBackendInterceptor when backend status has changed in some way. | |
Public Member Functions inherited from makVrf::DtQueuedManager | |
| DtQueuedManager (makVrv::DtDe &) | |
| virtual | ~DtQueuedManager () |
| virtual void | setActivated (bool) |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. | |
Static Public Member Functions | |
| static DtVrfSimBackendManager & | instance (makVrv::DtDe &de) |
| Returns instance of the messager. | |
Public Attributes | |
| boost::signal< void()> | signal_allBackendsClosed |
| boost::signal< void()> | signal_allBackendsLoaded |
| boost::signal< void()> | signal_allBackendsSaved |
| boost::signal< void(const DtVrfBackendState &)> | signal_frameRatesUpdated |
| boost::signal< void(const DtVrfBackendState &)> | signal_backendDiscovered |
| boost::signal< void(const DtVrfBackendState &)> | signal_backendRemoved |
| boost::signal< void(const DtVrfBackendState &, int)> | signal_backendUpdated |
| boost::signal< void(int)> | signal_sessionUpdated |
| boost::signal< void(const DtVrfBackendState &)> | signal_duplicateSimulationAddress |
| boost::signal< void(const DtSimulationAddress &old, const DtSimulationAddress &newaddr)> | signal_selectedBackendChanged |
| boost::signal< void()> | signal_allBackendsAboutToBeRemoved |
Protected Member Functions | |
| virtual void | tick () |
| Lock sim time to allow consistant access to simulation time to those that want it. | |
| virtual double | simTimeFromBackend () const |
| Returns the maximum sim time of all known, loaded back-ends. | |
| virtual void | updateDateAndTimeOfDay () |
| virtual void | slot_dateAndTimeOfDayChanged (int year, int month, int day, int hours, int mins, int secs) |
| virtual void | slot_frameRatesUpdated (const DtVrfBackendState &) |
| virtual void | simulationBackendRemoved (DtVrfBackendState *) |
| virtual void | simulationBackendDiscovered (DtVrfBackendState *) |
| virtual void | simulationBackendUpdated (DtSimulationAddress, int) |
| virtual void | duplicateSimulationBackendDiscovered (DtSimulationAddress) |
| virtual void | processSessionStatusChange (DtSessionStatus) |
| virtual void | processLoadCompleteCallback (DtSimMessage *) |
| virtual void | processSaveCompleteCallback (DtSimMessage *) |
| virtual void | backendSaved (const std::string &) |
| Called when a backend has finished saving or has been removed from the save list due to timeout. | |
| virtual void | setBackendSaving (const DtSimulationAddress &, bool b) |
| virtual void | updateSessionInformation (int sessionFlags=0) |
| Emits signal if something has changed about the session. | |
Protected Member Functions inherited from makVrf::DtQueuedManager | |
| virtual void | queueSimulationFunction (const boost::function< void()> &function) |
| Put a function in the sim function queue, for threadsafe calling. | |
| virtual void | runFunctionQueue (DtVrfBackendManagerCallQueue &queue) |
| Execute a function queue. | |
Protected Attributes | |
| makVrv::DtBaseSimulation * | mySimulation |
| DtVrfSimBackendStates | myBackendStates |
| DtSimulationAddress | mySelectedBackend |
| bool | mySignalWhenAllBackendsClosed |
| bool | mySignalWhenAllBackendsLoaded |
| bool | mySignalWhenAllBackendsSaved |
| std::map< std::string, char > | myBackendsWaitingForSave |
| std::map< std::string, bool > | myAlreadyDuplicateWarned |
| std::map< std::string, bool > | myNeedToLoad |
| std::vector< std::string > | myNeedToSave |
| DtSessionStatus | mySessionStatus |
| std::map< std::string, bool > | myJustLoadedMap |
| std::map< std::string, bool > | myLoadingMap |
| std::map< std::string, bool > | myClosingMap |
| std::map< std::string, bool > | myJustClosedMap |
| double | mySimTime |
| double | myLastSimTime |
| double | myDateAndTimeOfDay |
| makVrv::DtSignalConnectionManager | myConnectionManager |
| bool | myCloseProcessStarted |
Protected Attributes inherited from makVrf::DtQueuedManager | |
| makVrv::DtDe & | myDe |
| DtVrfBackendManagerCallQueue | myFunctionCallQueue |
| bool | myActivated |
Additional Inherited Members | |
Protected Types inherited from makVrf::DtQueuedManager | |
| typedef makVrv::DtLockedBufferedQueue < boost::function< void()> > | DtVrfBackendManagerCallQueue |
| typedef std::vector < boost::function< void()> > | DtVrfBackendManagerCallList |
Maintains and signals state of the simulation engines that are currently connected to the GUI.
This class also handles the thread boundary for simulation engine state messages that come from the communication thread, so that subset of the methods on this class are thread safe.
| typedef std::map<std::string, DtVrfBackendState*> makVrf::DtVrfSimBackendManager::DtVrfSimBackendStates |
| makVrf::DtVrfSimBackendManager::DtVrfSimBackendManager | ( | makVrv::DtDe & | ) |
|
virtual |
|
static |
Returns instance of the messager.
|
virtual |
Returns true if there are any back-ends present.
|
virtual |
Returns true if any back-ends are loading.
|
virtual |
Returns true if any back-ends are closing.
|
virtual |
Returns true if any back-ends are loaded.
|
virtual |
Returns true if all back-ends are loaded.
|
virtual |
Returns true if specified back-end is loaded.
|
virtual |
Returns true if specified back-end is saving.
|
virtual |
Returns true if any back-ends are playing a scenario
Returns true any backend is in the particular control state (play, pause)
|
virtual |
Returns true if all back-ends are ready to simulate.
|
virtual |
Returns true if the specified backend can simulate.
|
virtual |
Called when a duplicate backend is discovered. Will queue duplicateSimulationBackendDiscovered.
|
virtual |
Returns the time multiplier of the scenario.
|
virtual |
Called by the DtVrfBackendInterceptor when backend status has changed in some way.
Will be called from the communication thread, so these methods handle passing this information into the main thread using the DtQueuedManager parent class.
|
virtual |
Called by the DtVrfBackendInterceptor when backend status has changed in some way.
Will be called from the communication thread, so these methods handle passing this information into the main thread using the DtQueuedManager parent class.
|
virtual |
Called by the DtVrfBackendInterceptor when backend status has changed in some way.
Will be called from the communication thread, so these methods handle passing this information into the main thread using the DtQueuedManager parent class.
|
virtual |
Called by the DtVrfBackendInterceptor when backend status has changed in some way.
Will be called from the communication thread, so these methods handle passing this information into the main thread using the DtQueuedManager parent class.
|
virtual |
|
inlinevirtual |
| void makVrf::DtVrfSimBackendManager::setSelectedBackend | ( | const DtSimulationAddress & | ) |
|
virtual |
|
virtual |
Clears the currently selected backend.
|
virtual |
Returns the maximum sim time of all known, loaded back-ends.
|
virtual |
Returns the run duration time. 0 means run until user pauses.
|
virtual |
Returns the current time of day (in seconds).
Based on time of day in time manager and current simulation time
|
virtual |
Returns the maximum sim start sim time of all known, loaded back-ends.
|
inline |
|
virtual |
Returns a map which is the total of all objects (key of kind/domain and count) of all backends.
|
virtual |
Returns a map of the objects counts of the particular back-end.
|
virtual |
Sets the back-end manager to watch for all back-ends closed. Once closed, will stop watching.
|
virtual |
If there are no back-ends loaded, signals so and then sets the mySignalWhenAllBackendsClosed flag to false.
|
virtual |
Sets the back-end manager to watch for all back-ends loaded.
If they are currently loaded will wait until they are closed then wait until they are all reloaded
|
virtual |
Will signal if all back-ends are loaded and the mySignalWhenAllBackendsClosed is false.
Sets mySignalWhenAllBackendsLoaded flag to false upon completion
|
virtual |
Sets the back-end manager to watch for all back-ends switching from saving to non-saving state.
|
virtual |
Will signal saved if the myBackendsWaitingForSave list is empty.
|
inline |
|
virtual |
|
inline |
|
virtual |
|
inline |
|
inline |
|
virtual |
|
virtual |
Called when session status has changed. Queues a function to deal with it.
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
|
inlinevirtual |
|
protectedvirtual |
Lock sim time to allow consistant access to simulation time to those that want it.
Reimplemented from makVrf::DtQueuedManager.
|
protectedvirtual |
Returns the maximum sim time of all known, loaded back-ends.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Called when a backend has finished saving or has been removed from the save list due to timeout.
|
protectedvirtual |
|
protectedvirtual |
Emits signal if something has changed about the session.
| boost::signal<void ()> makVrf::DtVrfSimBackendManager::signal_allBackendsClosed |
| boost::signal<void ()> makVrf::DtVrfSimBackendManager::signal_allBackendsLoaded |
| boost::signal<void ()> makVrf::DtVrfSimBackendManager::signal_allBackendsSaved |
| boost::signal<void (const DtVrfBackendState&)> makVrf::DtVrfSimBackendManager::signal_frameRatesUpdated |
| boost::signal<void (const DtVrfBackendState&)> makVrf::DtVrfSimBackendManager::signal_backendDiscovered |
| boost::signal<void (const DtVrfBackendState&)> makVrf::DtVrfSimBackendManager::signal_backendRemoved |
| boost::signal<void (const DtVrfBackendState&, int)> makVrf::DtVrfSimBackendManager::signal_backendUpdated |
| boost::signal<void (int)> makVrf::DtVrfSimBackendManager::signal_sessionUpdated |
| boost::signal<void (const DtVrfBackendState&)> makVrf::DtVrfSimBackendManager::signal_duplicateSimulationAddress |
| boost::signal<void (const DtSimulationAddress& old, const DtSimulationAddress& newaddr)> makVrf::DtVrfSimBackendManager::signal_selectedBackendChanged |
| boost::signal<void ()> makVrf::DtVrfSimBackendManager::signal_allBackendsAboutToBeRemoved |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |