VR-Forces 5.0.2 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;
53 
55 class DtSimulationAddress;
57 
58 namespace makVrfEvents
59 {
60  class DtEvent;
61  class DtEventManager;
62 }
63 
64 namespace makVrf
65 {
66  class DtStateDataManager;
67 }
68 
71 {
74 };
75 
91 {
92 public:
93  typedef void (*SimTickFunction)(void* userData);
95  virtual ~DtSimulationServices();
96 
97  void installDetonationService(DtDetonationServiceInterface* service);
99 
100  DtDetonationServiceInterface* detonationService();
101  const DtDetonationServiceInterface* detonationService() const;
103 
104  void installCreateObjectService(DtCreateObjectServiceInterface* service);
106  DtCreateObjectServiceInterface* createObjectService() const;
107 
108  void installScenarioService(DtScenarioServiceInterface* service);
109 
110  void installInfluenceDispatcherService(DtInfluenceDispatcherServiceInterface* service);
111 
113  DtScenarioServiceInterface* scenarioService() const;
114 
116 
117  DtScriptedTaskManager* scriptedTaskManager();
118  const DtScriptedTaskManager* scriptedTaskManager() const;
120 
122  DtManagedObjectListManager* objectListManager() const;
123 
127  DtSimInternalCommunicationManager* simInternalCommunicationManager() const;
128 
130 
131  DtOrbatManager* orbatManager();
132  const DtOrbatManager* orbatManager() const;
134 
136 
137  DtPhysicalWorld* physicalWorld();
138  const DtPhysicalWorld* physicalWorld() const;
140 
142 
143  DtVrfMessageInterface* messageInterface() const;
144  DtVrfTDLMessageInterface* tdlMessageInterface() const;
146 
149  const DtVrfParameterDb* parameterDatabase() const;
150 
152 
153  DtObjectGeometricModelsManager* objectModelsManager();
154  const DtObjectGeometricModelsManager* objectModelsManager() const;
156 
159 
160  const DtSimObjectManager* simObjectManager() const;
161  DtSimObjectManager* simObjectManager();
163 
165  DtDiGuyCharacterDataManager* diGuyCharacterManager() const;
166 
168  DtVrfObjectPlanAdministrator* planAdministrator() const;
169 
171  makVrfEvents::DtEventManager* eventManager() const;
173  void addEvent(const makVrfEvents::DtEvent&);
174 
176  DtInterfaceMessageExecutive* messageExecutive();
177 
179 
180  DtScenarioEventManager* scenarioEventManager();
181  const DtScenarioEventManager* scenarioEventManager() const;
183 
186 
187  makVrf::DtStateDataManager* stateDataManager();
188  const makVrf::DtStateDataManager* stateDataManager() const;
190 
192  DtScheduler* scheduler();
193 
195  const DtEnumDictionary* enumerationDictionary() const;
196 
199 
200  DtScriptedObjectsMovementManager* scriptedObjectsMovementManager();
201  const DtScriptedObjectsMovementManager* scriptedObjectsMovementManager() const;
203 
205 
206  DtVrfNavAreaManager* vrfNavAreaManager();
207  const DtVrfNavAreaManager* vrfNavAreaManager() const;
209 
211 
212  const DtHostilityManager* hostilityManager() const;
213  DtHostilityManager* hostilityManager();
215 
217 
218  DtSpawnSinkManager* spawnSinkManager();
219  const DtSpawnSinkManager* spawnSinkManager() const;
221 
223 
224  const DtSimCommandDistributor* simCommandDistributor() const;
225  DtSimCommandDistributor* simCommandDistributor();
227 
229 
230  const DtObjectConsoleManager* objectConsoleManager() const;
231  DtObjectConsoleManager* objectConsoleManager();
233 
235 
236  const DtEngagementZonesManager* engagementZonesManager() const;
237  DtEngagementZonesManager* engagementZonesManager();
239 
241  DtVrfCallbackQueue* parallelQueue();
242 
244 
245  DtFireManager* fireManager();
246  const DtFireManager* fireManager() const;
248 
250  DtString nextEventId(const DtString& entityId = DtString::nullString());
251 
253  DtVrfSimSettingsManager* vrfSimSettingsManager() const;
254 
256 
257  DtScenarioExtrasMgr* scenarioExtrasMgr();
258  const DtScenarioExtrasMgr* scenarioExtrasMgr() const;
260 
262 
263  DtIntelCollectionAreaManager* intelCollectionAreaManager();
264  const DtIntelCollectionAreaManager* intelCollectionAreaManager() const;
266 
268  DtResourceMonitor* resourceMonitor();
269 
271  bool rejectMessage(const DtVrfObjectMessage* obj);
272 
274 
275  DtEmbeddedEntityInfoManager* embeddedEntityInfoManager();
276  const DtEmbeddedEntityInfoManager* embeddedEntityInfoManager() const;
278 
280 
281  DtCommModelManager* commModelManager();
282  const DtCommModelManager* commModelManager() const;
284 
286 
287  DtCommunicationManager* communicationManager();
288  const DtCommunicationManager* communicationManager() const;
290 
292  const DtVrfSimOptionsInterface* simOptions() const;
293 
295  const DtHazardAreaManager* hazardAreaManager() const;
296 
298  DtStealthCommandsManager* stealthCommandsManager() const;
299 
301 
302  const DtSyncMatrixManager* syncMatrixManager() const;
303  DtSyncMatrixManager* syncMatrixManager();
305 
307 
308  const DtInfluenceDispatcherServiceInterface* influenceDispatcher() const;
309  DtInfluenceDispatcherServiceInterface* influenceDispatcher();
311 
314  const DtSimulationAddress& messageAddress() const;
315 
317  int vrfSessionId() const;
318 
320  int vrfMessageVersionSupported() const;
321 
325 
326  double runDurationTime() const;
327  void runForDuration(double);
328  void stopSimulationDurationTimer();
330  double simTime() const;
332  double dT() const;
333  double elapsedRealTime() const;
334  double absRealTime() const;
335  double approximateElapsedRealTime() const;
337  bool isPaused() const;
339 
340  double timeMultiplier() const;
341  double simTimeScale() const;
343  double exerciseTime() const;
344  int scenarioRunId() const;
345  double exerciseStartTime() const;
346 
348 
350  bool runFullyThreaded() const;
351 
352  void addMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
353  void removeMessageCallback(int type, DtMessageCallbackFcn fcn, void* usrData);
354  bool createAndDeliverMessage(
355  const DtSimulationAddress& recipient,
356  const DtSimInterfaceContent & content,
357  bool overrideTimestampOrder = true) const;
358 
359  void receiveMessage(const DtSimInterfaceMessage&);
360 
361  int scenarioCapabilities() const;
362  const DtSimulationAddress& simulationAddress() const;
363 
368 
369  virtual void addPostTickEntry(SimTickFunction tickFunction, void* userData) const;
370  virtual void removePostTickEntry(SimTickFunction tickFunction, void* userData) const;
371 
372  virtual void addTickEntry(SimTickFunction tickFunction, void* userData) const;
373  virtual void removeTickEntry(SimTickFunction tickFunction, void* userData) const;
375 
376  static DtSimulationServices* instance();
377 
378 protected:
384 
385 private:
389  DtSimulationServices& operator=(const DtSimulationServices&);
390 
391 public:
395  VRF4API_METHOD const DtSimObjectManager* vrfObjectManager() const;
397  VRF4API_METHOD const DtSimulationServices* exerciseClock() const;
398 
400  VRF4API_METHOD const DtDetonationServiceInterface* detonationManager() const;
402  VRF4API_METHOD DtDetonationServiceInterface* detonationManager();
404 };
Struct used to pass initial argument when constructing DtSimulationServices.
Definition: simulationServices.h:70
DtSimManager * simManager
Eventually, this should be removed to make DtSimulationServices independent from DtSimManager.
Definition: simulationServices.h:73
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
DtInfluenceDispatcherServiceInterface * myInfluenceDispatcherServiceInterface
Definition: simulationServices.h:383
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:50
DtSimManager * mySimManager
Definition: simulationServices.h:382
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:25
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:90
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:380
#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:379
DtScenarioServiceInterface * myScenarioServiceInterface
Definition: simulationServices.h:381
This class holds the state data that represents each simulation object in the system.
Definition: stateDataManager.h:71

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)