Eaagles::DeviceIO::IODevice Class Reference

Inherits Eaagles::Basic::LcObject.

Inherited by Eaagles::DeviceIO::ThreadedDevice.

Inheritance diagram for Eaagles::DeviceIO::IODevice:

Inheritance graph
[legend]
Collaboration diagram for Eaagles::DeviceIO::IODevice:

Collaboration graph
[legend]
List of all members.

Public Types

enum  EventType {
  PRESS, RELEASE, ANY, BUTTON_PRESS,
  BUTTON_RELEASE, AXIS
}

Public Member Functions

 IODevice (void)
virtual bool open (void)=0
virtual void receive (void)=0
int getNumOfBtns (void)
int getNumOfAxes (void)
float getAxisValue (int index)
bool getAxisChanged (int index, int deadband)
bool getBtnState (int index)
bool getBtnPressed (int index)
bool getBtnReleased (int index)
bool getBtnChanged (int index)
void saveBtns (void)
void saveAxes (void)
void registerEvent (IOEvent *event)
void unregisterEvent (IOEvent *event)

Protected Member Functions

void setAxisValue (int index, float value)
void setBtnState (int index, bool state)
void setNumOfBtns (int num)
void setNumOfAxes (int num)
void propagateEvents (void)

Private Attributes

int numOfBtns
int numOfAxes
bool * btnState
bool * btnState_old
float * axisValue
float * axisValue_old
Basic::LcList * eventList

Member Enumeration Documentation

enum Eaagles::DeviceIO::IODevice::EventType

set callback routine for handling all events

Enumerator:
PRESS 
RELEASE 
ANY 
BUTTON_PRESS 
BUTTON_RELEASE 
AXIS 


Constructor & Destructor Documentation

Eaagles::DeviceIO::IODevice::IODevice ( void   ) 


Member Function Documentation

virtual bool Eaagles::DeviceIO::IODevice::open ( void   )  [pure virtual]

device specific methods to be implemented in derived class

Implemented in Eaagles::DeviceIO::BGDevice, Eaagles::DeviceIO::JoystickDevice, Eaagles::DeviceIO::KeithleyDevice, and Eaagles::DeviceIO::JoystickDevice.

virtual void Eaagles::DeviceIO::IODevice::receive ( void   )  [pure virtual]

Implemented in Eaagles::DeviceIO::BGDevice, Eaagles::DeviceIO::JoystickDevice, Eaagles::DeviceIO::KeithleyDevice, and Eaagles::DeviceIO::JoystickDevice.

int Eaagles::DeviceIO::IODevice::getNumOfBtns ( void   ) 

Gets the number of buttons entered by the user.

int Eaagles::DeviceIO::IODevice::getNumOfAxes ( void   ) 

Gets the number of axes entered by the user.

float Eaagles::DeviceIO::IODevice::getAxisValue ( int  index  ) 

Gets the axes value entered by the user.

bool Eaagles::DeviceIO::IODevice::getAxisChanged ( int  index,
int  deadband 
)

Returns whether the user has changed the axes value or not ( T/F).

bool Eaagles::DeviceIO::IODevice::getBtnState ( int  index  ) 

Gets whether the button is in use or not.

bool Eaagles::DeviceIO::IODevice::getBtnPressed ( int  index  ) 

Gets whether the button is pressed or not.

bool Eaagles::DeviceIO::IODevice::getBtnReleased ( int  index  ) 

Gets whether the button is released or not.

bool Eaagles::DeviceIO::IODevice::getBtnChanged ( int  index  ) 

Gets whether the button is changed or not.

void Eaagles::DeviceIO::IODevice::saveBtns ( void   ) 

methods to save n-1 button states

void Eaagles::DeviceIO::IODevice::saveAxes ( void   ) 

method to save axes states

void Eaagles::DeviceIO::IODevice::registerEvent ( IOEvent event  ) 

set callback routines for registered events

void Eaagles::DeviceIO::IODevice::unregisterEvent ( IOEvent event  ) 

set callback routines for unregistered events

void Eaagles::DeviceIO::IODevice::setAxisValue ( int  index,
float  value 
) [protected]

Sets the axes value given by the user.

void Eaagles::DeviceIO::IODevice::setBtnState ( int  index,
bool  state 
) [protected]

Sets the button state given by the user.

void Eaagles::DeviceIO::IODevice::setNumOfBtns ( int  num  )  [protected]

set the number of buttons device supports also initializes arrays for use

void Eaagles::DeviceIO::IODevice::setNumOfAxes ( int  num  )  [protected]

set the number of axes device supports also initializes arrays for use

void Eaagles::DeviceIO::IODevice::propagateEvents ( void   )  [protected]

propagate button and axe events


Member Data Documentation

int Eaagles::DeviceIO::IODevice::numOfBtns [private]

number of button the device supports

int Eaagles::DeviceIO::IODevice::numOfAxes [private]

number of axes the device supports

bool* Eaagles::DeviceIO::IODevice::btnState [private]

gives the present situation of the button (pressed or not)

bool* Eaagles::DeviceIO::IODevice::btnState_old [private]

gives the previous situation of the button state

float* Eaagles::DeviceIO::IODevice::axisValue [private]

gives the present value of the axis

float* Eaagles::DeviceIO::IODevice::axisValue_old [private]

gives the past value of the axis

Basic::LcList* Eaagles::DeviceIO::IODevice::eventList [private]

list for events to process


Generated on Tue Dec 19 16:26:57 2006 for Eaagles by  doxygen 1.5.0