VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
examples
guiSendInteraction
exConnInterface.h
Go to the documentation of this file.
1
2
#pragma once
3
4
#include <
vrvVrl/DtVrlinkDriver.h
>
5
#include <
vrfVrlSharedSource/DtVrfDriver.h
>
6
#include <
vrvVrl/DtVrlinkConnection.h
>
7
#include <vl/exerciseConn.h>
8
9
//This class manages passing calls and data from the main (display engine) thread
10
//to the driver thread, which is what is ticking the DtExerciseConnection.
11
class
DtExConnInterface
12
{
13
public
:
14
//Construction is done by the driver thread.
15
DtExConnInterface
(
makVrv::DtVrlinkDriver
* driver)
16
:
myDriver
(driver)
17
,
myExConn
(0)
18
{
19
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection
* connection =
20
dynamic_cast<
makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection
*
>
(driver->
connection
());
21
if
(connection)
22
{
23
myExConn
= connection->
exerciseConn
();
24
}
25
}
26
27
//These functions may be called from a thread other than the driver thread.
28
void
sendCommentInteraction
(
const
DtString
& data)
29
{
30
//Queue the execute function to be run by the driver thread.
31
//This bind function puts the arguments into the queue as well, which
32
//will then be processed by the execute function in the other thread.
33
myDriver
->
queueSimulationFunction
(
34
boost::bind(&
DtExConnInterface::executeSendCommentInteraction
,
this
, data));
35
}
36
37
static
DtExConnInterface
*
theExConnInterface
;
38
protected
:
39
40
//This is the function will get called in the driver thread, and can
41
//make the normal calls on the exercise connection.
42
void
executeSendCommentInteraction
(
DtString
commentString);
43
44
makVrv::DtVrlinkDriver
*
myDriver
;
45
DtExerciseConn*
myExConn
;
46
};
47
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)