VR-Forces 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;
22 class DtEntityIdentifier;
24 
25 namespace makVrf
26 {
27  class DtStateData;
28 }
29 
30 namespace makVrfEvents
31 {
32  class DtEvent;
33  class DtEventManager;
34 }
35 
36 class DtUUID;
37 
43 {
44 public:
45 
49  {
50  DoNotContinue = 0,
51  Continue = 0x00000001,
52  };
53 
56  {
57  }
58 
60  {
61  }
62 
64  virtual void beginFrame(double simTime) = 0;
65 
68  virtual bool preAdvanceFrame() = 0;
69 
72  virtual void advanceFrame(double* networkFrameTime = nullptr) = 0;
73 
75  virtual const char* type() const = 0;
76 
79  virtual bool stateDataAdded(makVrf::DtStateData*) = 0;
80 
82  virtual void stateDataAboutToBeRemoved(const makVrf::DtStateData*) = 0;
83 
85  virtual bool printDataToStream(const DtUUID&, DtOutputStream&) const = 0;
86 
88  virtual void setInterest(const DtVector& geocentricCenter, double radius) = 0;
89 
91  virtual bool init(DtCommunicationManager*) = 0;
92 
94  virtual void reserve(unsigned numToReserve) = 0;
95 
97  virtual void setNumCallbackThreads(unsigned) = 0;
98 
100  virtual void setEnabled(bool) = 0;
101 
104  virtual DtString nextEventId(const DtString& = DtString::nullString()) = 0;
105 
107  virtual std::string protocol() const = 0;
108 
110  virtual void setRunFullyThreaded(bool) = 0;
111 
113  virtual void printReflectedObjectCounts() const = 0;
114 
117  virtual void requestUpdatesForRemoteNonVrfObjects() const = 0;
118 
120  virtual const makVrf::DtStateData* stateDataForGlobalId(const DtString&) const = 0;
121 
123  virtual void setCoordinateSystem(const Coordinate_System*) = 0;
124 
126  virtual void setParameterDatabase(DtVrfParameterDb*) = 0;
127 
129  virtual unsigned int maxNameLengthForType(const DtObjectType&) const = 0;
130 
132  virtual void setVrfSessionId(int) = 0;
133 
135  virtual void setVrfMessageVersionSupported(int) = 0;
136 
138  virtual void startScenarioLoad(bool) = 0;
139 
141  virtual void endScenarioLoad(bool) = 0;
142 
144  virtual void setSiteAppId(int, int) = 0;
145 
148  virtual AddEventResult addEvent(const makVrfEvents::DtEvent&, bool& selfReflected) = 0;
149 
151  virtual AddEventResult sendEvent(const makVrfEvents::DtEvent&) = 0;
152 
154  virtual void setEventManager(makVrfEvents::DtEventManager*) = 0;
155 
157  virtual void resetSimulation() = 0;
158 
160  virtual void setFrameRateMode(const DtString& mode, double deltaTime, bool manageTime = false) = 0;
161 
163  virtual void rewindScenario() = 0;
164 
166  virtual void run() = 0;
167 
169  virtual void pause() = 0;
170 
172  virtual bool typeIsPublishable(const DtEntityType&) const = 0;
173 
175  virtual void setSimTime(double) = 0;
176 
178  virtual void setTimeMultiplier(double) = 0;
179 
181  virtual void setExerciseStartTime(double) = 0;
182 
184  virtual bool validateScenario(const DtScenario&, DtString& error) const = 0;
185 
187  virtual double determineSimTime(double& dt, DtCommunicationManagerPerformanceTimerInformation* performanceTimerInformation = nullptr) { return 0; };
188 
190  virtual bool hasSimulationTime() const = 0;
191 
193  virtual void removeAndDeleteAll() = 0;
194 
197  virtual bool needsUnpublishedDatabase() const = 0;
198 
200  virtual bool selfReflecting() const = 0;
201 
204  virtual void setSelfReflecting(bool) = 0;
205 
207  virtual bool rediscoverObjects() = 0;
208 
210  virtual bool publishingOnLegionNetwork() const = 0;
211 
213  virtual void reserveEntityId(const DtEntityIdentifier&) = 0;
214 
216  virtual void beginBulkCreate() {}
217  virtual void endBulkCreate() {}
218 
219 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
virtual double determineSimTime(double &dt, DtCommunicationManagerPerformanceTimerInformation *performanceTimerInformation=nullptr)
Determine the next simulation time. Implement only if hasSimulationTime returns true.
Definition: networkManagerInterface.h:187
Instances of DtVrfParameterDb are the database of DtVrfObjectParameters objects used in the construct...
Definition: vrfParameterDb.h:40
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: communicationManager.h:35
DtNetworkManagerInterface is the base class which all network interfaces must be derived from...
Definition: networkManagerInterface.h:42
Definition: coordSystem.h:54
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:339
Definition: event.h:13
virtual ~DtNetworkManagerInterface()
Definition: networkManagerInterface.h:59
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:216
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:55
#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:48
virtual void endBulkCreate()
Definition: networkManagerInterface.h:217

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)