Main Page
Classes
Files
File List
File Members
src
gloveDeviceTest.cc
Go to the documentation of this file.
1
18
/* system includes */
19
#include <stdio.h>
20
21
/* my includes */
22
#include "
gloveDevice.h
"
23
24
25
/*
26
\brief The program's main function.
27
*/
28
29
void
testGloveDeviceLib
()
30
{
31
gloveDevice
* myGlove =
new
gloveDevice
();
32
myGlove->
init
(
"/dev/ttyS0"
);
33
34
myGlove->
showCurrentStatus
();
35
36
//myGlove->cmdSetStreamValues(true);
37
38
unsigned
char
v[22], n;
39
statusQuery_t
queryStatus;
40
gloveStatusByte_t
gloveStatus
;
41
42
// while(1)
43
for
(
int
i=0; i<5; i++)
44
{
45
myGlove->
cmdGetSensorValues
(v, &n, &queryStatus, &gloveStatus);
46
for
(
int
j=0; j<n; j++)
47
printf(
"%d "
, v[j]);
48
printf(
"\n"
);
49
}
50
51
// myGlove->cmdSetStreamValues(false);
52
53
myGlove->
stop
();
54
}
55
56
//int main(int argc, char **argv)
57
//{
58
//
59
// testGloveDevice();
60
//
61
// return 0;
62
//}
63
gloveDevice.h
gloveDevice::stop
void stop()
Definition:
gloveDevice.cc:105
gloveDevice::cmdGetSensorValues
bool cmdGetSensorValues(vector_t values, uchar_t *n, statusQuery_t *query, gloveStatusByte_t *gloveStatusByte)
Definition:
gloveDevice.cc:390
statusQuery_t
Definition:
gloveTypes.h:75
testGloveDeviceLib
void testGloveDeviceLib()
Definition:
gloveDeviceTest.cc:29
gloveDevice::init
bool init(const char *serialDev)
Definition:
gloveDevice.cc:37
gloveStatus
Definition:
gloveStatus.h:35
gloveDevice::showCurrentStatus
void showCurrentStatus()
Definition:
gloveDevice.cc:788
gloveDevice
Definition:
gloveDevice.h:40
gloveStatusByte_t
Definition:
gloveTypes.h:47
asr_cyberglove_lib
Author(s): Heller Florian, Meißner Pascal, Nguyen Trung, Yi Xie
autogenerated on Mon Jun 10 2019 12:40:38