VR-Vantage API Documentation
DtCigiDriver.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtCigiDriver.h,v $ $Revision: 1.18 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtCigiDriver_H_
14 #define DtCigiDriver_H_
15 
16 #include <vrvCigi/vrvCigi.h>
17 
19 
20 #include <vrvCore/DtDriver.h>
22 #include <vrvCore/DtUniqueID.h>
24 
27 
28 #include <matrix/vlVector.h>
29 #include <vlutil/vlRunnable.h>
30 
31 class DtThread;
32 
33 namespace makVrv
34 {
35  class DtAsynchronousAgentManager;
36  class DtAsynchronousEventQueue;
37  class DtCigiConnection;
38  class DtCigiConnectionInitializer;
39  class DtCigiIntersectionHandler;
40  class DtIgSettingsController;
41  class DtLosResponder;
42 
48  protected DtRunnable
49  {
50  public:
51 
53  DtCigiDriver(DtAgentManager& agentManager,
54  const std::string& uniqueName);
55 
57  virtual ~DtCigiDriver();
58 
60  virtual const std::string& className() const;
61 
63  const DtCigiConnectionInitializer& connectionSettings() const;
64 
66  virtual void setConnectionSettings(const DtCigiConnectionInitializer& settings);
67 
69  virtual DtConfiguration createConfiguration() const;
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 addDriverFunction(boost::function<void ()> func);
89 
99  virtual void generateLosResponse(int losId, DtUniqueID entityId,
100  bool visible, double range, int responseCount, int hostFrame);
101 
110  virtual void generateHatHotResponse(double height, unsigned int hotId, bool hat,
111  unsigned int lastFrame, bool valid);
112 
114  boost::signal<void (DtCigiConnection*)> signal_sessionCreated;
115 
117  boost::signal<void (DtCigiConnection*)> signal_sessionAboutToBeDestroyed;
118 
119 
120  protected:
121  static std::string theCigiDriverClassName;
122 
123  protected:
125  virtual bool onStart();
126 
128  virtual bool onStop();
129 
132  virtual bool onTick();
133 
135  virtual void startThread();
136 
138  virtual void stopThread();
139 
141  virtual void setConnectionState(bool connected);
142 
144  virtual void slot_onLoadDatabase(const std::string& filename);
145 
147  virtual void performLoadDatabase(const std::string& filename);
148 
151  virtual void slot_onCoordinateSystemChanged(
152  const std::string& name,
153  const std::string& params);
154 
157  typedef std::vector<boost::function<void ()> > FunctionCallList;
158 
160  virtual void runFunctionQueue(FunctionCallQueue& queue);
161 
162  protected:
166 
168  DtThread* myThread;
169 
174 
177 
180 
182 
186 
189 
191 
194 
198 
201 
204  };
205 
207  {
208  return (*myInitializer);
209  }
210 
214  {
215  public:
216 
219 
221  virtual ~DtCigiDriverCreator();
222 
225  virtual const std::string& extension() const;
226 
228  virtual DtDriver* create(DtAgentManager& agentManager,
229  const std::string& instanceName) const;
230 
231  protected:
232  std::string myFileExtension;
233 
234  };
235 }
236 
237 #endif
238 


Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)