8 #include <vlpi/simulationAddress.h>
9 #include <vlutil/vlTime.h>
10 #include <boost/signals2.hpp>
11 #include <boost/function.hpp>
12 #include <tbb/atomic.h>
14 namespace makVrfEvents
22 class DtStateDataManager;
38 double preAdvanceFrameTime;
72 return myNetworkInterfaceManager;
75 virtual void setSimulationAddress(
const DtSimulationAddress&);
76 const DtSimulationAddress& simulationAddress()
const;
77 const DtSimulationAddress&
applicationId()
const {
return simulationAddress(); };
83 return myEventManager;
89 return myParameterDatabase;
93 virtual void setNumCallbackThreads(
unsigned);
96 virtual bool typeIsPublishable(
const DtEntityType&)
const;
103 virtual double beginFrame(
double& dt);
121 virtual void removeManager(
const char*);
133 virtual void setUsePerfCounter(
bool);
140 virtual void setSessionId(
int);
148 virtual double elapsedRealTime()
const;
154 virtual void pause();
157 virtual void rewindScenario();
160 virtual void resetSimulation();
163 virtual void setSimTime(
double);
166 virtual void setFrameRateMode(
const DtString&
mode,
double deltaTime,
bool manageTime =
false);
169 virtual void setTimeMultiplier(
double);
172 virtual void setExerciseStartTime(
double);
174 virtual bool isPaused()
const;
175 virtual double approximateElapsedRealTime()
const;
176 virtual double absRealTime()
const;
177 virtual double timeMultiplier()
const;
178 virtual double exerciseStartTime()
const;
179 virtual bool isRunToCompleteFrameMode()
const;
180 virtual void setSimTimeProviderFunction(SimTimeProvideFcn f);
191 return myExerciseClock;
200 virtual bool isConnectionless()
const;
203 virtual void removeAndDeleteAll();
207 virtual void reserve(
unsigned int);
213 virtual bool selfReflecting()
const;
217 virtual void setSelfReflecting(
bool);
219 virtual void beginBulkCreate();
220 virtual void endBulkCreate();
223 return myStateDataManager;
230 virtual bool rediscoverObjects();
static DtCommunicationManagerCreatorFcn theCommunicationManagerCreatorFcn
Definition: communicationManager.h:263
Instances of DtVrfParameterDb are the database of DtVrfObjectParameters objects used in the construct...
Definition: vrfParameterDb.h:38
boost::function< double(double &dt)> SimTimeProvideFcn
Definition: communicationManager.h:53
Definition: scenario.h:52
int sessionId() const
Definition: communicationManager.h:141
const DtSimulationAddress & applicationId() const
Definition: communicationManager.h:77
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
boost::signals2::signal< void(double simTime, double dT)> signal_beginFrame
Signal sent right before beginFrame is returned.
Definition: communicationManager.h:244
bool myOwnsStateDataManager
Definition: communicationManager.h:268
DtExerciseClock * clock() const
Definition: communicationManager.h:189
double mySimTime
Definition: communicationManager.h:270
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
boost::signals2::signal< void()> signal_aboutToAdvanceFrame
Sent before the state data manager advances its frame.
Definition: communicationManager.h:234
double myLastDt
Definition: communicationManager.h:271
DtCommunicationManager *(* DtCommunicationManagerCreatorFcn)(const DtSimulationAddress &, makVrf::DtStateDataManager *, int)
Definition: communicationManager.h:33
boost::signals2::signal< void(DtNetworkManagerInterface *)> signal_interfaceAdded
Signal sent when an interface is added.
Definition: communicationManager.h:247
makVrfEvents::DtEventManager * myEventManager
Definition: communicationManager.h:262
DtNetworkManagerInterface is the base class which all network interfaces must be derived from...
Definition: networkManagerInterface.h:40
Definition: coordSystem.h:54
DtVrfParameterDb * myParameterDatabase
Definition: communicationManager.h:274
boost::signals2::signal< void()> signal_frameAdvanced
Can be called by outside holders of this class if the frame cannot be advanced, however, other classes connect to this to be signaled for a post communication advance event. Will also be called from advanceFrame.
Definition: communicationManager.h:241
bool inFame() const
Definition: communicationManager.h:194
The DtCommunicationManager class is a convenience class that will create both the DtNetworkInterfaceM...
Definition: communicationManager.h:50
DtVrfParameterDb * parameterDatabase() const
Definition: communicationManager.h:87
DtSimulationAddress mySimulationAddress
Definition: communicationManager.h:264
boost::signals2::signal< void(DtNetworkManagerInterface *)> signal_interfaceRemoved
Signal sent when an interface is removed.
Definition: communicationManager.h:250
makVrf::DtStateDataManager * stateDataManager() const
Definition: communicationManager.h:221
Definition: asyncJobServer.h:39
makVrfEvents::DtEventManager * eventManager()
Definition: communicationManager.h:81
int mySessionId
Definition: communicationManager.h:269
tbb::atomic< int > myNextEventNumber
Definition: communicationManager.h:275
virtual double simTime() const
Definition: communicationManager.h:182
The DtNetworkInterfaceManager manages all network interfaces utilized by the sim engine. Often there is only one, but it is possible for there to be multiple. Each network interface is an instance of a subclass of DtNetworkManagerInterface. As state data is created or removed, the DtNetworkInterfaceManager will notify each of its network interfaces, so that they may create object network interfaces to output required state data to the network.
Definition: networkInterfaceManager.h:44
DtNetworkInterfaceManager * myNetworkInterfaceManager
Definition: communicationManager.h:260
const char int mode
Definition: ioapi.h:38
SimTimeProvideFcn mySimTimeProviderFunction
Definition: communicationManager.h:272
DtNetworkInterfaceManager * networkInterfaceManager()
Definition: communicationManager.h:70
int myInFrame
Definition: communicationManager.h:273
boost::signals2::signal< void(makVrf::DtStateDataManager *)> signal_stateDataManagerChanged
Sent if a network manager is assigned with a different state data manager in it.
Definition: communicationManager.h:237
#define DT_DLL_vrfMsgTransport
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfCommunicationManagerDefines.h:26
makVrf::DtStateDataManager * myStateDataManager
Definition: communicationManager.h:261
Description: The Exercise Clock keeps track of current simulated time. When 'ticked', it advances simulation time based on elapsed real time since the last time it was ticked and a time-multiplier that allows the exercise clock to run faster or slower than real-time. The exercise clock also supports a pause/resume capability.
Definition: exerciseClock.h:26
This class holds the state data that represents each simulation object in the system.
Definition: stateDataManager.h:71
DtExerciseClock * myExerciseClock
Backup for simulation time (absRealTime) if no network manager.
Definition: communicationManager.h:267