VR-Forces 4.8 Class Documentation
 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 
45  protected DtRunnable
46  {
47  public:
48 
50  DtCigiDriver(DtAgentManager& agentManager,
51  const std::string& uniqueName);
52 
54  virtual ~DtCigiDriver();
55 
57  virtual const std::string& className() const;
58 
60  const DtCigiConnectionInitializer& connectionSettings() const;
61 
63  virtual void setConnectionSettings(const DtCigiConnectionInitializer& settings);
64 
66  virtual DtConfiguration createConfiguration() const;
67 
69  virtual void realizeConfiguration(const DtConfiguration& config);
70 
74  virtual void run();
75 
78  virtual DtAgentManagerInterface& sceneInterface();
79 
82  virtual bool useThreadFlag() const;
83 
85  virtual void queueDriverFunction(boost::function<void ()> func);
86 
88  virtual void queueConnectionFunction(boost::function<void ()> func);
89 
90  void reportSmoothingEnabledChanged( bool enabled );
91 
93  boost::signal<void (DtCigiConnection*)> signal_sessionCreated;
94 
96  boost::signal<void (DtCigiConnection*)> signal_sessionAboutToBeDestroyed;
97 
99  virtual DtIgSettingsController& igSettingsController();
101  virtual const DtIgSettingsController& isSettingsController() const;
102 
103  virtual DtCigiViewController& viewController();
104  virtual const DtCigiViewController& viewController() const;
105 
106  virtual DtCigiIntersectionHandler& intersectionHandler();
107  virtual const DtCigiIntersectionHandler& intersectionHandler() const;
108 
109  virtual const DtCigiPositionHandler& positionHandler() const;
110  virtual DtCigiPositionHandler& positionHandler();
111 
113 
114 
115  protected:
116  static std::string theCigiDriverClassName;
117 
118  protected:
120  virtual bool onStart();
121 
123  virtual bool onStop();
124 
127  virtual bool onTick();
128 
130  virtual void startThread();
131 
133  virtual void stopThread();
134 
136  virtual void setConnectionState(bool connected);
137 
141  virtual void slot_onLoadDatabase(const std::string& filename);
142 
147  virtual void performLoadDatabase(const std::string& filename);
148 
154  virtual void slot_terrainPatchCreated();
155 
156  // \brief Calls setDatabaseLoaded on the DtCigiConnection.
157  virtual void slot_firstTickAfterTerrainPatchCreated();
158 
161  virtual void slot_onCoordinateSystemChanged(
162  const std::string& name,
163  const std::string& params);
164 
167  typedef std::vector<boost::function<void ()> > FunctionCallList;
168 
170  virtual void runFunctionQueue(FunctionCallQueue& queue);
171 
176  virtual void slot_displayEngineAdded( const DtDeRecord& igRecord );
177 
178  protected:
182 
184  DtThread* myThread;
185 
190 
193 
196 
199 
202 
205 
207 
211 
214 
216 
219 
223 
226 
229 
232  };
233 
235  {
236  return (*myInitializer);
237  }
238 
242  {
243  public:
244 
247 
249  virtual ~DtCigiDriverCreator();
250 
253  virtual const std::string& extension() const;
254 
256  virtual DtDriver* create(DtAgentManager& agentManager,
257  const std::string& instanceName) const;
258 
259  protected:
260  std::string myFileExtension;
261 
262  };
263 }
264 
265 
DtPositionResponder * myPositionResponder
Position responder.
Definition: DtCigiDriver.h:195
DtThread * myThread
The (possible) other thread that performs CIGI operations.
Definition: DtCigiDriver.h:184
This class initializes the CIGI driver.
Definition: DtCigiConnectionInitializer.h:18
double myNextFrameTime
When we should next process CIGI messages.
Definition: DtCigiDriver.h:231
An asynchronous interface to the scene manager.
Definition: DtAsynchronousAgentManager.h:27
DtAsynchronousAgentManager * myAsynchronousInterface
Definition: DtCigiDriver.h:209
This class handles all of the intersection processing for HAT/HOT, LOS , and Collision segment reques...
Definition: DtCigiIntersectionHandler.h:39
const DtCigiConnectionInitializer & connectionSettings() const
Returns the CIGI connection settings.
Definition: DtCigiDriver.h:234
A DtCigiViewControl receives messages from the DtCigiConnection and actually changes the channel sett...
Definition: DtCigiViewController.h:35
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
bool myUseThreadFlag
Determines whether the reading/processing/sending of CIGI messages should be performed in a separate ...
Definition: DtCigiDriver.h:181
static std::string theCigiDriverClassName
Definition: DtCigiDriver.h:116
Creator class for the CIGI driver.
Definition: DtCigiDriver.h:241
FunctionCallQueue myConnectionThreadFunctions
Definition: DtCigiDriver.h:213
boost::signal< void(DtCigiConnection *)> signal_sessionAboutToBeDestroyed
This signal is emitted when the CIGI session is about to be destroyed.
Definition: DtCigiDriver.h:96
DtLosResponder * myLosResponder
The line-of-sight responder held by the connection.
Definition: DtCigiDriver.h:192
DtCigiConnectionInitializer * myInitializer
Definition: DtCigiDriver.h:206
DtSensorResponder * mySensorResponder
Sensor Control Responder.
Definition: DtCigiDriver.h:201
boost::signal< void(DtCigiConnection *)> signal_sessionCreated
This signal is emitted when the CIGI session is created.
Definition: DtCigiDriver.h:93
DtCigiPositionHandler * myPositionHandler
Processes position requests, has access to DtDe.
Definition: DtCigiDriver.h:228
std::string myFileExtension
Definition: DtCigiDriver.h:260
Contains makVrv::DtLockedBufferedQueue class.
DtCigiViewController * myViewController
Processes CIGI view control/definition messages.
Definition: DtCigiDriver.h:218
DtDe & myDe
Definition: DtCigiDriver.h:210
This class acts on various CIGI messages that change settings in the IG.
Definition: DtIgSettingsController.h:33
A locked buffered queue which allows multiple writers and a single reader.
Definition: DtLockedBufferedQueue.h:27
DtAsynchronousEventQueue * myAsynchronousEventQueue
Definition: DtCigiDriver.h:208
The DtDriver is an abstract class.
Definition: DtDriver.h:34
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.
Definition: DtCigiDriver.h:189
The DtDriver for CIGI.
Definition: DtCigiDriver.h:44
Contains makVrv::DtCigiViewController class.
bool myConnectedFlag
Whether we are connected to the network or not.
Definition: DtCigiDriver.h:204
The asynchronous event queue.
Definition: DtAsynchronousEventQueue.h:27
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
DtLockedBufferedQueue< boost::function< void()> > FunctionCallQueue
Typedefs for the function lists.
Definition: DtCigiDriver.h:166
This class is responsible for the actual processing of CIGI data.
Definition: DtCigiConnection.h:56
The DtAgentManager manages the distributed scene object framework.
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:46
FunctionCallQueue myDriverThreadFunctions
Definition: DtCigiDriver.h:212
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:198
DtSignalConnectionManager myDynamicSignals
Definition: DtCigiDriver.h:215
The base implementation of a configuration.
Definition: DtConfiguration.h:27
The abstract interface necessary for agents.
Definition: DtAgentManagerInterface.h:36
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.
Definition: DtDe.h:69
#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:167

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)