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 DtOrbatManager;
11 class DtPhysicalWorld;
16 class DtScheduler;
21 class DtHostilityManager;
22 class DtSpawnSinkManager;
23 class DtSimManager;
29 class DtFireManager;
30 class DtString;
33 class DtResourceMonitor;
34 class DtSimObjectManager;
35 class DtVrfParameterDb;
37 class DtVrfCallbackQueue;
38 class DtVrfObjectMessage;
43 class DtCommModelManager;
52 class DtEnumDictionary;
57 class DtSimImguiThread;
59 
61 class DtSimulationAddress;
63 
64 namespace makVrfEvents
65 {
66  class DtEvent;
67  class DtEventManager;
68 }
69 
70 namespace makVrf
71 {
72  class DtStateDataManager;
73 }
74 
77 {
80 };
81 
97 {
98 public:
99  typedef void (*SimTickFunction)(void* userData);
101  virtual ~DtSimulationServices();
102 
103  void installDetonationService(DtDetonationServiceInterface* service);
105 
106  DtDetonationServiceInterface* detonationService();
107  const DtDetonationServiceInterface* detonationService() const;
109 
110  void installCreateObjectService(DtCreateObjectServiceInterface* service);
112  DtCreateObjectServiceInterface* createObjectService() const;
113 
114  void installScenarioService(DtScenarioServiceInterface* service);
115 
116  void installInfluenceDispatcherService(DtInfluenceDispatcherServiceInterface* service);
117 
119  DtScenarioServiceInterface* scenarioService() const;
120 
122 
123  DtScriptedTaskManager* scriptedTaskManager();
124  const DtScriptedTaskManager* scriptedTaskManager() const;
126 
128  DtManagedObjectListManager* objectListManager() const;
129 
133  DtSimInternalCommunicationManager* simInternalCommunicationManager() const;
134 
136 
137  DtOrbatManager* orbatManager();
138  const DtOrbatManager* orbatManager() const;
140 
142 
143  DtPhysicalWorld* physicalWorld();
144  const DtPhysicalWorld* physicalWorld() const;
146 
148 
149  DtVrfMessageInterface* messageInterface() const;
150  DtVrfTDLMessageInterface* tdlMessageInterface() const;
152 
155  const DtVrfParameterDb* parameterDatabase() const;
156 
158 
159  DtObjectGeometricModelsManager* objectModelsManager();
160  const DtObjectGeometricModelsManager* objectModelsManager() const;
162 
165 
166  const DtSimObjectManager* simObjectManager() const;
167  DtSimObjectManager* simObjectManager();
169 
171  DtDiGuyCharacterDataManager* diGuyCharacterManager() const;
172 
174  DtVrfObjectPlanAdministrator* planAdministrator() const;
175 
177  makVrfEvents::DtEventManager* eventManager() const;
179  void addEvent(const makVrfEvents::DtEvent&);
180 
182  DtInterfaceMessageExecutive* messageExecutive();
183 
185 
186  DtScenarioEventManager* scenarioEventManager();
187  const DtScenarioEventManager* scenarioEventManager() const;
189 
192 
193  makVrf::DtStateDataManager* stateDataManager();
194  const makVrf::DtStateDataManager* stateDataManager() const;
196 
198  DtScheduler* scheduler();
199 
201  const DtEnumDictionary* enumerationDictionary() const;
202 
205 
206  DtScriptedObjectsMovementManager* scriptedObjectsMovementManager();
207  const DtScriptedObjectsMovementManager* scriptedObjectsMovementManager() const;
209 
211 
212  DtVrfNavAreaManager* vrfNavAreaManager();
213  const DtVrfNavAreaManager* vrfNavAreaManager() const;
215 
217 
218  const DtHostilityManager* hostilityManager() const;
219  DtHostilityManager* hostilityManager();
221 
223 
224  DtSpawnSinkManager* spawnSinkManager();
225  const DtSpawnSinkManager* spawnSinkManager() const;
227 
229 
230  const DtSimCommandDistributor* simCommandDistributor() const;
231  DtSimCommandDistributor* simCommandDistributor();
233 
235 
236  const DtObjectConsoleManager* objectConsoleManager() const;
237  DtObjectConsoleManager* objectConsoleManager();
239 
241 
242  const DtEngagementZonesManager* engagementZonesManager() const;
243  DtEngagementZonesManager* engagementZonesManager();
245 
247  DtVrfCallbackQueue* parallelQueue();
248 
250 
251  DtFireManager* fireManager();
252  const DtFireManager* fireManager() const;
254 
256  DtString nextEventId(const DtString& entityId = DtString::nullString());
257 
259  DtVrfSimSettingsManager* vrfSimSettingsManager() const;
260 
262 
263  DtScenarioExtrasMgr* scenarioExtrasMgr();
264  const DtScenarioExtrasMgr* scenarioExtrasMgr() const;
266 
268 
269  DtIntelCollectionAreaManager* intelCollectionAreaManager();
270  const DtIntelCollectionAreaManager* intelCollectionAreaManager() const;
272 
274  DtResourceMonitor* resourceMonitor();
275 
277  bool rejectMessage(const DtVrfObjectMessage* obj);
278 
280 
281  DtEmbeddedEntityInfoManager* embeddedEntityInfoManager();
282  const DtEmbeddedEntityInfoManager* embeddedEntityInfoManager() const;
284 
286 
287  DtCommModelManager* commModelManager();
288  const DtCommModelManager* commModelManager() const;
290 
292 
293  DtCommunicationManager* communicationManager();
294  const DtCommunicationManager* communicationManager() const;
296 
298  const DtVrfSimOptionsInterface* simOptions() const;
299 
301  const DtHazardAreaManager* hazardAreaManager() const;
302 
304  DtStealthCommandsManager* stealthCommandsManager() const;
305 
307 
308  const DtSyncMatrixManager* syncMatrixManager() const;
309  DtSyncMatrixManager* syncMatrixManager();
311 
312  void installAisDataService(DtAisDataServiceInterface* service);
313 
315 
316  const DtAisDataServiceInterface* aisDataService() const;
317  DtAisDataServiceInterface* aisDataService();
319 
320  void installSimOperationsInProgressManager(DtSimOperationsInProgressInterface* service);
321 
323 
324  const DtSimOperationsInProgressInterface* simOperationsInProgress() const;
325  DtSimOperationsInProgressInterface* simOperationsInProgress();
327 
328  void installAdsbDataService(DtAdsbDataServiceInterface* service);
329 
331 
332  const DtAdsbDataServiceInterface* adsbDataService() const;
333  DtAdsbDataServiceInterface* adsbDataService();
335 
337 
338  const DtInfluenceDispatcherServiceInterface* influenceDispatcher() const;
339  DtInfluenceDispatcherServiceInterface* influenceDispatcher();
341 
344  DtVrfDatabaseLoggerInterface* databaseLogger();
345 
348  const DtSimulationAddress& messageAddress() const;
349 
351  int vrfSessionId() const;
352 
354  int vrfMessageVersionSupported() const;
355 
359 
360 
362  void runForDuration(double);
364  double runDurationTime() const;
366  void stopSimulationDurationTimer();
367 
369  double dateAndTimeOfDay() const;
370 
372  double simTime() const;
373 
375  double dT() const;
376 
378  double elapsedRealTime() const;
379 
381  double approximateElapsedRealTime() const;
382 
384  double absRealTime() const;
385 
387  bool isPaused() const;
388 
390 
391  double timeMultiplier() const;
392  double simTimeScale() const;
394 
396 
397  double exerciseTime() const;
398  double exerciseStartTime() const;
400 
402 
404  int scenarioRunId() const;
405 
406  const DtReaderWriter::SearchPaths& objectNavDataPaths() const;
407 
408 
410  bool runFullyThreaded() const;
411 
412  bool allowInfiniteObjects() const;
413 
414  void addMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
415  void removeMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
416  bool createAndDeliverMessage(
417  const DtSimulationAddress& recipient,
418  const DtSimInterfaceContent & content,
419  bool overrideTimestampOrder = true,
420  bool sendImmediately = false) const;
421 
422  bool canTransferObjects() const;
423 
424  void receiveMessage(const DtSimInterfaceMessage&);
425 
426  DtU32 scenarioCapabilities() const;
427  const DtSimulationAddress& simulationAddress() const;
428 
429  bool shouldBlockOnAsynchronousOperations() const;
430 
435 
436  virtual void addPostTickEntry(SimTickFunction tickFunction, void* userData) const;
437  virtual void removePostTickEntry(SimTickFunction tickFunction, void* userData) const;
438 
439  virtual void addTickEntry(SimTickFunction tickFunction, void* userData) const;
440  virtual void removeTickEntry(SimTickFunction tickFunction, void* userData) const;
442 
444  virtual void sendServerMessage(const DtString&, int severity = DtNlWarn, const DtSimulationAddress& addr = DtSimSendToAll);
445 
446  static DtSimulationServices* instance();
447 
448  const DtSimImguiThread* simImguiManager() const;
449  DtSimImguiThread* simImguiManager();
450 
451 protected:
459  DtSimOperationsInProgressInterface* mySimOperationsInProgressInterface = nullptr;
460 
461 private:
465  DtSimulationServices& operator=(const DtSimulationServices&);
466 
467 public:
471  VRF4API_METHOD const DtSimObjectManager* vrfObjectManager() const;
473  VRF4API_METHOD const DtSimulationServices* exerciseClock() const;
474 
476  VRF4API_METHOD const DtDetonationServiceInterface* detonationManager() const;
478  VRF4API_METHOD DtDetonationServiceInterface* detonationManager();
480 };
Struct used to pass initial argument when constructing DtSimulationServices.
Definition: simulationServices.h:76
DtSimManager * simManager
Eventually, this should be removed to make DtSimulationServices independent from DtSimManager.
Definition: simulationServices.h:79
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
The DtVrfTDLMessageInterface is a transporter for sending TDL messages as data interactions using a V...
Definition: vrfTDLMessageInterface.h:37
Instances of DtVrfParameterDb are the database of DtVrfObjectParameters objects used in the construct...
Definition: vrfParameterDb.h:41
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:29
DtInfluenceDispatcherServiceInterface * myInfluenceDispatcherServiceInterface
Definition: simulationServices.h:458
DtAdsbDataServiceInterface * myAdsbDataServiceInterface
Definition: simulationServices.h:456
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:23
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:112
DtAisDataServiceInterface * myAisDataServiceInterface
Definition: simulationServices.h:455
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:457
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
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:26
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
This class is the central access point for all current-frame state of all objects in the simulation i...
Definition: simObjectManager.h:32
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:137
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:453
#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:40
DtDetonationServiceInterface * myDetonationServiceInterface
Definition: simulationServices.h:452
DtScenarioServiceInterface * myScenarioServiceInterface
Definition: simulationServices.h:454
This class holds the state data that represents each simulation object in the system.
Definition: stateDataManager.h:73

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)