Inherited by Eaagles::DeviceIO::ThreadedDevice.
Inheritance diagram for Eaagles::DeviceIO::IODevice:


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 |
| Eaagles::DeviceIO::IODevice::IODevice | ( | void | ) |
| 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] |
| 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
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
1.5.0