65 typedef std::vector<SDLJoypadImpl::stick> stickVector;
68 std::vector<SDL_Joystick*> m_device;
69 unsigned int m_buttonCount {0};
70 unsigned int m_axisCount {0};
71 unsigned int m_stickCount {0};
72 unsigned int m_touchCount {0};
73 unsigned int m_ballCount {0};
74 unsigned int m_hatCount {0};
77 std::vector<bool> m_axes;
78 double m_actionTimestamp;
94 bool close()
override;
const std::string buttActionGroupName
std::map< int, std::string > m_actions
bool parseActions(const yarp::os::Searchable &cfg, size_t maxButtons, int *count=nullptr)
bool executeAction(int action_id)
~JoystickActionsHandler()=default
JoystickActionsHandler()=default
bool actionDetected(int button_id)
SDLJoypad: Device that reads inputs of Joypads compatible with the SDL library.
yarp::dev::ReturnValue getAxis(size_t axis_id, double &value) override
Get the value of an axis if present, return false otherwise.
yarp::dev::ReturnValue getHat(size_t hat_id, unsigned char &value) override
Get the value of an Hat.
yarp::dev::ReturnValue getAxisCount(size_t &axis_count) override
Get number of axes.
yarp::dev::ReturnValue getHatCount(size_t &hat_count) override
Get number of hats.
yarp::dev::ReturnValue getTrackball(size_t trackball_id, yarp::dev::TrackballData &value) override
Get the axes change of a Trackball.
yarp::dev::ReturnValue getTouchSurfaceCount(size_t &touch_count) override
Get the number of touch surface.
yarp::dev::ReturnValue getButton(size_t button_id, double &value) override
Get the value of a button.
yarp::dev::ReturnValue getStick(size_t stick_id, yarp::dev::StickData &value, JoypadCtrl_coordinateMode coordinate_mode) override
Get the value of a stick if present, return false otherwise.
yarp::dev::ReturnValue getTrackballCount(size_t &trackball_count) override
Get number of trackballs.
yarp::dev::ReturnValue getButtonCount(size_t &button_count) override
Get number of buttons.
yarp::dev::ReturnValue getStickCount(size_t &stick_count) override
Get the number of the sticks.
bool close() override
Close the DeviceDriver.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue getTouch(size_t touch_id, std::vector< yarp::dev::TouchData > &value) override
Get the value of a touch if present, return false otherwise.
Interface implemented by all device drivers.
JoypadCtrl_coordinateMode
A base class for nested structures that can be searched.
std::vector< unsigned int > axes_ids
std::vector< int > direction
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARGS(...)
Suppress MSVC C4251 warning for the declaration.