JoyStickListener Class Reference

Simple listener for JoyStick events. More...

#include <Devices/JoyStick.H>

Inheritance diagram for JoyStickListener:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~JoyStickListener ()
 Destructor.
virtual void axis (const uint num, const int16 val)=0
 An axis changed.
virtual void button (const uint num, const bool state)=0
 A button changed.

Detailed Description

Simple listener for JoyStick events.

The JoyStickListener gets called each time an event is received from the JoyStick. By default, there is no listener, and users can just asynchronously query the JoyStick for its current internal state. If those queries come in too slowly, however, they may miss some events (e.g., a briefly pressed button). So, production code should define a derived class for JoyStickListener and register it with the JoyStick object, so that it will take action as soon as an event is received.

Definition at line 57 of file JoyStick.H.


Constructor & Destructor Documentation

JoyStickListener::~JoyStickListener (  )  [virtual]

Destructor.

Definition at line 47 of file JoyStick.C.


Member Function Documentation

virtual void JoyStickListener::axis ( const uint  num,
const int16  val 
) [pure virtual]

An axis changed.

Parameters:
num axis number
val new axis value

Implemented in TestJoyStickListener, TestJoyStickListener, TestJoyStickListener, TestJoyStickListener, and TestJoyStickListener.

virtual void JoyStickListener::button ( const uint  num,
const bool  state 
) [pure virtual]

A button changed.

Parameters:
num button number
state new button state (true = pressed)

Implemented in TestJoyStickListener, TestJoyStickListener, TestJoyStickListener, TestJoyStickListener, and TestJoyStickListener.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:24 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3