VR-Forces 5.0.1 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 
8 class DtOrbatManager;
10 class DtPhysicalWorld;
15 class DtScheduler;
19 class DtHostilityManager;
20 class DtSpawnSinkManager;
21 class DtSimManager;
27 class DtFireManager;
28 class DtString;
31 class DtResourceMonitor;
32 class DtSimObjectManager;
33 class DtVrfParameterDb;
35 class DtVrfCallbackQueue;
36 class DtVrfObjectMessage;
41 class DtCommModelManager;
50 class DtEnumDictionary;
52 
54 class DtSimulationAddress;
56 
57 namespace makVrfEvents
58 {
59  class DtEvent;
60  class DtEventManager;
61 }
62 
63 namespace makVrf
64 {
65  class DtStateDataManager;
66 }
67 
70 {
73 };
74 
90 {
91 public:
92  typedef void (*SimTickFunction)(void* userData);
94  virtual ~DtSimulationServices();
95 
96  void installDetonationService(DtDetonationServiceInterface* service);
98 
99  DtDetonationServiceInterface* detonationService();
100  const DtDetonationServiceInterface* detonationService() const;
102 
103  void installCreateObjectService(DtCreateObjectServiceInterface* service);
105  DtCreateObjectServiceInterface* createObjectService() const;
106 
107  void installScenarioService(DtScenarioServiceInterface* service);
108 
110  DtScenarioServiceInterface* scenarioService() const;
111 
113 
114  DtScriptedTaskManager* scriptedTaskManager();
115  const DtScriptedTaskManager* scriptedTaskManager() const;
117 
119  DtManagedObjectListManager* objectListManager() const;
120 
124  DtSimInternalCommunicationManager* simInternalCommunicationManager() const;
125 
127 
128  DtOrbatManager* orbatManager();
129  const DtOrbatManager* orbatManager() const;
131 
133 
134  DtPhysicalWorld* physicalWorld();
135  const DtPhysicalWorld* physicalWorld() const;
137 
139 
140  DtVrfMessageInterface* messageInterface() const;
141  DtVrfTDLMessageInterface* tdlMessageInterface() const;
143 
146  const DtVrfParameterDb* parameterDatabase() const;
147 
149 
150  DtObjectGeometricModelsManager* objectModelsManager();
151  const DtObjectGeometricModelsManager* objectModelsManager() const;
153 
156 
157  const DtSimObjectManager* simObjectManager() const;
158  DtSimObjectManager* simObjectManager();
160 
162  DtDiGuyCharacterDataManager* diGuyCharacterManager() const;
163 
165  DtVrfObjectPlanAdministrator* planAdministrator() const;
166 
168  makVrfEvents::DtEventManager* eventManager() const;
170  void addEvent(const makVrfEvents::DtEvent&);
171 
173  DtInterfaceMessageExecutive* messageExecutive();
174 
176 
177  DtScenarioEventManager* scenarioEventManager();
178  const DtScenarioEventManager* scenarioEventManager() const;
180 
183 
184  makVrf::DtStateDataManager* stateDataManager();
185  const makVrf::DtStateDataManager* stateDataManager() const;
187 
189  DtScheduler* scheduler();
190 
192  const DtEnumDictionary* enumerationDictionary() const;
193 
196 
197  DtScriptedObjectsMovementManager* scriptedObjectsMovementManager();
198  const DtScriptedObjectsMovementManager* scriptedObjectsMovementManager() const;
200 
202 
203  DtVrfNavAreaManager* vrfNavAreaManager();
204  const DtVrfNavAreaManager* vrfNavAreaManager() const;
206 
208 
209  const DtHostilityManager* hostilityManager() const;
210  DtHostilityManager* hostilityManager();
212 
214 
215  DtSpawnSinkManager* spawnSinkManager();
216  const DtSpawnSinkManager* spawnSinkManager() const;
218 
220 
221  const DtSimCommandDistributor* simCommandDistributor() const;
222  DtSimCommandDistributor* simCommandDistributor();
224 
226 
227  const DtObjectConsoleManager* objectConsoleManager() const;
228  DtObjectConsoleManager* objectConsoleManager();
230 
232 
233  const DtEngagementZonesManager* engagementZonesManager() const;
234  DtEngagementZonesManager* engagementZonesManager();
236 
238  DtVrfCallbackQueue* parallelQueue();
239 
241 
242  DtFireManager* fireManager();
243  const DtFireManager* fireManager() const;
245 
247  DtString nextEventId();
248 
250  DtVrfSimSettingsManager* vrfSimSettingsManager() const;
251 
253 
254  DtScenarioExtrasMgr* scenarioExtrasMgr();
255  const DtScenarioExtrasMgr* scenarioExtrasMgr() const;
257 
259 
260  DtIntelCollectionAreaManager* intelCollectionAreaManager();
261  const DtIntelCollectionAreaManager* intelCollectionAreaManager() const;
263 
265  DtResourceMonitor* resourceMonitor();
266 
268  bool rejectMessage(const DtVrfObjectMessage* obj);
269 
271 
272  DtEmbeddedEntityInfoManager* embeddedEntityInfoManager();
273  const DtEmbeddedEntityInfoManager* embeddedEntityInfoManager() const;
275 
277 
278  DtCommModelManager* commModelManager();
279  const DtCommModelManager* commModelManager() const;
281 
283 
284  DtCommunicationManager* communicationManager();
285  const DtCommunicationManager* communicationManager() const;
287 
289  const DtVrfSimOptionsInterface* simOptions() const;
290 
292  const DtHazardAreaManager* hazardAreaManager() const;
293 
295  DtStealthCommandsManager* stealthCommandsManager() const;
296 
298 
299  const DtSyncMatrixManager* syncMatrixManager() const;
300  DtSyncMatrixManager* syncMatrixManager();
302 
305  const DtSimulationAddress& messageAddress() const;
306 
308  int vrfSessionId() const;
309 
311  int vrfMessageVersionSupported() const;
312 
316 
317  double runDurationTime() const;
318  void runForDuration(double);
319  void stopSimulationDurationTimer();
321  double simTime() const;
323  double dT() const;
324  double elapsedRealTime() const;
325  double absRealTime() const;
326  double approximateElapsedRealTime() const;
328  bool isPaused() const;
330 
331  double timeMultiplier() const;
332  double simTimeScale() const;
334  double exerciseTime() const;
335  int scenarioRunId() const;
336  double exerciseStartTime() const;
337 
339 
341  bool runFullyThreaded() const;
342 
343  void addMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
344  void removeMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
345  bool createAndDeliverMessage(
346  const DtSimulationAddress& recipient,
347  const DtSimInterfaceContent & content,
348  bool overrideTimestampOrder = true) const;
349 
350  void receiveMessage(const DtSimInterfaceMessage&);
351 
352  int scenarioCapabilities() const;
353  const DtSimulationAddress& simulationAddress() const;
354 
359 
360  virtual void addPostTickEntry(SimTickFunction tickFunction, void* userData) const;
361  virtual void removePostTickEntry(SimTickFunction tickFunction, void* userData) const;
362 
363  virtual void addTickEntry(SimTickFunction tickFunction, void* userData) const;
364  virtual void removeTickEntry(SimTickFunction tickFunction, void* userData) const;
366 
367  static DtSimulationServices* instance();
368 
369 protected:
374 
375 private:
379  DtSimulationServices& operator=(const DtSimulationServices&);
380 
381 public:
385  VRF4API_METHOD const DtSimObjectManager* vrfObjectManager() const;
387  VRF4API_METHOD const DtSimulationServices* exerciseClock() const;
388 
390  VRF4API_METHOD const DtDetonationServiceInterface* detonationManager() const;
392  VRF4API_METHOD DtDetonationServiceInterface* detonationManager();
394 };
Struct used to pass initial argument when constructing DtSimulationServices.
Definition: simulationServices.h:69
DtSimManager * simManager
Eventually, this should be removed to make DtSimulationServices independent from DtSimManager.
Definition: simulationServices.h:72
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:38
Service interface for creating and removing simulation objects as well as adjusting orgainization hie...
Definition: createObjectServiceInterface.h:35
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:23
The manager for SimInternal messages on a single simulation engine. This class manages the passing of...
Definition: simInternalCommunicationManager.h:27
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
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:28
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:21
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:29
Manages loading and destruction of the geometric models for objects. Will reference the object parame...
Definition: objectGeometricModelsManager.h:29
The scenario event manager will keep track of all scenario event objects and their state...
Definition: scenarioEventManager.h:33
The DtPhysicalWorld is the primary interface to and manager of all of the &quot;physical&quot; aspects of the s...
Definition: physicalWorld.h:102
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:50
The DtCommunicationManager class is a convenience class that will create both the DtNetworkInterfaceM...
Definition: communicationManager.h:51
DtSimManager * mySimManager
Definition: simulationServices.h:373
Contains data describing the available attributes and animations for each DI-Guy character type...
Definition: diGuyCharacterDataManager.h:33
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:89
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:121
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:371
#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:370
DtScenarioServiceInterface * myScenarioServiceInterface
Definition: simulationServices.h:372
This class holds the state data that represents each simulation object in the system.
Definition: stateDataManager.h:71

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)