VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCigiDriver.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
14 #include <vrvCore/DtDriver.h>
17 
20 
21 #include <matrix/vlVector.h>
22 #include <vlutil/vlRunnable.h>
23 
24 class DtThread;
25 
26 namespace makVrv
27 {
28  class DtAsynchronousAgentManager;
29  class DtAsynchronousEventQueue;
30  class DtCigiConnection;
31  class DtCigiConnectionInitializer;
32  class DtCigiIntersectionHandler;
33  class DtIgSettingsController;
34  class DtLosResponder;
35  class DtPositionResponder;
36  class DtCigiPositionHandler;
37  class DtCollisionResponder;
38  class DtSensorResponder;
39  class DtCigiSensorController;
40  class DtCigiViewManager;
41  class DtCigiSymbolHandler;
47  protected DtRunnable
48  {
49  public:
50 
52  DtCigiDriver(DtAgentManager& agentManager,
53  const std::string& uniqueName);
54 
56  virtual ~DtCigiDriver();
57 
59  virtual const std::string& className() const;
60 
62  const DtCigiConnectionInitializer& connectionSettings() const;
63 
65  virtual void setConnectionSettings(const DtCigiConnectionInitializer& settings);
66 
69  virtual DtConfiguration createConfiguration(bool saveAllParameters) const override;
70 
72  virtual void realizeConfiguration(const DtConfiguration& config);
73 
77  virtual void run();
78 
81  virtual DtAgentManagerInterface& sceneInterface();
82 
85  virtual bool useThreadFlag() const;
86 
88  virtual void queueDriverFunction(boost::function<void ()> func);
89 
91  virtual void queueConnectionFunction(boost::function<void ()> func);
92 
93  void reportSmoothingEnabledChanged( bool enabled );
94 
96  vrvSignalsLib::signal<void (DtCigiConnection*)> signal_sessionCreated;
97 
99  vrvSignalsLib::signal<void (DtCigiConnection*)> signal_sessionAboutToBeDestroyed;
100 
102  virtual DtIgSettingsController& igSettingsController();
104  virtual const DtIgSettingsController& isSettingsController() const;
105 
106  virtual DtCigiViewController& viewController();
107  virtual const DtCigiViewController& viewController() const;
108 
109  virtual DtCigiIntersectionHandler& intersectionHandler();
110  virtual const DtCigiIntersectionHandler& intersectionHandler() const;
111 
112  virtual const DtCigiPositionHandler& positionHandler() const;
113  virtual DtCigiPositionHandler& positionHandler();
114 
115  virtual const DtCigiSensorController& sensorController() const;
116  virtual DtCigiSensorController& sensorController();
117 
118  virtual const DtCigiSymbolHandler& symbolHandler() const;
119  virtual DtCigiSymbolHandler& symbolHandler();
120 
122 
123 
124  protected:
125  static std::string theCigiDriverClassName;
126 
127  protected:
129  virtual bool onStart();
130 
132  virtual bool onStop();
133 
136  virtual bool onTick();
137 
139  virtual void startThread();
140 
142  virtual void stopThread();
143 
145  virtual void setConnectionState(bool connected);
146 
150  virtual void slot_onLoadDatabase(const std::string& filename);
151 
156  virtual void performLoadDatabase(const std::string& filename);
157 
163  virtual void slot_terrainPatchCreated();
164 
165  // \brief Calls setDatabaseLoaded on the DtCigiConnection.
166  virtual void slot_firstTickAfterTerrainPatchCreated();
167 
170  virtual void slot_onCoordinateSystemChanged(
171  const std::string& name,
172  const std::string& params);
173 
176  typedef std::vector<boost::function<void ()> > FunctionCallList;
177 
179  virtual void runFunctionQueue(FunctionCallQueue& queue);
180 
185  virtual void slot_displayEngineAdded( const DtDeRecord& igRecord );
186 
187  protected:
191 
193  DtThread* myThread;
194 
199 
202 
204 
208 
211 
213 
216 
219 
223 
226 
229 
232 
235 
236  vrvSignalsLib::connection myPreTickConnection;
237  vrvSignalsLib::connection myTerrainPatchCreatedConnection;
238  };
239 
241  {
242  return (*myInitializer);
243  }
244 
248  {
249  public:
250 
253 
255  virtual ~DtCigiDriverCreator();
256 
259  virtual const std::string& extension() const;
260 
262  virtual DtDriver* create(DtAgentManager& agentManager,
263  const std::string& instanceName) const;
264 
265  protected:
266  std::string myFileExtension;
267 
268  };
269 }
270 
271 
DtThread * myThread
The (possible) other thread that performs CIGI operations.
Definition: DtCigiDriver.h:193
This class initializes the CIGI driver.
Definition: DtCigiConnectionInitializer.h:18
DtCigiSymbolHandler * mySymbolHandler
Processes CIGI Symbols, has access to DtDe.
Definition: DtCigiDriver.h:231
double myNextFrameTime
When we should next process CIGI messages.
Definition: DtCigiDriver.h:234
This class handles all the processing of CIGI Symbol Messages. CIGI Symbols require no responses so t...
Definition: DtCigiSymbolHandler.h:52
An asynchronous interface to the scene manager.
Definition: DtAsynchronousAgentManager.h:24
DtAsynchronousAgentManager * myAsynchronousInterface
Definition: DtCigiDriver.h:206
This class handles all of the intersection processing for HAT/HOT, LOS , and Collision segment reques...
Definition: DtCigiIntersectionHandler.h:42
const DtCigiConnectionInitializer & connectionSettings() const
Returns the CIGI connection settings.
Definition: DtCigiDriver.h:240
A DtCigiViewControl receives messages from the DtCigiConnection and actually changes the channel sett...
Definition: DtCigiViewController.h:37
A Record of an IG instance.
Definition: DtDeRecord.h:24
This class handles all of the position processing for Position Requests It receives signals from the ...
Definition: DtCigiPositionHandler.h:40
This class listens to signal_sensorControllerRequest from the DtCigiSensorResponder, which processes CIGI packets into non-CCL containers. This class initialises Sensor tracking through the use of DtTrackAcquirer()s and their derived classes, e.g. DtLosTrackAcquirer(). It also creates DtTrackMonitor()s to monitor the tracking of objects that are selected for tracking in the track acquirers. DtSensorResponder::DtSensorResponse structs are filled in this class from the information from both acquirers and track monitors. These structs are passed back to the DtSesnsorResponder through a signal in a thread safe manner. If you wish to use additional sensor types, IR2 for example. It must be added in the Display Settings in the vrvGui, and then added to the Cigi Mappings with a new CIGI sensor ID. This class uses SensorIDs to map and associate information with sensors. SensorIDs are used for sensor tracking, like in this class, and sensor names are used for sensor visualisation (DtCigiViewController).
Definition: DtCigiSensorController.h:45
bool myUseThreadFlag
Determines whether the reading/processing/sending of CIGI messages should be performed in a separate ...
Definition: DtCigiDriver.h:190
static std::string theCigiDriverClassName
Definition: DtCigiDriver.h:125
Creator class for the CIGI driver.
Definition: DtCigiDriver.h:247
vrvSignalsLib::connection myTerrainPatchCreatedConnection
Definition: DtCigiDriver.h:237
FunctionCallQueue myConnectionThreadFunctions
Definition: DtCigiDriver.h:210
vrvSignalsLib::signal< void(DtCigiConnection *)> signal_sessionCreated
This signal is emitted when the CIGI session is created.
Definition: DtCigiDriver.h:96
DtCigiConnectionInitializer * myInitializer
Definition: DtCigiDriver.h:203
DtCigiPositionHandler * myPositionHandler
Processes position requests, has access to DtDe.
Definition: DtCigiDriver.h:228
std::string myFileExtension
Definition: DtCigiDriver.h:266
Contains makVrv::DtLockedBufferedQueue class.
DtCigiViewController * myViewController
Processes CIGI view control/definition messages.
Definition: DtCigiDriver.h:215
DtDe & myDe
Definition: DtCigiDriver.h:207
This class acts on various CIGI messages that change settings in the IG. All of the &quot;perform&quot; methods...
Definition: DtIgSettingsController.h:33
A locked buffered queue which allows multiple writers and a single reader. Internally the queue is st...
Definition: DtLockedBufferedQueue.h:24
DtAsynchronousEventQueue * myAsynchronousEventQueue
Definition: DtCigiDriver.h:205
The DtDriver is an abstract class. Developers derive from this to create logic that &quot;directs&quot; things ...
Definition: DtDriver.h:30
DtCigiConnection * myConnection
The CIGI connection that performs network IO and message processing. This object should be used in a ...
Definition: DtCigiDriver.h:198
DtCigiSensorController * mySensorController
Handles sensor tracking.
Definition: DtCigiDriver.h:218
The DtDriver for CIGI. Provides communication between the IG (DtDe) and the DtCigiConnection which do...
Definition: DtCigiDriver.h:46
Contains makVrv::DtCigiViewController class.
bool myConnectedFlag
Whether we are connected to the network or not.
Definition: DtCigiDriver.h:201
The asynchronous event queue. To create an asynchronous event queue the the makVrv::DtMainEventQueue ...
Definition: DtAsynchronousEventQueue.h:24
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtLockedBufferedQueue< boost::function< void()> > FunctionCallQueue
Typedefs for the function lists.
Definition: DtCigiDriver.h:175
This class is responsible for the actual processing of CIGI data. This holds the entity visualizer...
Definition: DtCigiConnection.h:58
The DtAgentManager manages the distributed scene object framework. This includes the objects and upda...
Definition: DtAgentManager.h:38
Contains makVrv:DtDriver class.
FunctionCallQueue myDriverThreadFunctions
Definition: DtCigiDriver.h:209
vrvSignalsLib::connection myPreTickConnection
Definition: DtCigiDriver.h:236
Base class to provide boost signal/slot management.
vrvSignalsLib::signal< void(DtCigiConnection *)> signal_sessionAboutToBeDestroyed
This signal is emitted when the CIGI session is about to be destroyed.
Definition: DtCigiDriver.h:99
DtSignalConnectionManager myDynamicSignals
Definition: DtCigiDriver.h:212
The base implementation of a configuration.
Definition: DtConfiguration.h:24
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:33
Contains makVrv::DtSharedSettingsManager class.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
#define DT_DLL_VRVCIGI
Definition: vrvCigi.h:19
DtCigiIntersectionHandler * myIntersectionHandler
Processes HAT/HOT/LOS requests.
Definition: DtCigiDriver.h:225
Abstract DtDriver creator.
Definition: DtDriver.h:204
DtIgSettingsController * myComponentController
Processes system/view component controls and other messages that change IG settings.
Definition: DtCigiDriver.h:222
std::vector< boost::function< void()> > FunctionCallList
Definition: DtCigiDriver.h:176

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)