VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DistributedSimulationDriver2B.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vrvCore/DtDriver.h>
12 #include <vlutil/vlRunnable.h>
13 #include <vlutil/vlThread.h>
14 
15 class DtExerciseConn;
16 class DtThread;
17 class DtThreadStart;
18 
19 namespace makVrv
20 {
21 namespace tutorialDistributedSimulation2B
22 {
23 
25  protected DtRunnable
26 {
27 public:
28 
31 
34 
36  virtual const std::string& className() const;
37 
39  DtExerciseConn* connection()
40  {
41  return myConnection;
42  }
43 
44 protected:
45 
48  virtual bool onStart();
49 
51  virtual bool onStop();
52 
54  virtual bool onTick();
55 
57  virtual void run();
58 
61  void startThread();
62 
65  void stopThread();
66 
67 protected:
68 
69  DtExerciseConn* myConnection;
71 
73  //Cross thread variables. They are used between the two threads for
74  //communication.
75  DtThreadStartSP myStart;
76  DtThread* myThread;
78 };
79 
80 }
81 }
virtual const std::string & className() const
Get the class name as a string.
void stopThread()
Attempt to stop the thread, blocking until the thread stops.
DtThreadStartSP myStart
Definition: DistributedSimulationDriver2B.h:75
virtual bool onStart()
Called when the driver is started by the display engine Restores state that existed the last time the...
DtExerciseConn * myConnection
Definition: DistributedSimulationDriver2B.h:69
virtual void run()
function that will be called when the thread is started.
virtual bool onTick()
Tick the driver. If this driver needs to perform actions per the sim clock.
The DtDriver is an abstract class.
Definition: DtDriver.h:31
virtual bool onStop()
Called when the driver is stopped by the display engine.
The DtAgentManager manages the distributed scene object framework.
Definition: DtAgentManager.h:38
bool myConnectionState
Definition: DistributedSimulationDriver2B.h:70
Contains makVrv:DtDriver class.
virtual const std::string & instanceName() const
Get this driver&#39;s instance name.
DtExerciseConn * connection()
Returns the connection object being used.
Definition: DistributedSimulationDriver2B.h:39
Definition: DistributedSimulationDriver2B.h:24
DistributedSimulationDriver(DtAgentManager &agentManager, const std::string &instanceName)
CTOR.
DtThread * myThread
Definition: DistributedSimulationDriver2B.h:76
DtAgentManager & agentManager()
Get the master scene for this host.

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)