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