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;
58 
60 class DtSimulationAddress;
62 
63 namespace makVrfEvents
64 {
65  class DtEvent;
66  class DtEventManager;
67 }
68 
69 namespace makVrf
70 {
71  class DtStateDataManager;
72 }
73 
76 {
79 };
80 
96 {
97 public:
98  typedef void (*SimTickFunction)(void* userData);
100  virtual ~DtSimulationServices();
101 
102  void installDetonationService(DtDetonationServiceInterface* service);
104 
105  DtDetonationServiceInterface* detonationService();
106  const DtDetonationServiceInterface* detonationService() const;
108 
109  void installCreateObjectService(DtCreateObjectServiceInterface* service);
111  DtCreateObjectServiceInterface* createObjectService() const;
112 
113  void installScenarioService(DtScenarioServiceInterface* service);
114 
115  void installInfluenceDispatcherService(DtInfluenceDispatcherServiceInterface* service);
116 
118  DtScenarioServiceInterface* scenarioService() const;
119 
121 
122  DtScriptedTaskManager* scriptedTaskManager();
123  const DtScriptedTaskManager* scriptedTaskManager() const;
125 
127  DtManagedObjectListManager* objectListManager() const;
128 
132  DtSimInternalCommunicationManager* simInternalCommunicationManager() const;
133 
135 
136  DtOrbatManager* orbatManager();
137  const DtOrbatManager* orbatManager() const;
139 
141 
142  DtPhysicalWorld* physicalWorld();
143  const DtPhysicalWorld* physicalWorld() const;
145 
147 
148  DtVrfMessageInterface* messageInterface() const;
149  DtVrfTDLMessageInterface* tdlMessageInterface() const;
151 
154  const DtVrfParameterDb* parameterDatabase() const;
155 
157 
158  DtObjectGeometricModelsManager* objectModelsManager();
159  const DtObjectGeometricModelsManager* objectModelsManager() const;
161 
164 
165  const DtSimObjectManager* simObjectManager() const;
166  DtSimObjectManager* simObjectManager();
168 
170  DtDiGuyCharacterDataManager* diGuyCharacterManager() const;
171 
173  DtVrfObjectPlanAdministrator* planAdministrator() const;
174 
176  makVrfEvents::DtEventManager* eventManager() const;
178  void addEvent(const makVrfEvents::DtEvent&);
179 
181  DtInterfaceMessageExecutive* messageExecutive();
182 
184 
185  DtScenarioEventManager* scenarioEventManager();
186  const DtScenarioEventManager* scenarioEventManager() const;
188 
191 
192  makVrf::DtStateDataManager* stateDataManager();
193  const makVrf::DtStateDataManager* stateDataManager() const;
195 
197  DtScheduler* scheduler();
198 
200  const DtEnumDictionary* enumerationDictionary() const;
201 
204 
205  DtScriptedObjectsMovementManager* scriptedObjectsMovementManager();
206  const DtScriptedObjectsMovementManager* scriptedObjectsMovementManager() const;
208 
210 
211  DtVrfNavAreaManager* vrfNavAreaManager();
212  const DtVrfNavAreaManager* vrfNavAreaManager() const;
214 
216 
217  const DtHostilityManager* hostilityManager() const;
218  DtHostilityManager* hostilityManager();
220 
222 
223  DtSpawnSinkManager* spawnSinkManager();
224  const DtSpawnSinkManager* spawnSinkManager() const;
226 
228 
229  const DtSimCommandDistributor* simCommandDistributor() const;
230  DtSimCommandDistributor* simCommandDistributor();
232 
234 
235  const DtObjectConsoleManager* objectConsoleManager() const;
236  DtObjectConsoleManager* objectConsoleManager();
238 
240 
241  const DtEngagementZonesManager* engagementZonesManager() const;
242  DtEngagementZonesManager* engagementZonesManager();
244 
246  DtVrfCallbackQueue* parallelQueue();
247 
249 
250  DtFireManager* fireManager();
251  const DtFireManager* fireManager() const;
253 
255  DtString nextEventId(const DtString& entityId = DtString::nullString());
256 
258  DtVrfSimSettingsManager* vrfSimSettingsManager() const;
259 
261 
262  DtScenarioExtrasMgr* scenarioExtrasMgr();
263  const DtScenarioExtrasMgr* scenarioExtrasMgr() const;
265 
267 
268  DtIntelCollectionAreaManager* intelCollectionAreaManager();
269  const DtIntelCollectionAreaManager* intelCollectionAreaManager() const;
271 
273  DtResourceMonitor* resourceMonitor();
274 
276  bool rejectMessage(const DtVrfObjectMessage* obj);
277 
279 
280  DtEmbeddedEntityInfoManager* embeddedEntityInfoManager();
281  const DtEmbeddedEntityInfoManager* embeddedEntityInfoManager() const;
283 
285 
286  DtCommModelManager* commModelManager();
287  const DtCommModelManager* commModelManager() const;
289 
291 
292  DtCommunicationManager* communicationManager();
293  const DtCommunicationManager* communicationManager() const;
295 
297  const DtVrfSimOptionsInterface* simOptions() const;
298 
300  const DtHazardAreaManager* hazardAreaManager() const;
301 
303  DtStealthCommandsManager* stealthCommandsManager() const;
304 
306 
307  const DtSyncMatrixManager* syncMatrixManager() const;
308  DtSyncMatrixManager* syncMatrixManager();
310 
311  void installAisDataService(DtAisDataServiceInterface* service);
312 
314 
315  const DtAisDataServiceInterface* aisDataService() const;
316  DtAisDataServiceInterface* aisDataService();
318 
319  void installSimOperationsInProgressManager(DtSimOperationsInProgressInterface* service);
320 
322 
323  const DtSimOperationsInProgressInterface* simOperationsInProgress() const;
324  DtSimOperationsInProgressInterface* simOperationsInProgress();
326 
327  void installAdsbDataService(DtAdsbDataServiceInterface* service);
328 
330 
331  const DtAdsbDataServiceInterface* adsbDataService() const;
332  DtAdsbDataServiceInterface* adsbDataService();
334 
336 
337  const DtInfluenceDispatcherServiceInterface* influenceDispatcher() const;
338  DtInfluenceDispatcherServiceInterface* influenceDispatcher();
340 
343  DtVrfDatabaseLoggerInterface* databaseLogger();
344 
347  const DtSimulationAddress& messageAddress() const;
348 
350  int vrfSessionId() const;
351 
353  int vrfMessageVersionSupported() const;
354 
358 
359  double runDurationTime() const;
360  void runForDuration(double);
361  void stopSimulationDurationTimer();
363  double simTime() const;
365  double dT() const;
366  double elapsedRealTime() const;
367  double absRealTime() const;
368  double approximateElapsedRealTime() const;
370  bool isPaused() const;
372 
373  double timeMultiplier() const;
374  double simTimeScale() const;
376  double exerciseTime() const;
377  int scenarioRunId() const;
378  double exerciseStartTime() const;
379 
381 
383  bool runFullyThreaded() const;
384 
385  void addMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
386  void removeMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
387  bool createAndDeliverMessage(
388  const DtSimulationAddress& recipient,
389  const DtSimInterfaceContent & content,
390  bool overrideTimestampOrder = true,
391  bool sendImmediately = false) const;
392 
393  void receiveMessage(const DtSimInterfaceMessage&);
394 
395  DtU32 scenarioCapabilities() const;
396  const DtSimulationAddress& simulationAddress() const;
397 
402 
403  virtual void addPostTickEntry(SimTickFunction tickFunction, void* userData) const;
404  virtual void removePostTickEntry(SimTickFunction tickFunction, void* userData) const;
405 
406  virtual void addTickEntry(SimTickFunction tickFunction, void* userData) const;
407  virtual void removeTickEntry(SimTickFunction tickFunction, void* userData) const;
409 
411  virtual void sendServerMessage(const DtString&, int severity = DtNlWarn, const DtSimulationAddress& addr = DtSimSendToAll);
412 
413  static DtSimulationServices* instance();
414 
415 protected:
423  DtSimOperationsInProgressInterface* mySimOperationsInProgressInterface = nullptr;
424 
425 private:
429  DtSimulationServices& operator=(const DtSimulationServices&);
430 
431 public:
435  VRF4API_METHOD const DtSimObjectManager* vrfObjectManager() const;
437  VRF4API_METHOD const DtSimulationServices* exerciseClock() const;
438 
440  VRF4API_METHOD const DtDetonationServiceInterface* detonationManager() const;
442  VRF4API_METHOD DtDetonationServiceInterface* detonationManager();
444 };
Struct used to pass initial argument when constructing DtSimulationServices.
Definition: simulationServices.h:75
DtSimManager * simManager
Eventually, this should be removed to make DtSimulationServices independent from DtSimManager.
Definition: simulationServices.h:78
This class will be responsible for handling requests to return resources for a particular entity (or ...
Definition: resourceMonitor.h:54
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:40
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
Maintains a list of enumerations read in from files. The dictionary supports two different types of e...
Definition: enumDictionary.h:98
The DtEngagementZonesManager will keep track of all the engagement zones and their state...
Definition: engagementZonesManager.h:20
Simple asynchronous callback queue.
Definition: vrfCallbackQueue.h:32
DtInfluenceDispatcherServiceInterface * myInfluenceDispatcherServiceInterface
Definition: simulationServices.h:422
DtAdsbDataServiceInterface * myAdsbDataServiceInterface
Definition: simulationServices.h:420
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:29
The DtFireManager class exists to centralize the process of sending and receiving of fire interaction...
Definition: fireManager.h:42
The base class for database loggers. A database logger is responsible for logging database events int...
Definition: vrfDatabaseLoggerInterface.h:27
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:30
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:102
DtAisDataServiceInterface * myAisDataServiceInterface
Definition: simulationServices.h:419
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:52
The DtCommunicationManager class is a convenience class that will create both the DtNetworkInterfaceM...
Definition: communicationManager.h:51
DtSimManager * mySimManager
Definition: simulationServices.h:421
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
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 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:95
This class is the central access point for all current-frame state of all objects in the simulation i...
Definition: simObjectManager.h:42
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:124
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:417
#define VRF4API_METHOD
Include this header file to allow for the definition/usage of the ability to mark something as deprec...
Definition: vrf4XAPI.h:22
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:416
DtScenarioServiceInterface * myScenarioServiceInterface
Definition: simulationServices.h:418
This class holds the state data that represents each simulation object in the system.
Definition: stateDataManager.h:73

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)