VR-Forces 5.0.1 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) 2020 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 
68  virtual DtConfiguration createConfiguration() const;
69 
71  virtual void realizeConfiguration(const DtConfiguration& config);
72 
76  virtual void run();
77 
80  virtual DtAgentManagerInterface& sceneInterface();
81 
84  virtual bool useThreadFlag() const;
85 
87  virtual void queueDriverFunction(boost::function<void ()> func);
88 
90  virtual void queueConnectionFunction(boost::function<void ()> func);
91 
92  void reportSmoothingEnabledChanged( bool enabled );
93 
95  boost::signalslib::signal<void (DtCigiConnection*)> signal_sessionCreated;
96 
98  boost::signalslib::signal<void (DtCigiConnection*)> signal_sessionAboutToBeDestroyed;
99 
101  virtual DtIgSettingsController& igSettingsController();
103  virtual const DtIgSettingsController& isSettingsController() const;
104 
105  virtual DtCigiViewController& viewController();
106  virtual const DtCigiViewController& viewController() const;
107 
108  virtual DtCigiIntersectionHandler& intersectionHandler();
109  virtual const DtCigiIntersectionHandler& intersectionHandler() const;
110 
111  virtual const DtCigiPositionHandler& positionHandler() const;
112  virtual DtCigiPositionHandler& positionHandler();
113 
114  virtual const DtCigiSensorController& sensorController() const;
115  virtual DtCigiSensorController& sensorController();
116  virtual const DtCigiSymbolHandler& symbolHandler() const;
117  virtual DtCigiSymbolHandler& symbolHandler();
118 
120 
121 
122  protected:
123  static std::string theCigiDriverClassName;
124 
125  protected:
127  virtual bool onStart();
128 
130  virtual bool onStop();
131 
134  virtual bool onTick();
135 
137  virtual void startThread();
138 
140  virtual void stopThread();
141 
143  virtual void setConnectionState(bool connected);
144 
148  virtual void slot_onLoadDatabase(const std::string& filename);
149 
154  virtual void performLoadDatabase(const std::string& filename);
155 
161  virtual void slot_terrainPatchCreated();
162 
163  // \brief Calls setDatabaseLoaded on the DtCigiConnection.
164  virtual void slot_firstTickAfterTerrainPatchCreated();
165 
168  virtual void slot_onCoordinateSystemChanged(
169  const std::string& name,
170  const std::string& params);
171 
174  typedef std::vector<boost::function<void ()> > FunctionCallList;
175 
177  virtual void runFunctionQueue(FunctionCallQueue& queue);
178 
183  virtual void slot_displayEngineAdded( const DtDeRecord& igRecord );
184 
185  protected:
189 
191  DtThread* myThread;
192 
197 
200 
203 
206 
209 
212 
213 
216 
218 
222 
225 
227 
230 
233 
237 
240 
243 
246 
249  };
250 
252  {
253  return (*myInitializer);
254  }
255 
259  {
260  public:
261 
264 
266  virtual ~DtCigiDriverCreator();
267 
270  virtual const std::string& extension() const;
271 
273  virtual DtDriver* create(DtAgentManager& agentManager,
274  const std::string& instanceName) const;
275 
276  protected:
277  std::string myFileExtension;
278 
279  };
280 }
281 
282 
DtPositionResponder * myPositionResponder
Position responder.
Definition: DtCigiDriver.h:202
DtThread * myThread
The (possible) other thread that performs CIGI operations.
Definition: DtCigiDriver.h:191
boost::signalslib::signal< void(DtCigiConnection *)> signal_sessionCreated
This signal is emitted when the CIGI session is created.
Definition: DtCigiDriver.h:95
This class initializes the CIGI driver.
Definition: DtCigiConnectionInitializer.h:18
DtCigiSymbolHandler * mySymbolHandler
Processes CIGI Symbols, has access to DtDe.
Definition: DtCigiDriver.h:245
boost::signalslib::signal< void(DtCigiConnection *)> signal_sessionAboutToBeDestroyed
This signal is emitted when the CIGI session is about to be destroyed.
Definition: DtCigiDriver.h:98
double myNextFrameTime
When we should next process CIGI messages.
Definition: DtCigiDriver.h:248
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:220
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:251
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_sensorControlRequest from the DtCigiSensorResponder, which processes CIG...
Definition: DtCigiSensorController.h:45
bool myUseThreadFlag
Determines whether the reading/processing/sending of CIGI messages should be performed in a separate ...
Definition: DtCigiDriver.h:188
static std::string theCigiDriverClassName
Definition: DtCigiDriver.h:123
Creator class for the CIGI driver.
Definition: DtCigiDriver.h:258
FunctionCallQueue myConnectionThreadFunctions
Definition: DtCigiDriver.h:224
DtLosResponder * myLosResponder
The line-of-sight responder held by the connection.
Definition: DtCigiDriver.h:199
DtCigiConnectionInitializer * myInitializer
Definition: DtCigiDriver.h:217
DtSensorResponder * mySensorResponder
Sensor Control Responder.
Definition: DtCigiDriver.h:208
DtCigiPositionHandler * myPositionHandler
Processes position requests, has access to DtDe.
Definition: DtCigiDriver.h:242
std::string myFileExtension
Definition: DtCigiDriver.h:277
Contains makVrv::DtLockedBufferedQueue class.
DtCigiViewController * myViewController
Processes CIGI view control/definition messages.
Definition: DtCigiDriver.h:229
DtDe & myDe
Definition: DtCigiDriver.h:221
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:219
The DtDriver is an abstract class. Developers derive from this to create logic that &quot;directs&quot; things ...
Definition: DtDriver.h:31
A DtPositionResponder processes CIGI Position request messages This class catches signals from the Dt...
Definition: DtPositionResponder.h:48
DtCigiConnection * myConnection
The CIGI connection that performs network IO and message processing. This object should be used in a ...
Definition: DtCigiDriver.h:196
DtCigiSensorController * mySensorController
Handles sensor tracking.
Definition: DtCigiDriver.h:232
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:215
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:173
This class is responsible for the actual processing of CIGI data. This holds the entity visualizer...
Definition: DtCigiConnection.h:57
The DtAgentManager manages the distributed scene object framework. This includes the objects and upda...
Definition: DtAgentManager.h:38
Contains makVrv:DtDriver class.
This class catches Sesnor Control signals from the Cigi Signal handler, and processes them into V3 an...
Definition: DtSensorResponder.h:36
FunctionCallQueue myDriverThreadFunctions
Definition: DtCigiDriver.h:223
This class handles the processing of Collision Segment Defintion packets It catches signals from DtCi...
Definition: DtCollisionResponder.h:54
Base class to provide boost signal/slot management.
DtCollisionResponder * myCollisionResponder
Collision Segment Responder.
Definition: DtCigiDriver.h:205
DtSignalConnectionManager myDynamicSignals
Definition: DtCigiDriver.h:226
The base implementation of a configuration.
Definition: DtConfiguration.h:24
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:33
Contains makVrv::DtSharedSettingsManager class.
A DtLosResponder processes CIGI LOS Segment Request and LOS Vector Request messages, and either immediately signals the DtCigiIntersectionHandler of a request or adds a periodic request to its queue.
Definition: DtLosResponder.h:41
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:70
#define DT_DLL_VRVCIGI
Definition: vrvCigi.h:19
DtCigiIntersectionHandler * myIntersectionHandler
Processes HAT/HOT/LOS requests.
Definition: DtCigiDriver.h:239
Abstract DtDriver creator.
Definition: DtDriver.h:201
DtCigiViewManager * myViewManager
Cigi View Manager.
Definition: DtCigiDriver.h:211
This class manages mapping between CIGI views and VRV observers / channels.
Definition: DtCigiViewManager.h:36
DtIgSettingsController * myComponentController
Processes system/view component controls and other messages that change IG settings.
Definition: DtCigiDriver.h:236
std::vector< boost::function< void()> > FunctionCallList
Definition: DtCigiDriver.h:174

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)