TOBI SignalServer  0.1
tobiss::JStick Class Reference

A class using SDL to access generic joysticks. More...

#include <jstick.h>

+ Inheritance diagram for tobiss::JStick:
+ Collaboration diagram for tobiss::JStick:

Public Member Functions

 JStick (ticpp::Iterator< ticpp::Element > hw)
 Constructor.
virtual ~JStick ()
 Destructor.
virtual SampleBlock< double > getAsyncData ()
 Method to achieve asynchronous data acquisition (method is non-blocking).
virtual void run ()
 Method to start data acquisition.
virtual void stop ()
 Method to stop data acquisition.

Private Member Functions

virtual void setDeviceSettings (ticpp::Iterator< ticpp::Element >const &father)
 Set configuration listed in the <device_settings> section in the XML file.
virtual void setChannelSettings (ticpp::Iterator< ticpp::Element >const &father)
 Set configuration listed in the <channel_settings> section in the XML file.
virtual SampleBlock< double > getSyncData ()
 Method to achieve synchronous data acquisition.
void initJoystick ()
 Initialize the Joystick.

Private Attributes

void * joy_
boost::uint16_t id_
boost::uint16_t buttons_
std::vector< bool > buttons_values_
boost::uint16_t axes_
std::vector< boost::int16_t > axes_values_
boost::uint16_t balls_
std::vector< std::pair< int,
int > > 
balls_values_
std::string name_
SampleBlock< double > empty_block_

Static Private Attributes

static std::set< boost::uint16_t > used_ids_
 every Joystick has a unique ID
static const
HWThreadBuilderTemplateRegistratorWithoutIOService
< JStick
FACTORY_REGISTRATOR_

Detailed Description

A class using SDL to access generic joysticks.

Todo:
Get rid of using void* for working with SDL.

Definition at line 63 of file jstick.h.


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables