YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
FakeJoypad.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023-2023 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6#ifndef FAKEJOYPAD_H
7#define FAKEJOYPAD_H
8
11#include <vector>
13
23 //public yarp::dev::IJoypadController,
26{
27 unsigned int m_buttonCount {4};
28 unsigned int m_axisCount {4};
29 unsigned int m_stickCount {4};
30 unsigned int m_touchCount {4};
31 unsigned int m_ballCount {4};
32 unsigned int m_hatCount {4};
33
34public:
36 virtual ~FakeJoypad();
37
38 //DeviceDriver
39 bool open(yarp::os::Searchable& config) override;
40 bool close() override;
41
42 //IJoypadController
43 bool getRawAxisCount(unsigned int& axis_count) override;
44
45 bool getRawButtonCount(unsigned int& button_count) override;
46
47 bool getRawHatCount(unsigned int& hat_count) override;
48
49 bool getRawTrackballCount(unsigned int& trackball_count) override;
50
51 bool getRawTouchSurfaceCount(unsigned int& touch_count) override;
52
53 bool getRawStickCount(unsigned int& stick_count) override;
54
55 bool getRawStickDoF(unsigned int stick_id, unsigned int& DoF) override;
56
57 bool getRawButton(unsigned int button_id, float& value) override;
58
59 bool getRawTrackball(unsigned int trackball_id, yarp::sig::Vector& value) override;
60
61 bool getRawHat(unsigned int hat_id, unsigned char& value) override;
62
63 bool getRawAxis(unsigned int axis_id, double& value) override;
64
65 bool getRawStick(unsigned int stick_id, yarp::sig::Vector& value, JoypadCtrl_coordinateMode coordinate_mode) override;
66
67 bool getRawTouch(unsigned int touch_id, yarp::sig::Vector& value) override;
68};
69
70
71#endif //#define FAKEJOYPAD_H
This class is the parameters parser for class FakeJoypad.
FakeJoypad : fake device implementing the device interface
Definition FakeJoypad.h:26
bool getRawAxisCount(unsigned int &axis_count) override
bool getRawStickDoF(unsigned int stick_id, unsigned int &DoF) override
bool close() override
Close the DeviceDriver.
bool getRawStickCount(unsigned int &stick_count) override
bool getRawTouch(unsigned int touch_id, yarp::sig::Vector &value) override
bool getRawTrackballCount(unsigned int &trackball_count) override
virtual ~FakeJoypad()
bool getRawStick(unsigned int stick_id, yarp::sig::Vector &value, JoypadCtrl_coordinateMode coordinate_mode) override
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool getRawHatCount(unsigned int &hat_count) override
bool getRawButtonCount(unsigned int &button_count) override
bool getRawHat(unsigned int hat_id, unsigned char &value) override
bool getRawButton(unsigned int button_id, float &value) override
bool getRawTouchSurfaceCount(unsigned int &touch_count) override
bool getRawTrackball(unsigned int trackball_id, yarp::sig::Vector &value) override
bool getRawAxis(unsigned int axis_id, double &value) override
Interface implemented by all device drivers.
A base class for nested structures that can be searched.
Definition Searchable.h:31