VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
networkManagerInterface.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
10 #include <matrix/vlVector.h>
11 
12 #include <memory>
13 
14 class DtOutputStream;
15 class DtEntityType;
18 class DtVrfParameterDb;
19 class DtScenario;
20 class Coordinate_System;
21 class DtObjectType;
23 
24 namespace makVrf
25 {
26  class DtStateData;
27 }
28 
29 namespace makVrfEvents
30 {
31  class DtEvent;
32  class DtEventManager;
33 }
34 
35 class DtUUID;
36 
42 {
43 public:
44 
48  {
49  DoNotContinue = 0,
50  Continue = 0x00000001,
51  };
52 
55  {
56  }
57 
59  {
60  }
61 
63  virtual void beginFrame(double simTime) = 0;
64 
67  virtual bool preAdvanceFrame() = 0;
68 
71  virtual void advanceFrame(double* networkFrameTime = nullptr) = 0;
72 
74  virtual const char* type() const = 0;
75 
78  virtual bool stateDataAdded(makVrf::DtStateData*) = 0;
79 
81  virtual void stateDataAboutToBeRemoved(const makVrf::DtStateData*) = 0;
82 
84  virtual bool printDataToStream(const DtUUID&, DtOutputStream&) const = 0;
85 
87  virtual void setInterest(const DtVector& geocentricCenter, double radius) = 0;
88 
90  virtual bool init(DtCommunicationManager*) = 0;
91 
93  virtual void reserve(unsigned numToReserve) = 0;
94 
96  virtual void setNumCallbackThreads(unsigned) = 0;
97 
99  virtual void setEnabled(bool) = 0;
100 
103  virtual DtString nextEventId(const DtString& = DtString::nullString()) = 0;
104 
106  virtual std::string protocol() const = 0;
107 
109  virtual void setRunFullyThreaded(bool) = 0;
110 
112  virtual void printReflectedObjectCounts() const = 0;
113 
116  virtual void requestUpdatesForRemoteNonVrfObjects() const = 0;
117 
119  virtual const makVrf::DtStateData* stateDataForGlobalId(const DtString&) const = 0;
120 
122  virtual void setCoordinateSystem(const Coordinate_System*) = 0;
123 
125  virtual void setParameterDatabase(DtVrfParameterDb*) = 0;
126 
128  virtual unsigned int maxNameLengthForType(const DtObjectType&) const = 0;
129 
131  virtual void setVrfSessionId(int) = 0;
132 
134  virtual void setVrfMessageVersionSupported(int) = 0;
135 
137  virtual void startScenarioLoad(bool) = 0;
138 
140  virtual void endScenarioLoad(bool) = 0;
141 
143  virtual void setSiteAppId(int, int) = 0;
144 
147  virtual AddEventResult addEvent(const makVrfEvents::DtEvent&, bool& selfReflected) = 0;
148 
150  virtual AddEventResult sendEvent(const makVrfEvents::DtEvent&) = 0;
151 
153  virtual void setEventManager(makVrfEvents::DtEventManager*) = 0;
154 
156  virtual void resetSimulation() = 0;
157 
159  virtual void setFrameRateMode(const DtString& mode, double deltaTime, bool manageTime = false) = 0;
160 
162  virtual void rewindScenario() = 0;
163 
165  virtual void run() = 0;
166 
168  virtual void pause() = 0;
169 
171  virtual bool typeIsPublishable(const DtEntityType&) const = 0;
172 
174  virtual void setSimTime(double) = 0;
175 
177  virtual void setTimeMultiplier(double) = 0;
178 
180  virtual void setExerciseStartTime(double) = 0;
181 
183  virtual bool validateScenario(const DtScenario&, DtString& error) const = 0;
184 
186  virtual double determineSimTime(double& dt, DtCommunicationManagerPerformanceTimerInformation* performanceTimerInformation = nullptr) { return 0; };
187 
189  virtual bool hasSimulationTime() const = 0;
190 
192  virtual void removeAndDeleteAll() = 0;
193 
196  virtual bool needsUnpublishedDatabase() const = 0;
197 
199  virtual bool selfReflecting() const = 0;
200 
203  virtual void setSelfReflecting(bool) = 0;
204 
206  virtual bool rediscoverObjects() = 0;
207 
209  virtual bool publishingOnLegionNetwork() const = 0;
210 
212  virtual void beginBulkCreate() {}
213  virtual void endBulkCreate() {}
214 
215 };
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
virtual double determineSimTime(double &dt, DtCommunicationManagerPerformanceTimerInformation *performanceTimerInformation=nullptr)
Determine the next simulation time. Implement only if hasSimulationTime returns true.
Definition: networkManagerInterface.h:186
Instances of DtVrfParameterDb are the database of DtVrfObjectParameters objects used in the construct...
Definition: vrfParameterDb.h:38
Definition: scenario.h:52
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
Definition: objectType.h:27
Definition: communicationManager.h:35
DtNetworkManagerInterface is the base class which all network interfaces must be derived from...
Definition: networkManagerInterface.h:41
Definition: coordSystem.h:54
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:336
Definition: event.h:13
virtual ~DtNetworkManagerInterface()
Definition: networkManagerInterface.h:58
The DtCommunicationManager class is a convenience class that will create both the DtNetworkInterfaceM...
Definition: communicationManager.h:51
virtual void beginBulkCreate()
Signaling the start/end of bulk object creation.
Definition: networkManagerInterface.h:212
Definition: asyncJobServer.h:39
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:45
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
const char int mode
Definition: ioapi.h:38
DtNetworkManagerInterface()
constructor
Definition: networkManagerInterface.h:54
#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
AddEventResult
When adding an event, return a flag that represent the result of the addEvent. Return DoNotContinue i...
Definition: networkManagerInterface.h:47
virtual void endBulkCreate()
Definition: networkManagerInterface.h:213

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)