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 
59 class DtSimulationAddress;
61 
62 namespace makVrfEvents
63 {
64  class DtEvent;
65  class DtEventManager;
66 }
67 
68 namespace makVrf
69 {
70  class DtStateDataManager;
71 }
72 
75 {
78 };
79 
95 {
96 public:
97  typedef void (*SimTickFunction)(void* userData);
99  virtual ~DtSimulationServices();
100 
101  void installDetonationService(DtDetonationServiceInterface* service);
103 
104  DtDetonationServiceInterface* detonationService();
105  const DtDetonationServiceInterface* detonationService() const;
107 
108  void installCreateObjectService(DtCreateObjectServiceInterface* service);
110  DtCreateObjectServiceInterface* createObjectService() const;
111 
112  void installScenarioService(DtScenarioServiceInterface* service);
113 
114  void installInfluenceDispatcherService(DtInfluenceDispatcherServiceInterface* service);
115 
117  DtScenarioServiceInterface* scenarioService() const;
118 
120 
121  DtScriptedTaskManager* scriptedTaskManager();
122  const DtScriptedTaskManager* scriptedTaskManager() const;
124 
126  DtManagedObjectListManager* objectListManager() const;
127 
131  DtSimInternalCommunicationManager* simInternalCommunicationManager() const;
132 
134 
135  DtOrbatManager* orbatManager();
136  const DtOrbatManager* orbatManager() const;
138 
140 
141  DtPhysicalWorld* physicalWorld();
142  const DtPhysicalWorld* physicalWorld() const;
144 
146 
147  DtVrfMessageInterface* messageInterface() const;
148  DtVrfTDLMessageInterface* tdlMessageInterface() const;
150 
153  const DtVrfParameterDb* parameterDatabase() const;
154 
156 
157  DtObjectGeometricModelsManager* objectModelsManager();
158  const DtObjectGeometricModelsManager* objectModelsManager() const;
160 
163 
164  const DtSimObjectManager* simObjectManager() const;
165  DtSimObjectManager* simObjectManager();
167 
169  DtDiGuyCharacterDataManager* diGuyCharacterManager() const;
170 
172  DtVrfObjectPlanAdministrator* planAdministrator() const;
173 
175  makVrfEvents::DtEventManager* eventManager() const;
177  void addEvent(const makVrfEvents::DtEvent&);
178 
180  DtInterfaceMessageExecutive* messageExecutive();
181 
183 
184  DtScenarioEventManager* scenarioEventManager();
185  const DtScenarioEventManager* scenarioEventManager() const;
187 
190 
191  makVrf::DtStateDataManager* stateDataManager();
192  const makVrf::DtStateDataManager* stateDataManager() const;
194 
196  DtScheduler* scheduler();
197 
199  const DtEnumDictionary* enumerationDictionary() const;
200 
203 
204  DtScriptedObjectsMovementManager* scriptedObjectsMovementManager();
205  const DtScriptedObjectsMovementManager* scriptedObjectsMovementManager() const;
207 
209 
210  DtVrfNavAreaManager* vrfNavAreaManager();
211  const DtVrfNavAreaManager* vrfNavAreaManager() const;
213 
215 
216  const DtHostilityManager* hostilityManager() const;
217  DtHostilityManager* hostilityManager();
219 
221 
222  DtSpawnSinkManager* spawnSinkManager();
223  const DtSpawnSinkManager* spawnSinkManager() const;
225 
227 
228  const DtSimCommandDistributor* simCommandDistributor() const;
229  DtSimCommandDistributor* simCommandDistributor();
231 
233 
234  const DtObjectConsoleManager* objectConsoleManager() const;
235  DtObjectConsoleManager* objectConsoleManager();
237 
239 
240  const DtEngagementZonesManager* engagementZonesManager() const;
241  DtEngagementZonesManager* engagementZonesManager();
243 
245  DtVrfCallbackQueue* parallelQueue();
246 
248 
249  DtFireManager* fireManager();
250  const DtFireManager* fireManager() const;
252 
254  DtString nextEventId(const DtString& entityId = DtString::nullString());
255 
257  DtVrfSimSettingsManager* vrfSimSettingsManager() const;
258 
260 
261  DtScenarioExtrasMgr* scenarioExtrasMgr();
262  const DtScenarioExtrasMgr* scenarioExtrasMgr() const;
264 
266 
267  DtIntelCollectionAreaManager* intelCollectionAreaManager();
268  const DtIntelCollectionAreaManager* intelCollectionAreaManager() const;
270 
272  DtResourceMonitor* resourceMonitor();
273 
275  bool rejectMessage(const DtVrfObjectMessage* obj);
276 
278 
279  DtEmbeddedEntityInfoManager* embeddedEntityInfoManager();
280  const DtEmbeddedEntityInfoManager* embeddedEntityInfoManager() const;
282 
284 
285  DtCommModelManager* commModelManager();
286  const DtCommModelManager* commModelManager() const;
288 
290 
291  DtCommunicationManager* communicationManager();
292  const DtCommunicationManager* communicationManager() const;
294 
296  const DtVrfSimOptionsInterface* simOptions() const;
297 
299  const DtHazardAreaManager* hazardAreaManager() const;
300 
302  DtStealthCommandsManager* stealthCommandsManager() const;
303 
305 
306  const DtSyncMatrixManager* syncMatrixManager() const;
307  DtSyncMatrixManager* syncMatrixManager();
309 
310  void installAisDataService(DtAisDataServiceInterface* service);
311 
313 
314  const DtAisDataServiceInterface* aisDataService() const;
315  DtAisDataServiceInterface* aisDataService();
317 
318  void installSimOperationsInProgressManager(DtSimOperationsInProgressInterface* service);
319 
321 
322  const DtSimOperationsInProgressInterface* simOperationsInProgress() const;
323  DtSimOperationsInProgressInterface* simOperationsInProgress();
325 
326  void installAdsbDataService(DtAdsbDataServiceInterface* service);
327 
329 
330  const DtAdsbDataServiceInterface* adsbDataService() const;
331  DtAdsbDataServiceInterface* adsbDataService();
333 
335 
336  const DtInfluenceDispatcherServiceInterface* influenceDispatcher() const;
337  DtInfluenceDispatcherServiceInterface* influenceDispatcher();
339 
342  const DtSimulationAddress& messageAddress() const;
343 
345  int vrfSessionId() const;
346 
348  int vrfMessageVersionSupported() const;
349 
353 
354  double runDurationTime() const;
355  void runForDuration(double);
356  void stopSimulationDurationTimer();
358  double simTime() const;
360  double dT() const;
361  double elapsedRealTime() const;
362  double absRealTime() const;
363  double approximateElapsedRealTime() const;
365  bool isPaused() const;
367 
368  double timeMultiplier() const;
369  double simTimeScale() const;
371  double exerciseTime() const;
372  int scenarioRunId() const;
373  double exerciseStartTime() const;
374 
376 
378  bool runFullyThreaded() const;
379 
380  void addMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
381  void removeMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
382  bool createAndDeliverMessage(
383  const DtSimulationAddress& recipient,
384  const DtSimInterfaceContent & content,
385  bool overrideTimestampOrder = true,
386  bool sendImmediately = false) const;
387 
388  void receiveMessage(const DtSimInterfaceMessage&);
389 
390  DtU32 scenarioCapabilities() const;
391  const DtSimulationAddress& simulationAddress() const;
392 
397 
398  virtual void addPostTickEntry(SimTickFunction tickFunction, void* userData) const;
399  virtual void removePostTickEntry(SimTickFunction tickFunction, void* userData) const;
400 
401  virtual void addTickEntry(SimTickFunction tickFunction, void* userData) const;
402  virtual void removeTickEntry(SimTickFunction tickFunction, void* userData) const;
404 
406  virtual void sendServerMessage(const DtString&, int severity = DtNlWarn, const DtSimulationAddress& addr = DtSimSendToAll);
407 
408  static DtSimulationServices* instance();
409 
410 protected:
418  DtSimOperationsInProgressInterface* mySimOperationsInProgressInterface = nullptr;
419 
420 private:
424  DtSimulationServices& operator=(const DtSimulationServices&);
425 
426 public:
430  VRF4API_METHOD const DtSimObjectManager* vrfObjectManager() const;
432  VRF4API_METHOD const DtSimulationServices* exerciseClock() const;
433 
435  VRF4API_METHOD const DtDetonationServiceInterface* detonationManager() const;
437  VRF4API_METHOD DtDetonationServiceInterface* detonationManager();
439 };
Struct used to pass initial argument when constructing DtSimulationServices.
Definition: simulationServices.h:74
DtSimManager * simManager
Eventually, this should be removed to make DtSimulationServices independent from DtSimManager.
Definition: simulationServices.h:77
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:417
DtAdsbDataServiceInterface * myAdsbDataServiceInterface
Definition: simulationServices.h:415
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 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:414
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:416
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:94
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:123
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:412
#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:411
DtScenarioServiceInterface * myScenarioServiceInterface
Definition: simulationServices.h:413
This class holds the state data that represents each simulation object in the system.
Definition: stateDataManager.h:73

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)