Fawkes API
Fawkes Development Version
|
23 #ifndef _PLUGINS_JOYSTICK_ACQUISITION_THREAD_H_
24 #define _PLUGINS_JOYSTICK_ACQUISITION_THREAD_H_
26 #include "bb_handler.h"
28 #include <aspect/configurable.h>
29 #include <aspect/logging.h>
30 #include <core/threading/thread.h>
31 #include <utils/math/types.h>
82 void init(
const std::string &device_file,
bool allow_open_fail =
false);
84 void open_forcefeedback();
87 std::string cfg_device_file_;
88 float cfg_retry_interval_;
90 float cfg_safety_lockout_timeout_;
91 unsigned int cfg_safety_button_mask_;
92 unsigned int cfg_safety_bypass_button_mask_;
94 bool safety_combo_[5];
100 unsigned int axis_array_size_;
103 char joystick_name_[128];
108 unsigned int pressed_buttons_;
109 float * axis_values_;
const char * joystick_name() const
Get joystick name.
char num_buttons() const
Get number of buttons.
Mutex mutual exclusion lock.
virtual void finalize()
Finalize the thread.
Cause force feedback on a joystick.
Joystick acqusition thread for Linux joystick API.
virtual void loop()
Code to execute in the thread.
virtual void init()
Initialize the thread.
void unlock()
Unlock data.
JoystickForceFeedback * ff() const
Access force feedback of joystick.
Logger * logger
This is the Logger member used to access the logger.
virtual void run()
Stub to see name in backtrace for easier debugging.
Fawkes library namespace.
Thread aspect to log output.
char num_axes() const
Get number of axes.
bool lock_if_new_data()
Lock data if fresh.
float * axis_values()
Get values for the axes.
Thread class encapsulation of pthreads.
Thread aspect to access configuration data.
JoystickAcquisitionThread()
Constructor.
unsigned int pressed_buttons() const
Pressed buttons.
Handler class for joystick data.