VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simulationServices.h
Go to the documentation of this file.
1 
2 #pragma once
3 
6 #include <vrfutil/vrf4XAPI.h>
7 #include <vlpi/simulationAddress.h>
8 
9 class DtUUID;
11 class DtOrbatManager;
13 class DtPhysicalWorld;
17 class DtScheduler;
22 class DtHostilityManager;
23 class DtSpawnSinkManager;
24 class DtSimManager;
30 class DtFireManager;
31 class DtString;
34 class DtResourceMonitor;
35 class DtSimObjectManager;
36 class DtVrfParameterDb;
38 class DtVrfCallbackQueue;
39 class DtVrfObjectMessage;
44 class DtCommModelManager;
53 class DtEnumDictionary;
58 class DtSimImguiThread;
60 
62 class DtSimulationAddress;
64 
65 namespace makVrfEvents
66 {
67  class DtEvent;
68  class DtEventManager;
69 }
70 
71 namespace makVrf
72 {
73  class DtStateDataManager;
74 }
75 
78 {
81 };
82 
98 {
99 public:
100  typedef void (*SimTickFunction)(void* userData);
102  virtual ~DtSimulationServices();
103 
104  void installDetonationService(DtDetonationServiceInterface* service);
106 
107  DtDetonationServiceInterface* detonationService();
108  const DtDetonationServiceInterface* detonationService() const;
110 
111 
112  void installHitZoneDamageParamsService(DtHitZoneDamageParamsManagerInterface* service);
114 
115  DtHitZoneDamageParamsManagerInterface* hitZoneDamageParamsService();
116  const DtHitZoneDamageParamsManagerInterface* hitZoneDamageParamsService() const;
118 
119  void installCreateObjectService(DtCreateObjectServiceInterface* service);
121  DtCreateObjectServiceInterface* createObjectService() const;
122 
123  void installScenarioService(DtScenarioServiceInterface* service);
124 
125  void installInfluenceDispatcherService(DtInfluenceDispatcherServiceInterface* service);
126 
128  DtScenarioServiceInterface* scenarioService() const;
129 
131 
132  DtScriptedTaskManager* scriptedTaskManager();
133  const DtScriptedTaskManager* scriptedTaskManager() const;
135 
137  DtManagedObjectListManager* objectListManager() const;
138 
142  DtSimInternalCommunicationManager* simInternalCommunicationManager() const;
143 
145 
146  DtOrbatManager* orbatManager();
147  const DtOrbatManager* orbatManager() const;
149 
151 
152  DtPhysicalWorld* physicalWorld();
153  const DtPhysicalWorld* physicalWorld() const;
155 
157 
158  DtVrfMessageInterface* messageInterface() const;
160 
163  const DtVrfParameterDb* parameterDatabase() const;
164 
166 
167  DtObjectGeometricModelsManager* objectModelsManager();
168  const DtObjectGeometricModelsManager* objectModelsManager() const;
170 
173 
174  const DtSimObjectManager* simObjectManager() const;
175  DtSimObjectManager* simObjectManager();
177 
179  DtDiGuyCharacterDataManager* diGuyCharacterManager() const;
180 
182  DtVrfObjectPlanAdministrator* planAdministrator() const;
183 
185  makVrfEvents::DtEventManager* eventManager() const;
187  void addEvent(const makVrfEvents::DtEvent&);
188 
190  DtInterfaceMessageExecutive* messageExecutive();
191 
193 
194  DtScenarioEventManager* scenarioEventManager();
195  const DtScenarioEventManager* scenarioEventManager() const;
197 
200 
201  makVrf::DtStateDataManager* stateDataManager();
202  const makVrf::DtStateDataManager* stateDataManager() const;
204 
206  DtScheduler* scheduler();
207 
209  const DtEnumDictionary* enumerationDictionary() const;
210 
213 
214  DtScriptedObjectsMovementManager* scriptedObjectsMovementManager();
215  const DtScriptedObjectsMovementManager* scriptedObjectsMovementManager() const;
217 
219 
220  DtVrfNavAreaManager* vrfNavAreaManager();
221  const DtVrfNavAreaManager* vrfNavAreaManager() const;
223 
225 
226  const DtHostilityManager* hostilityManager() const;
227  DtHostilityManager* hostilityManager();
229 
231 
232  DtSpawnSinkManager* spawnSinkManager();
233  const DtSpawnSinkManager* spawnSinkManager() const;
235 
237 
238  const DtSimCommandDistributor* simCommandDistributor() const;
239  DtSimCommandDistributor* simCommandDistributor();
241 
243 
244  const DtObjectConsoleManager* objectConsoleManager() const;
245  DtObjectConsoleManager* objectConsoleManager();
247 
249 
250  const DtEngagementZonesManager* engagementZonesManager() const;
251  DtEngagementZonesManager* engagementZonesManager();
253 
255  DtVrfCallbackQueue* parallelQueue();
256 
258 
259  DtFireManager* fireManager();
260  const DtFireManager* fireManager() const;
262 
264  DtString nextEventId(const DtString& entityId = DtString::nullString());
265 
267  DtVrfSimSettingsManager* vrfSimSettingsManager() const;
268 
270 
271  DtScenarioExtrasMgr* scenarioExtrasMgr();
272  const DtScenarioExtrasMgr* scenarioExtrasMgr() const;
274 
276 
277  DtIntelCollectionAreaManager* intelCollectionAreaManager();
278  const DtIntelCollectionAreaManager* intelCollectionAreaManager() const;
280 
282  DtResourceMonitor* resourceMonitor();
283 
285  bool rejectMessage(const DtVrfObjectMessage* obj);
286 
288 
289  DtEmbeddedEntityInfoManager* embeddedEntityInfoManager();
290  const DtEmbeddedEntityInfoManager* embeddedEntityInfoManager() const;
292 
294 
295  DtCommModelManager* commModelManager();
296  const DtCommModelManager* commModelManager() const;
298 
300 
301  DtCommunicationManager* communicationManager();
302  const DtCommunicationManager* communicationManager() const;
304 
306  const DtVrfSimOptionsInterface* simOptions() const;
307 
309  const DtHazardAreaManager* hazardAreaManager() const;
310 
312  DtStealthCommandsManager* stealthCommandsManager() const;
313 
315 
316  const DtSyncMatrixManager* syncMatrixManager() const;
317  DtSyncMatrixManager* syncMatrixManager();
319 
320  void installAisDataService(DtAisDataServiceInterface* service);
321 
323 
324  const DtAisDataServiceInterface* aisDataService() const;
325  DtAisDataServiceInterface* aisDataService();
327 
328  void installSimOperationsInProgressManager(DtSimOperationsInProgressInterface* service);
329 
331 
332  const DtSimOperationsInProgressInterface* simOperationsInProgress() const;
333  DtSimOperationsInProgressInterface* simOperationsInProgress();
335 
336  void installAdsbDataService(DtAdsbDataServiceInterface* service);
337 
339 
340  const DtAdsbDataServiceInterface* adsbDataService() const;
341  DtAdsbDataServiceInterface* adsbDataService();
343 
345 
346  const DtInfluenceDispatcherServiceInterface* influenceDispatcher() const;
347  DtInfluenceDispatcherServiceInterface* influenceDispatcher();
349 
352  DtVrfDatabaseLoggerInterface* databaseLogger();
353 
356  const DtSimulationAddress& messageAddress() const;
357 
359  int vrfSessionId() const;
360 
362  int vrfMessageVersionSupported() const;
363 
367 
368 
370  void setRunUntilTime(double);
372  double runUntilTime() const;
374  void stopSimulationUntilTimer();
375 
377  double dateAndTimeOfDay() const;
378 
380  double simTime() const;
381 
383  double dT() const;
384 
386  double elapsedRealTime() const;
387 
389  double approximateElapsedRealTime() const;
390 
392  double absRealTime() const;
393 
395  bool isPaused() const;
396 
398 
399  double timeMultiplier() const;
400  double simTimeScale() const;
402 
404 
405  double exerciseTime() const;
406  double exerciseStartTime() const;
408 
410 
412  const DtUUID& scenarioRunId() const;
413 
414  const DtReaderWriter::SearchPaths& objectNavDataPaths() const;
415 
416 
418  bool runFullyThreaded() const;
419 
420  bool allowInfiniteObjects() const;
421 
422  void addMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
423  void removeMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
424  bool createAndDeliverMessage(
425  const DtSimulationAddress& recipient,
426  const DtSimInterfaceContent & content,
427  bool overrideTimestampOrder = true,
428  bool sendImmediately = false) const;
429 
430  bool canTransferObjects() const;
431 
432  void receiveMessage(const DtSimInterfaceMessage&);
433 
434  DtU32 scenarioCapabilities() const;
435  const DtSimulationAddress& simulationAddress() const;
436 
437  bool shouldBlockOnAsynchronousOperations() const;
438 
443 
444  virtual void addPostTickEntry(SimTickFunction tickFunction, void* userData) const;
445  virtual void removePostTickEntry(SimTickFunction tickFunction, void* userData) const;
446 
447  virtual void addTickEntry(SimTickFunction tickFunction, void* userData) const;
448  virtual void removeTickEntry(SimTickFunction tickFunction, void* userData) const;
450 
452  virtual void sendServerMessage(const DtString&, int severity = DtNlWarn, const DtSimulationAddress& addr = DtSimSendToAll);
453 
454  static DtSimulationServices* instance();
455 
456  const DtSimImguiThread* simImguiManager() const;
457  DtSimImguiThread* simImguiManager();
458 
459 protected:
468  DtSimOperationsInProgressInterface* mySimOperationsInProgressInterface = nullptr;
469 
470 private:
474  DtSimulationServices& operator=(const DtSimulationServices&);
475 
476 public:
480  VRF4API_METHOD const DtSimObjectManager* vrfObjectManager() const;
482  VRF4API_METHOD const DtSimulationServices* exerciseClock() const;
483 
485  VRF4API_METHOD const DtDetonationServiceInterface* detonationManager() const;
487  VRF4API_METHOD DtDetonationServiceInterface* detonationManager();
489 };
Struct used to pass initial argument when constructing DtSimulationServices.
Definition: simulationServices.h:77
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtSimManager * simManager
Eventually, this should be removed to make DtSimulationServices independent from DtSimManager.
Definition: simulationServices.h:80
This class will be responsible for handling requests to return resources for a particular entity (or ...
Definition: resourceMonitor.h:60
Instances of class DtScheduler maintain a list of DtTimer objects. It ticks all timer objects each ti...
Definition: scheduler.h:22
Instances of DtVrfParameterDb are the database of DtVrfObjectParameters objects used in the construct...
Definition: vrfParameterDb.h:41
hitZoneDamageParamsInterface.h
Definition: hitZoneDamageParamsManagerInterface.h:23
Service interface for creating and removing simulation objects as well as adjusting organization hier...
Definition: createObjectServiceInterface.h:36
Abstract interface class to the AIS data service. This service provides access to Automatic Identific...
Definition: aisDataServiceInterface.h:28
Manage scripted tasks (primarily Lua tasks) known by VR-Forces.
Definition: scriptedTaskManager.h:76
Holds all radio networks (comm models, implemented by DtCommModel) for the current exercise...
Definition: commModelManager.h:26
The DtEventManager handles the sending and receipt of system events (fire, detonate, command, etc). It provides a thread-safe way for the sim engine to send and receive such events, between both components within this sim engine and other remote applications.
Definition: eventManager.h:33
Options for the configuring the sim.
Definition: vrfSimOptionsInterface.h:20
Manages all of the spawn points, sink points, and spawn templates in the current scenario.
Definition: spawnSinkManager.h:24
The manager for SimInternal messages on a single simulation engine. This class manages the passing of...
Definition: simInternalCommunicationManager.h:28
The DtEngagementZonesManager will keep track of all the engagement zones and their state...
Definition: engagementZonesManager.h:20
Simple asynchronous callback queue.
Definition: vrfCallbackQueue.h:31
DtInfluenceDispatcherServiceInterface * myInfluenceDispatcherServiceInterface
Definition: simulationServices.h:467
DtAdsbDataServiceInterface * myAdsbDataServiceInterface
Definition: simulationServices.h:465
Abstract interface to keep track of sim operations that are going on that can be reported to front-en...
Definition: simOperationsInProgressInterface.h:15
DtSimInterfaceMessage is used to send a message to the front end or the back end. It derives from a s...
Definition: simInterfaceMessage.h:22
This class handles all requests as they pertain to viewing or modifying the ORBAT.
Definition: orbatManager.h:30
The DtHazardAreaManager will keep track of all hazard area objects and their state. Hazard areas are predefined as part of this class. Call the add/remove methods to add or remove areas to watch.
Definition: hazardAreaManager.h:22
Service interface for checking and altering scenario wide properties.
Definition: scenarioServiceInterface.h:30
The DtFireManager class exists to centralize the process of sending and receiving of fire interaction...
Definition: fireManager.h:43
The base class for database loggers. A database logger is responsible for logging database events int...
Definition: vrfDatabaseLoggerInterface.h:29
The synchronization matrix manager maintains the list of synchronization matrices. These are locally simulated objects that manage a list of phases where during each phase, scenario entities can be assigned with plans.
Definition: syncMatrixManager.h:40
This class keeps track of which forces are hostile to which other forces in the simulation. It maintains state for each force type, and which other forces types are considered hostile by that force. It can be queried for this data any time during the simulation. Supports force enumerations from 0 to 255.
Definition: hostilityManager.h:34
This class represents a collection of object consoles that will be used to manage streams for individ...
Definition: objectConsoleManager.h:31
Manages loading and destruction of the geometric models for objects. Will reference the object parame...
Definition: objectGeometricModelsManager.h:34
Abstract interface class to the ADSB data service. This service provides access to Automatic Dependen...
Definition: adsbDataServiceInterface.h:121
The scenario event manager will keep track of all scenario event objects and their state...
Definition: scenarioEventManager.h:36
The DtPhysicalWorld is the primary interface to and manager of all of the &quot;physical&quot; aspects of the s...
Definition: physicalWorld.h:114
DtAisDataServiceInterface * myAisDataServiceInterface
Definition: simulationServices.h:464
Definition: event.h:13
DtEmbeddedEntityInfoManager is the central point for information about embedded entities and their ca...
Definition: embeddedEntityInfoManager.h:36
The DtVrfNavAreaManager manages all of the nav areas currently created in the sim.
Definition: vrfNavAreaManager.h:65
The DtCommunicationManager class is a convenience class that will create both the DtNetworkInterfaceM...
Definition: communicationManager.h:54
DtSimManager * mySimManager
Definition: simulationServices.h:466
Contains data describing the available attributes and animations for each DI-Guy character type...
Definition: diGuyCharacterDataManager.h:33
Abstract interface class to the influence dispatcher service. This service provides DtInfluenceEvent ...
Definition: influenceDispatcherServiceInterface.h:26
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
DtVrfSimSettingsManager is a subclass of DtVrfSettingsManager. Please see the documentation on that c...
Definition: vrfSimSettingsManager.h:33
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
DtHitZoneDamageParamsManagerInterface * myHitZoneDamageParamsManagerServiceInterface
Definition: simulationServices.h:461
Contains the DtInterfaceMessageExecutive class declaration.
Definition: interfaceMessageExecutive.h:20
The top level IM GUI interface for a single thread of IM GUI rendering.
Definition: simImguiThread.h:20
The intel collection area manager will keep track of all Intel Collection area objects and their stat...
Definition: intelCollectionAreaManager.h:20
The DtVrfObjectPlanAdministrator performs plan-related tasks that must be done in a centralized manne...
Definition: vrfObjectPlanAdministrator.h:44
This class defines a manager whose job it is to read the extra scenario data in the ...
Definition: scenarioExtrasMgr.h:29
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
This class is the central access point for all current-frame state of all objects in the simulation i...
Definition: simObjectManager.h:31
Responsible for maintaining and executing stealth commands. The stealth commands are of the format (i...
Definition: stealthCommandsManager.h:35
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:139
Service which provides managed lists of simulation objects that are filtered based on a given predica...
Definition: managedObjectListManager.h:22
Definition: simInterfaceContent.h:45
DtCreateObjectServiceInterface * myCreateObjectServiceinterface
Definition: simulationServices.h:462
#define VRF4API_METHOD
Include this header file to allow for the definition/usage of the ability to mark something as deprec...
Definition: vrf4XAPI.h:23
Abstract interface class to the detonation service. This service provides information about detonatio...
Definition: detonationServiceInterface.h:34
Contains the DtSimCommandDistributor class declaration.
Definition: simCommandDistributor.h:24
#define DT_DLL_vrfcore
This file is used to determine how to build.
Definition: vrfcoreDefines.h:25
The scripted objects movement manager contains a list of all scripted movement objects that can be us...
Definition: scriptedObjectsMovementManager.h:22
DtCallbackList< DtSimMessage * >::DtCallbackFunctionType DtMessageCallbackFcn
Message callback function signature.
Definition: messageExecutive.h:21
Definition: vrfMessageInterface.h:39
DtDetonationServiceInterface * myDetonationServiceInterface
Definition: simulationServices.h:460
DtScenarioServiceInterface * myScenarioServiceInterface
Definition: simulationServices.h:463
This class holds the state data that represents each simulation object in the system.
Definition: stateDataManager.h:76

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)