Choreonoid
1.5
src
Util
Joystick.h
Go to the documentation of this file.
1
6
#ifndef CNOID_UTIL_JOYSTICK_H
7
#define CNOID_UTIL_JOYSTICK_H
8
9
#include "
Signal.h
"
10
#include "
exportdecl.h
"
11
12
namespace
cnoid
{
13
14
class
JoystickImpl;
15
16
class
CNOID_EXPORT
Joystick
17
{
18
public
:
19
Joystick
();
20
Joystick
(
const
char
* device);
21
virtual
~
Joystick
();
22
23
int
fileDescriptor()
const
;
24
25
bool
isReady()
const
;
26
const
char
* errorMessage()
const
;
27
28
int
numAxes()
const
;
29
void
setAxisEnabled(
int
axis,
bool
on);
30
int
numButtons()
const
;
31
bool
readCurrentState();
32
double
getPosition(
int
axis)
const
;
33
bool
getButtonState(
int
button)
const
;
34
bool
isActive()
const
;
35
SignalProxy<void(int id, bool isPressed)>
sigButton();
36
SignalProxy<void(int id, double position)>
sigAxis();
37
38
private
:
39
JoystickImpl* impl;
40
friend
class
JoystickImpl;
41
};
42
43
}
44
45
#endif
exportdecl.h
Signal.h
cnoid::Joystick
Definition:
Joystick.h:16
cnoid
Defines the minimum processing for performing pasing file for STL.
Definition:
AbstractSceneLoader.h:9
CNOID_EXPORT
#define CNOID_EXPORT
Definition:
Util/exportdecl.h:37
cnoid::SignalProxy
Definition:
Signal.h:380
Generated by
1.8.13