Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OIS::LinuxForceFeedback Class Reference

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/external/ois/linux/LinuxForceFeedback.h>

Inheritance diagram for OIS::LinuxForceFeedback:
OIS::ForceFeedback OIS::Interface

Public Member Functions

 LinuxForceFeedback (int deviceID)
 
 ~LinuxForceFeedback ()
 
short int getFFAxesNumber ()
 FF is not yet implemented fully on Linux. More...
 
unsigned short getFFMemoryLoad ()
 
void modify (const Effect *effect)
 
void remove (const Effect *effect)
 
void setAutoCenterMode (bool)
 
void setMasterGain (float)
 
void upload (const Effect *effect)
 
- Public Member Functions inherited from OIS::ForceFeedback
 ForceFeedback ()
 
virtual ~ForceFeedback ()
 
void _addEffectTypes (Effect::EForce force, Effect::EType type)
 
void _setAutoCenterSupport (bool on)
 
void _setGainSupport (bool on)
 
const SupportedEffectListgetSupportedEffects () const
 
bool supportsEffect (Effect::EForce force, Effect::EType type) const
 
- Public Member Functions inherited from OIS::Interface
virtual ~Interface ()
 

Protected Types

typedef std::map< int, struct ff_effect * > EffectList
 

Protected Member Functions

void _setCommonProperties (struct ff_effect *event, struct ff_envelope *ffenvelope, const Effect *effect, const Envelope *envelope)
 
void _start (int handle)
 
void _stop (int handle)
 
void _unload (int handle)
 
void _updateConditionalEffect (const Effect *effect)
 
void _updateConstantEffect (const Effect *effect)
 
void _updatePeriodicEffect (const Effect *effect)
 
void _updateRampEffect (const Effect *effect)
 
void _upload (struct ff_effect *ffeffect, const Effect *effect)
 

Protected Attributes

EffectList mEffectList
 
int mJoyStick
 
- Protected Attributes inherited from OIS::ForceFeedback
bool mSetAutoCenterSupport
 
bool mSetGainSupport
 
SupportedEffectList mSupportedEffects
 

Additional Inherited Members

- Public Types inherited from OIS::ForceFeedback
typedef std::multimap< Effect::EForce, Effect::ETypeSupportedEffectList
 
- Public Types inherited from OIS::Interface
enum  IType { ForceFeedback, Reserved }
 Type of Interface. More...
 

Member Typedef Documentation

typedef std::map<int, struct ff_effect *> OIS::LinuxForceFeedback::EffectList
protected

Constructor & Destructor Documentation

LinuxForceFeedback::LinuxForceFeedback ( int  deviceID)
LinuxForceFeedback::~LinuxForceFeedback ( )

Member Function Documentation

void LinuxForceFeedback::_setCommonProperties ( struct ff_effect *  event,
struct ff_envelope *  ffenvelope,
const Effect effect,
const Envelope envelope 
)
protected
void LinuxForceFeedback::_start ( int  handle)
protected
void LinuxForceFeedback::_stop ( int  handle)
protected
void LinuxForceFeedback::_unload ( int  handle)
protected
void LinuxForceFeedback::_updateConditionalEffect ( const Effect effect)
protected
void LinuxForceFeedback::_updateConstantEffect ( const Effect effect)
protected
void LinuxForceFeedback::_updatePeriodicEffect ( const Effect effect)
protected
void LinuxForceFeedback::_updateRampEffect ( const Effect effect)
protected
void LinuxForceFeedback::_upload ( struct ff_effect *  ffeffect,
const Effect effect 
)
protected
short int OIS::LinuxForceFeedback::getFFAxesNumber ( )
inlinevirtual

FF is not yet implemented fully on Linux.

. just return -1 for now. todo, xxx

Implements OIS::ForceFeedback.

unsigned short LinuxForceFeedback::getFFMemoryLoad ( )
virtual

Remarks
Get the current load (%, in [0, 100] of the FF device memory

Implements OIS::ForceFeedback.

void LinuxForceFeedback::modify ( const Effect effect)
virtual

Remarks
Modifies an effect that is currently playing

Implements OIS::ForceFeedback.

void LinuxForceFeedback::remove ( const Effect effect)
virtual

Remarks
Remove the effect from the device

Implements OIS::ForceFeedback.

void LinuxForceFeedback::setAutoCenterMode ( bool  enabled)
virtual

Remarks
If using Force Feedback effects, this should be turned off before uploading any effects. Auto centering is the motor moving the joystick back to center. DirectInput only has an on/off setting, whereas linux has levels.. Though, we go with DI's on/off mode only Note: If the device does not support auto-centering, nothing is done
Parameters
auto_ontrue to turn auto centering on, false to turn off.

Implements OIS::ForceFeedback.

void LinuxForceFeedback::setMasterGain ( float  value)
virtual

Remarks
This is like setting the master volume of an audio device. Individual effects have gain levels; however, this affects all effects at once. Note: If the device does not support master gain setting, nothing is done
Parameters
levelA value between 0.0 and 1.0 represent the percentage of gain. 1.0 being the highest possible force level (means no scaling).

Implements OIS::ForceFeedback.

void LinuxForceFeedback::upload ( const Effect effect)
virtual

Remarks
Creates and Plays the effect immediately. If the device is full of effects, it will fail to be uploaded. You will know this by an invalid Effect Handle

Implements OIS::ForceFeedback.

Member Data Documentation

EffectList OIS::LinuxForceFeedback::mEffectList
protected
int OIS::LinuxForceFeedback::mJoyStick
protected

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