Choreonoid  1.5
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 
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;
37 
38 private:
39  JoystickImpl* impl;
40  friend class JoystickImpl;
41 };
42 
43 }
44 
45 #endif
Definition: Joystick.h:16
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
Definition: Signal.h:380