2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
11 * @brief Gets the value of the joystick operation
19 #include <linux/joystick.h>
27 #define D_DEV_DIR_PATH "/dev/input/"
28 #define D_DEV_NAME_PARTS_JS "js"
29 #define D_DEV_NAME_G25 "Driving Force GT"
30 #define D_DEV_NAME_G27 "G27 Racing Wheel"
40 virtual int Read(int *number, int *value);
41 virtual int ReadData();
43 int GetAxisCount() const;
44 int GetButtonsCount() const;
51 int deviceOpen(const std::string& dirNM, const std::string& fileParts,
52 const std::string& deviceNM, std::string& getDevice);
53 void getDevices(const std::string& dir,
54 const std::vector<std::string>& matching,
55 std::vector<std::string>& filesList) const;
56 virtual bool getDeviceName(int fd, char* devNM, size_t sz);
59 char m_strJoyStick[64];
62 unsigned char m_ucAxes;
63 unsigned char m_ucButtons;
64 char m_strDevName[80];
70 #endif /* CJOYSTICK_H_ */
72 * End of File.(CJoyStick.h)