GamepadInfo Class Reference

Gamepad handler class. More...

#include <manager_gui.h>

List of all members.

Public Member Functions

 GamepadInfo (std::string active_path=ros::package::getPath("atlascar_base")+"/images/xbox-360-controller_active_tumb.png")
 Class constructor.
bool initializeGamepad ()
 Start communications with the gamepad and register callbacks.
bool stateManager ()
 Graphical representation state manager.
bool touch ()
 Mark gamepad activity.
 ~GamepadInfo ()
 Class destructor.

Public Attributes

std::string device_
 Gamepad device parameter.
sigc::slot< void, const
atlascar_base::ManagerCommandPtr > 
event_
 Event slot, this event will be called when there is activity with the gamepad.

Protected Member Functions

void gamepadAutoBrakeCallback (int value)
 Gamepad auto brake handler.
void gamepadAutoClutchCallback (int value)
 Gamepad auto clutch handler.
void gamepadAutoDirectionCallback (int value)
 Gamepad auto direction handler.
void gamepadAutoThrottleCallback (int value)
 Gamepad auto throttle handler.
void gamepadBrakeCallback (int value)
 Gamepad brake handler.
void gamepadClutchCallback (int value)
 Gamepad clutch handler.
void gamepadHighLightCallback (int value)
 Gamepad high light handler.
void gamepadIgnitionOFFCallback (int value)
 Gamepad ignition off handler.
void gamepadIgnitionONCallback (int value)
 Gamepad ignition on handler.
void gamepadLeftLightCallback (int value)
 Gamepad left light handler.
void gamepadMediumLightCallback (int value)
 Gamepad medium light handler.
void gamepadRightLightCallback (int value)
 Gamepad right light handler.
void gamepadSteeringWheelCallback (int value)
 Gamepad steering wheel handler.
void gamepadThrottleCallback (int value)
 Gamepad throttle handler.
void gamepadWarningCallback (int value)
 Gamepad warning light handler.
double map (double value, double min_value, double max_value, double min_required, double max_required)
 Linear mapping function.
virtual bool on_draw (const Cairo::RefPtr< Cairo::Context > &cr)
 On draw signal handler.

Protected Attributes

bool active_
 Status of the gamepad connection.
Glib::RefPtr< Gdk::Pixbuf > active_image_
 Pixbuf that hold the gamepad active thumbnail.
std::string active_path_
 Path to the gamepad image thumbnail.
Glib::RefPtr< Gdk::Pixbuf > auxiliary_image_
 Pixbuf that hold the gamepad auxiliary thumbnail.
atlascar_base::ManagerCommandPtr command_
 Outgoing manager command variable.
ros::Duration fade_
 Fade duration.
Gamepad gamepad_
 Gamepad communication class.
Glib::RefPtr< Gdk::Pixbuf > not_active_image_
 Pixbuf that hold the gamepad not active thumbnail.
ros::Time ta_
 Last activity time.

Detailed Description

Gamepad handler class.

This class handles communications with the gamepad, as well as the graphical representation of the gamepad. This class inherits a Gtk::DrawingArea

Definition at line 350 of file manager_gui.h.


Constructor & Destructor Documentation

GamepadInfo::GamepadInfo ( std::string  active_path = ros::package::getPath("atlascar_base")+"/images/xbox-360-controller_active_tumb.png"  )  [inline]

Class constructor.

This constructor receives the path to the gamepad image thumbnail. It also initializes variables and state images.

Definition at line 359 of file manager_gui.h.

GamepadInfo::~GamepadInfo (  )  [inline]

Class destructor.

Does nothing.

Definition at line 409 of file manager_gui.h.


Member Function Documentation

void GamepadInfo::gamepadAutoBrakeCallback ( int  value  )  [inline, protected]

Gamepad auto brake handler.

Parameters:
value button value

Gamepad auto brake event handler. This function is called every time the gamepad changes the auto brake value.

Definition at line 794 of file manager_gui.h.

void GamepadInfo::gamepadAutoClutchCallback ( int  value  )  [inline, protected]

Gamepad auto clutch handler.

Parameters:
value button value

Gamepad auto clutch event handler. This function is called every time the gamepad changes the auto clutch value.

Definition at line 811 of file manager_gui.h.

void GamepadInfo::gamepadAutoDirectionCallback ( int  value  )  [inline, protected]

Gamepad auto direction handler.

Parameters:
value button value

Gamepad auto direction event handler. This function is called every time the gamepad changes the auto direction value.

Definition at line 760 of file manager_gui.h.

void GamepadInfo::gamepadAutoThrottleCallback ( int  value  )  [inline, protected]

Gamepad auto throttle handler.

Parameters:
value button value

Gamepad auto throttle event handler. This function is called every time the gamepad changes the auto throttle value.

Definition at line 777 of file manager_gui.h.

void GamepadInfo::gamepadBrakeCallback ( int  value  )  [inline, protected]

Gamepad brake handler.

Parameters:
value button value

Gamepad brake event handler. This function is called every time the gamepad changes the brake value.

Definition at line 588 of file manager_gui.h.

void GamepadInfo::gamepadClutchCallback ( int  value  )  [inline, protected]

Gamepad clutch handler.

Parameters:
value button value

Gamepad clutch event handler. This function is called every time the gamepad changes the clutch value.

Definition at line 603 of file manager_gui.h.

void GamepadInfo::gamepadHighLightCallback ( int  value  )  [inline, protected]

Gamepad high light handler.

Parameters:
value button value

Gamepad high light event handler. This function is called every time the gamepad changes the high light value.

