TOBI SignalServer  0.1
tobiss::MouseBase Class Reference

Base class to connected mouse devices. More...

#include <mouse.h>

+ Inheritance diagram for tobiss::MouseBase:
+ Collaboration diagram for tobiss::MouseBase:

Public Member Functions

 MouseBase (ticpp::Iterator< ticpp::Element > hw)
 Constructor.
virtual ~MouseBase ()
 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.

Protected 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 ()
 Abstract method to achieve synchronous data acquisition (method is blocking).
virtual int blockKernelDriver ()=0
 Method to detach kernel driver from the system and open connection to the mouse device.
virtual int freeKernelDriver ()=0
 Method to attatch kernel driver to the system and close connection to the mouse device.
virtual void acquireData ()=0
 Method to acquire data from the mouse device.

Protected Attributes

boost::uint32_t vid_
boost::uint32_t pid_
boost::uint32_t usb_port_
SampleBlock< double > empty_block_
boost::thread * async_acqu_thread_
int async_data_x_
int async_data_y_
int async_data_buttons_

Private Member Functions

void initMouse ()
 Init Mouse settings.
void setVendorId (ticpp::Iterator< ticpp::Element >const &elem)
 Sets vendorId for Mousedevice.
void setProductId (ticpp::Iterator< ticpp::Element >const &elem)
 Sets productId for Mousedevice.
void setUsbPort (ticpp::Iterator< ticpp::Element >const &elem)
 Sets setUsbPort for Mousedevice.
int giveDecimalRepresentation (std::string)
template<class T >
bool fromString (T &t, const std::string &s, std::ios_base &(*f)(std::ios_base &))

Private Attributes

boost::uint16_t id_
boost::uint16_t buttons_
std::vector< bool > buttons_values_
boost::uint16_t axes_
std::vector< boost::int16_t > axes_values_

Static Private Attributes

static std::set< boost::uint16_t > used_ids_
static const std::string str_hw_vid_
static const std::string str_hw_pid_
static const std::string str_usb_port_

Detailed Description

Base class to connected mouse devices.

Definition at line 60 of file mouse.h.


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