#include <yarp/dev/IJoypadController.h>
Inheritance diagram for yarp::dev::IJoypadController:Public Types | |
| enum class | JoypadCtrl_coordinateMode { JypCtrlcoord_POLAR = 0 , JypCtrlcoord_CARTESIAN = 1 } |
Public Member Functions | |
| virtual | ~IJoypadController () |
| Destructor. | |
| virtual yarp::dev::ReturnValue | getAxisCount (size_t &axis_count)=0 |
| Get number of axes. | |
| virtual yarp::dev::ReturnValue | getButtonCount (size_t &button_count)=0 |
| Get number of buttons. | |
| virtual yarp::dev::ReturnValue | getTrackballCount (size_t &Trackball_count)=0 |
| Get number of trackballs. | |
| virtual yarp::dev::ReturnValue | getHatCount (size_t &Hat_count)=0 |
| Get number of hats. | |
| virtual yarp::dev::ReturnValue | getTouchSurfaceCount (size_t &touch_count)=0 |
| Get the number of touch surface. | |
| virtual yarp::dev::ReturnValue | getStickCount (size_t &stick_count)=0 |
| Get the number of the sticks. | |
| virtual yarp::dev::ReturnValue | getButton (size_t button_id, double &value)=0 |
| Get the value of a button. | |
| virtual yarp::dev::ReturnValue | getTrackball (size_t trackball_id, yarp::dev::TrackballData &value)=0 |
| Get the axes change of a Trackball. | |
| virtual yarp::dev::ReturnValue | getHat (size_t hat_id, unsigned char &value)=0 |
| Get the value of an Hat. | |
| virtual yarp::dev::ReturnValue | getAxis (size_t axis_id, double &value)=0 |
| Get the value of an axis if present, return false otherwise. | |
| virtual yarp::dev::ReturnValue | getAllAxes (std::vector< double > &values) |
| Get the values of all available joystick axes. | |
| virtual yarp::dev::ReturnValue | getStick (size_t stick_id, yarp::dev::StickData &value, JoypadCtrl_coordinateMode coordinate_mode)=0 |
| Get the value of a stick if present, return false otherwise. | |
| virtual yarp::dev::ReturnValue | getTouch (size_t touch_id, std::vector< yarp::dev::TouchData > &value)=0 |
| Get the value of a touch if present, return false otherwise. | |
Definition at line 24 of file IJoypadController.h.
|
strong |
| Enumerator | |
|---|---|
| JypCtrlcoord_POLAR | |
| JypCtrlcoord_CARTESIAN | |
Definition at line 27 of file IJoypadController.h.
|
virtualdefault |
Destructor.
|
virtual |
Get the values of all available joystick axes.
| values | the vector containing the axes values. |
Reimplemented in JoypadControl_nwc_yarp.
Definition at line 12 of file IJoypadController.cpp.
|
pure virtual |
Get the value of an axis if present, return false otherwise.
| axis_id | Id of the axis to get. must be > -1 && < getAxisCount(), return false otherwise. |
| value | reference to be valued. the absolute boundaries for the values should be -1.0 and 1.0 However the actual range depends on the physical device (example: analog trigger does not have a central position thus can give a value from 0.0 to 0.1). |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get number of axes.
| axes_count | unsigned int reference that will contain the result. |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get the value of a button.
From 0-unpressed to 1-fullpressed and values in the middle in the analog-face-button case.
| button_id | Id of the button to get. Must be > -1 && < getButtonCount(), return false otherwise |
| value | reference to be valued. The value will be from 0.0 (not even touched) to 1.0 (fully pressed) |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get number of buttons.
| button_count | unsigned int reference that will contain the result. |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get the value of an Hat.
| hat_id | Id of the POV hat to get. Must be > -1 && < getHatCount(), return false otherwise. |
| value | reference to be valued. use the YRPJOY_HAT_ macro series to get the currently pressed directions. |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get number of hats.
| Hat_count | unsigned int reference that will contain the result. |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get the value of a stick if present, return false otherwise.
| stick_id | Id of the stick to get. must be > -1 && < getStickCount(), return false otherwise. |
| value | a vector that will contain the joystick position. the size of the vector will give you the Number of degrees of freedom and the value will be from -1.0 to 1.0. |
| coordinate_mode | to get data in cartesian mode or polar mode. |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get the number of the sticks.
| stick_count | unsigned int reference that will contain the result. |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get the value of a touch if present, return false otherwise.
| value | a vector that will contain the touch values normalized from 0.0 to 1.0. |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get the number of touch surface.
Multiple touch surface can represent either multiple physical monotouch surface or a multitouch surface or a combination of the two.
| touch_count | unsigned int reference that will contain the result. |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get the axes change of a Trackball.
| trackball_id | Id of the Trackball to get. Must be > -1 && < getTrackballCount(), return false otherwise. |
| value | reference to be valued. the value will be from 0.0 (not moving) to 1.0 (full velocity). |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.
|
pure virtual |
Get number of trackballs.
| Trackball_count | unsigned int reference that will contain the result. |
Implemented in FakeJoypad, JoypadControl_nwc_yarp, and SDLJoypad.