Definition at line 709 of file manager_gui.h.

void GamepadInfo::gamepadIgnitionOFFCallback ( int  value  )  [inline, protected]

Gamepad ignition off handler.

Parameters:
value button value

Gamepad ignition off event handler. This function is called every time the gamepad changes the ignition off value.

Definition at line 658 of file manager_gui.h.

void GamepadInfo::gamepadIgnitionONCallback ( int  value  )  [inline, protected]

Gamepad ignition on handler.

Parameters:
value button value

Gamepad ignition on event handler. This function is called every time the gamepad changes the ignition on value.

Definition at line 641 of file manager_gui.h.

void GamepadInfo::gamepadLeftLightCallback ( int  value  )  [inline, protected]

Gamepad left light handler.

Parameters:
value button value

Gamepad left light event handler. This function is called every time the gamepad changes the left light value.

Definition at line 675 of file manager_gui.h.

void GamepadInfo::gamepadMediumLightCallback ( int  value  )  [inline, protected]

Gamepad medium light handler.

Parameters:
value button value

Gamepad medium light event handler. This function is called every time the gamepad changes the medium light value.

Definition at line 726 of file manager_gui.h.

void GamepadInfo::gamepadRightLightCallback ( int  value  )  [inline, protected]

Gamepad right light handler.

Parameters:
value button value

Gamepad right light event handler. This function is called every time the gamepad changes the right light value.

Definition at line 692 of file manager_gui.h.

void GamepadInfo::gamepadSteeringWheelCallback ( int  value  )  [inline, protected]

Gamepad steering wheel handler.

Parameters:
value button value

Gamepad steering wheel event handler. This function is called every time the gamepad changes the steering wheel value.

Definition at line 626 of file manager_gui.h.

void GamepadInfo::gamepadThrottleCallback ( int  value  )  [inline, protected]

Gamepad throttle handler.

Parameters:
value button value

Gamepad throttle event handler. This function is called every time the gamepad changes the throttle value.

Definition at line 573 of file manager_gui.h.

void GamepadInfo::gamepadWarningCallback ( int  value  )  [inline, protected]

Gamepad warning light handler.

Parameters:
value button value

Gamepad warning light event handler. This function is called every time the gamepad changes the warning light value.

Definition at line 743 of file manager_gui.h.

bool GamepadInfo::initializeGamepad (  )  [inline]

Start communications with the gamepad and register callbacks.

This function initializes the communication with the gamepad and also registers all the callbacks to all the buttons and axes.

Definition at line 418 of file manager_gui.h.

double GamepadInfo::map ( double  value,
double  min_value,
double  max_value,
double  min_required,
double  max_required 
) [inline, protected]

Linear mapping function.

Parameters:
value input value
min_value minimum value in the old scale
max_value maximum value in the old scale
min_required minimum value in the requested scale
max_required maximum value in the requested scale
Returns:
the remapped value

This function maps a value to a different scale.

Definition at line 519 of file manager_gui.h.

virtual bool GamepadInfo::on_draw ( const Cairo::RefPtr< Cairo::Context > &  cr  )  [inline, protected, virtual]

On draw signal handler.

Parameters:
cr cairo context

This function is called every time there is a redraw event on the DrawingArea.

Definition at line 536 of file manager_gui.h.

bool GamepadInfo::stateManager (  )  [inline]

Graphical representation state manager.

This function manages the current status of the image representation according to the most recent activity of the gamepad.

Definition at line 461 of file manager_gui.h.

bool GamepadInfo::touch (  )  [inline]

Mark gamepad activity.

This function updates the most recent use of the gamepad.

Definition at line 494 of file manager_gui.h.


Member Data Documentation

bool GamepadInfo::active_ [protected]

Status of the gamepad connection.

Definition at line 832 of file manager_gui.h.

Glib::RefPtr<Gdk::Pixbuf> GamepadInfo::active_image_ [protected]

Pixbuf that hold the gamepad active thumbnail.

Definition at line 825 of file manager_gui.h.

std::string GamepadInfo::active_path_ [protected]

Path to the gamepad image thumbnail.

Definition at line 823 of file manager_gui.h.

Glib::RefPtr<Gdk::Pixbuf> GamepadInfo::auxiliary_image_ [protected]

Pixbuf that hold the gamepad auxiliary thumbnail.

Definition at line 829 of file manager_gui.h.

atlascar_base::ManagerCommandPtr GamepadInfo::command_ [protected]

Outgoing manager command variable.

Definition at line 840 of file manager_gui.h.

std::string GamepadInfo::device_

Gamepad device parameter.

Definition at line 502 of file manager_gui.h.

sigc::slot<void,const atlascar_base::ManagerCommandPtr> GamepadInfo::event_

Event slot, this event will be called when there is activity with the gamepad.

Definition at line 504 of file manager_gui.h.

ros::Duration GamepadInfo::fade_ [protected]

Fade duration.

Definition at line 836 of file manager_gui.h.

Gamepad communication class.

Definition at line 838 of file manager_gui.h.

Glib::RefPtr<Gdk::Pixbuf> GamepadInfo::not_active_image_ [protected]

Pixbuf that hold the gamepad not active thumbnail.

Definition at line 827 of file manager_gui.h.

ros::Time GamepadInfo::ta_ [protected]

Last activity time.

Definition at line 834 of file manager_gui.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


atlascar_base
Author(s): Jorge Almeida, Miguel Oliveira, Pedro Salvado, Andre Oliveira and Pedro Pinheiro
autogenerated on Wed Jul 23 04:34:34 2014