Interface for using a joystick to control a Primitive Driver service. More...
#include <joystick.h>
Public Member Functions | |
| Joystick () | |
| Constructor, initializes default value. | |
| virtual | ~Joystick () |
| Destructor. | |
| void | EnableJoystick (const bool enable=true) |
| bool | IsJoystickEnabled () const |
| virtual void | Shutdown () |
| Shutsdown the service. | |
| virtual bool | LoadSettings (const std::string &filename) |
| Loads settings for the service from an XML file. | |
| virtual void | ProcessJoystickEvent (const CxUtils::Joystick &jstick) |
| Process joystick update and generates a wrench effort. | |
| virtual void | ProcessButtonEvent (const unsigned int buttonNumber, const CxUtils::Joystick::Event type) |
| Process button press events. | |
| virtual void | CheckServiceStatus (const unsigned int timeSinceLastCheckMs) |
| Called periodicly by the Component the service belongs to. This method attempts to lookup a primitive driver on the subsystem we are trying to control. | |
Protected Attributes | |
| CxUtils::Joystick | mJoystick |
| Interface to the joystick. | |
| unsigned int | mID |
| Joystick ID to connect to. | |
| unsigned int | mFrequency |
| Desired joystick update frequency. | |
| std::string | mCalibrationFile |
| Joystick calibration file data. | |
| volatile bool | mEnableJoystickFlag |
| If true, connect to joystick (default). | |
Interface for using a joystick to control a Primitive Driver service.
Definition at line 55 of file joystick.h.
| Joystick::Joystick | ( | ) |
Constructor, initializes default value.
Definition at line 52 of file joystick.cpp.
| Joystick::~Joystick | ( | ) | [virtual] |
Destructor.
Definition at line 66 of file joystick.cpp.
| void Joystick::CheckServiceStatus | ( | const unsigned int | timeSinceLastCheckMs ) | [virtual] |
Called periodicly by the Component the service belongs to. This method attempts to lookup a primitive driver on the subsystem we are trying to control.
Reimplemented from JAUS::ControlDevice.
Definition at line 187 of file joystick.cpp.
| void JAUS::Joystick::EnableJoystick | ( | const bool | enable = true ) |
[inline] |
Definition at line 64 of file joystick.h.
| bool JAUS::Joystick::IsJoystickEnabled | ( | ) | const [inline] |
Definition at line 66 of file joystick.h.
| bool Joystick::LoadSettings | ( | const std::string & | filename ) | [virtual] |
Loads settings for the service from an XML file.
| [in] | filename | Name of the XML file containing data. |
Reimplemented from JAUS::ControlDevice.
Definition at line 81 of file joystick.cpp.
| void Joystick::ProcessButtonEvent | ( | const unsigned int | buttonNumber, |
| const CxUtils::Joystick::Event | type | ||
| ) | [virtual] |
Process button press events.
Definition at line 163 of file joystick.cpp.
| void Joystick::ProcessJoystickEvent | ( | const CxUtils::Joystick & | jstick ) | [virtual] |
Process joystick update and generates a wrench effort.
Definition at line 135 of file joystick.cpp.
| virtual void JAUS::Joystick::Shutdown | ( | ) | [inline, virtual] |
Shutsdown the service.
Reimplemented from JAUS::ControlDevice.
Definition at line 68 of file joystick.h.
std::string JAUS::Joystick::mCalibrationFile [protected] |
Joystick calibration file data.
Definition at line 81 of file joystick.h.
volatile bool JAUS::Joystick::mEnableJoystickFlag [protected] |
If true, connect to joystick (default).
Definition at line 82 of file joystick.h.
unsigned int JAUS::Joystick::mFrequency [protected] |
Desired joystick update frequency.
Definition at line 80 of file joystick.h.
unsigned int JAUS::Joystick::mID [protected] |
Joystick ID to connect to.
Definition at line 79 of file joystick.h.
CxUtils::Joystick JAUS::Joystick::mJoystick [protected] |
Interface to the joystick.
Definition at line 78 of file joystick.h.
1.7.2