Orxonox: OIS::LinuxJoyStick Class Reference

# OIS::LinuxJoyStick Class Reference

`#include <src/ois/linux/LinuxJoyStickEvents.h>`

Inheritance diagram for OIS::LinuxJoyStick:

List of all members.

## Public Member Functions

JoyStickInfo | _getJoyInfo ()
virtual void | _initialize ()
virtual void | capture ()
| LinuxJoyStick (InputManager *creator, bool buffered, const JoyStickInfo &js)
virtual Interface * | queryInterface (Interface::IType type)
virtual void | setBuffered (bool buffered)
virtual | ~LinuxJoyStick ()

## Static Public Member Functions

static void | _clearJoys (JoyStickInfoList &joys)
static JoyStickInfoList | _scanJoys ()

## Protected Attributes

LinuxForceFeedback * | ff_effect
std::map< int, int > | mAxisMap
std::map< int, int > | mButtonMap
int | mJoyStick
std::map< int, Range > | mRanges

## Detailed Description

Linux specialization of JoyStick class.. This version is favored over the other.. and has the possibility* of Force Feedback.. notice I say possibility, i make no gaurantees under linux, as FF support is sketchy at best AFAIK.

## Constructor & Destructor Documentation

LinuxJoyStick::LinuxJoyStick | ( | InputManager * | creator,
|  | bool | buffered,
|  | const JoyStickInfo & | js |
| ) |  |  |

References OIS::JoyStickInfo::axes, OIS::JoyStickInfo::axis_map, OIS::JoyStickInfo::axis_range, OIS::JoyStickInfo::button_map, OIS::JoyStickInfo::buttons, ff_effect, OIS::JoyStickInfo::hats, OIS::JoyStickInfo::joyFileD, OIS::JoyStickState::mAxes, mAxisMap, mButtonMap, OIS::JoyStickState::mButtons, mJoyStick, OIS::JoyStick::mPOVs, mRanges, and OIS::JoyStick::mState.

LinuxJoyStick::~LinuxJoyStick | ( |  | ) | `[virtual]`

References ff_effect, and OIS::EventUtils::removeForceFeedback().

## Member Function Documentation

void LinuxJoyStick::_clearJoys | ( | JoyStickInfoList & | joys | ) | `[static]`

Referenced by OIS::LinuxInputManager::~LinuxInputManager().

JoyStickInfo LinuxJoyStick::_getJoyInfo | ( |  | ) |

Remarks:
  For internal use only... Returns a structure to the manager, to make the device availiable for use again

References OIS::JoyStickInfo::axes, OIS::JoyStickInfo::axis_map, OIS::JoyStickInfo::axis_range, OIS::JoyStickInfo::button_map, OIS::JoyStickInfo::buttons, OIS::JoyStickInfo::devId, OIS::JoyStickInfo::hats, OIS::JoyStickInfo::joyFileD, OIS::JoyStickState::mAxes, mAxisMap, mButtonMap, OIS::JoyStickState::mButtons, OIS::Object::mDevID, mJoyStick, OIS::JoyStick::mPOVs, mRanges, OIS::JoyStick::mState, OIS::Object::mVendor, and OIS::JoyStickInfo::vendor.

void LinuxJoyStick::_initialize | ( |  | ) | `[virtual]`

Remarks:
  Internal... Do not call this directly.

Implements OIS::Object.

References OIS::JoyStickState::clear(), OIS::E_InputDeviceNonExistant, OIS::EventUtils::enumerateForceFeedback(), ff_effect, OIS::JoyStickState::mAxes, mAxisMap, mJoyStick, OIS::JoyStick::mState, and OIS_EXCEPT.

Referenced by setBuffered().

JoyStickInfoList LinuxJoyStick::_scanJoys | ( |  | ) | `[static]`

References OIS::EventUtils::isJoyStick().

Referenced by OIS::LinuxInputManager::_enumerateDevices().

void LinuxJoyStick::capture | ( |  | ) | `[virtual]`

Remarks:
  Used for updating call once per frame before checking state or to update events

Implements OIS::Object.

References OIS::JoyStickListener::axisMoved(), OIS::JoyStickListener::buttonPressed(), OIS::JoyStickListener::buttonReleased(), OIS::Pov::direction, OIS::Pov::East, JOY_BUFFERSIZE, OIS::JoyStick::MAX_AXIS, OIS::JoyStickState::mAxes, mAxisMap, OIS::Object::mBuffered, mButtonMap, OIS::JoyStickState::mButtons, OIS::JoyStick::MIN_AXIS, mJoyStick, OIS::JoyStick::mListener, OIS::JoyStickState::mPOV, mRanges, OIS::JoyStick::mState, OIS::Pov::North, OIS::JoyStickListener::povMoved(), orxonox::read(), OIS::Pov::South, OIS::Object::type(), and OIS::Pov::West.

Interface * LinuxJoyStick::queryInterface | ( | Interface::IType | type | ) | `[virtual]`

Remarks:
  If available, get an interface to write to some devices. Examples include, turning on and off LEDs, ForceFeedback, etc

Parameters:

  | type | The type of interface you are looking for

Implements OIS::Object.

References ff_effect, and OIS::Interface::ForceFeedback.

void LinuxJoyStick::setBuffered | ( | bool | buffered | ) | `[virtual]`

Remarks:
  Sets buffered mode

Implements OIS::Object.

References _initialize(), and OIS::Object::mBuffered.

## Member Data Documentation

LinuxForceFeedback* OIS::LinuxJoyStick::ff_effect`[protected]`

Referenced by _initialize(), LinuxJoyStick(), queryInterface(), and ~LinuxJoyStick().

std::map<int, int> OIS::LinuxJoyStick::mAxisMap`[protected]`

Referenced by _getJoyInfo(), _initialize(), capture(), and LinuxJoyStick().

std::map<int, int> OIS::LinuxJoyStick::mButtonMap`[protected]`

Referenced by _getJoyInfo(), capture(), and LinuxJoyStick().

int OIS::LinuxJoyStick::mJoyStick`[protected]`

Referenced by _getJoyInfo(), _initialize(), capture(), and LinuxJoyStick().

std::map<int, Range> OIS::LinuxJoyStick::mRanges`[protected]`

Referenced by _getJoyInfo(), capture(), and LinuxJoyStick().

The documentation for this class was generated from the following files:

- src/ois/linux/LinuxJoyStickEvents.h
- src/ois/linux/LinuxJoyStickEvents.cpp