YARP
Yet Another Robot Platform

JoypadControlClient: joypad input network wrapper on client side More...

#include <JoypadControlClient/JoypadControlClient.h>

+ Inheritance diagram for JoypadControlClient:

Public Member Functions

 JoypadControlClient ()
 
 JoypadControlClient (const JoypadControlClient &)=delete
 
 JoypadControlClient (JoypadControlClient &&)=delete
 
JoypadControlClientoperator= (const JoypadControlClient &)=delete
 
JoypadControlClientoperator= (JoypadControlClient &&)=delete
 
 ~JoypadControlClient () override=default
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool close () override
 Close the DeviceDriver. More...
 
bool getRawAxisCount (unsigned int &axis_count) override
 
bool getRawButtonCount (unsigned int &button_count) override
 
bool getRawTrackballCount (unsigned int &Trackball_count) override
 
bool getRawHatCount (unsigned int &Hat_count) override
 
bool getRawTouchSurfaceCount (unsigned int &touch_count) override
 
bool getRawStickCount (unsigned int &stick_count) override
 
bool getRawStickDoF (unsigned int stick_id, unsigned int &DoF) override
 
bool getRawButton (unsigned int button_id, float &value) override
 
bool getRawTrackball (unsigned int trackball_id, yarp::sig::Vector &value) override
 
bool getRawHat (unsigned int hat_id, unsigned char &value) override
 
bool getRawAxis (unsigned int axis_id, double &value) override
 
bool getRawStick (unsigned int stick_id, yarp::sig::Vector &value, JoypadCtrl_coordinateMode coordinate_mode) override
 
bool getRawTouch (unsigned int touch_id, yarp::sig::Vector &value) override
 
- Public Member Functions inherited from yarp::dev::IJoypadEventDriven
bool getAxisCount (unsigned int &axis_count) override final
 Get number of axes. More...
 
bool getButtonCount (unsigned int &button_count) override final
 Get number of buttons. More...
 
bool getTrackballCount (unsigned int &Trackball_count) override final
 Get number of trackballs. More...
 
bool getHatCount (unsigned int &Hat_count) override final
 Get number of hats. More...
 
bool getTouchSurfaceCount (unsigned int &touch_count) override final
 Get the number of touch surface. More...
 
bool getStickCount (unsigned int &stick_count) override final
 Get the number of the sticks. More...
 
bool getStickDoF (unsigned int stick_id, unsigned int &DoF) override final
 Get the Degree Of Freedom count for desired stick. More...
 
bool getButton (unsigned int button_id, float &value) override final
 Get the value of a button. More...
 
bool getTrackball (unsigned int trackball_id, yarp::sig::Vector &value) override final
 Get the axes change of a Trackball. More...
 
bool getHat (unsigned int hat_id, unsigned char &value) override final
 Get the value of an Hat. More...
 
bool getAxis (unsigned int axis_id, double &value) override final
 Get the value of an axis if present, return false otherwise. More...
 
bool getStick (unsigned int stick_id, yarp::sig::Vector &value, JoypadCtrl_coordinateMode coordinate_mode) override final
 Get the value of a stick if present, return false otherwise. More...
 
bool getTouch (unsigned int touch_id, yarp::sig::Vector &value) override final
 Get the value of a touch if present, return false otherwise. More...
 
 IJoypadEventDriven ()
 
 IJoypadEventDriven (int rate)
 
 IJoypadEventDriven (double period)
 
bool threadInit () override final
 Initialization method. More...
 
void run () override final
 Loop function. More...
 
bool eventDriven (bool enable, yarp::dev::IJoypadEvent *event=nullptr) override
 Activate event Driven mode. More...
 
bool isEventDriven () override
 
- Public Member Functions inherited from yarp::dev::IJoypadController
virtual ~IJoypadController ()=default
 Destructor. More...
 
virtual bool eventDriven (bool enable, yarp::dev::IJoypadEvent *event=nullptr)
 Activate event Driven mode. More...
 
virtual bool isEventDriven ()
 
virtual bool getAxisCount (unsigned int &axis_count)=0
 Get number of axes. More...
 
virtual bool getButtonCount (unsigned int &button_count)=0
 Get number of buttons. More...
 
virtual bool getTrackballCount (unsigned int &Trackball_count)=0
 Get number of trackballs. More...
 
virtual bool getHatCount (unsigned int &Hat_count)=0
 Get number of hats. More...
 
virtual bool getTouchSurfaceCount (unsigned int &touch_count)=0
 Get the number of touch surface. More...
 
virtual bool getStickCount (unsigned int &stick_count)=0
 Get the number of the sticks. More...
 
virtual bool getStickDoF (unsigned int stick_id, unsigned int &DoF)=0
 Get the Degree Of Freedom count for desired stick. More...
 
virtual bool getButton (unsigned int button_id, float &value)=0
 Get the value of a button. More...
 
virtual bool getTrackball (unsigned int trackball_id, yarp::sig::Vector &value)=0
 Get the axes change of a Trackball. More...
 
virtual bool getHat (unsigned int hat_id, unsigned char &value)=0
 Get the value of an Hat. More...
 
virtual bool getAxis (unsigned int axis_id, double &value)=0
 Get the value of an axis if present, return false otherwise. More...
 
virtual bool getStick (unsigned int stick_id, yarp::sig::Vector &value, JoypadCtrl_coordinateMode coordinate_mode)=0
 Get the value of a stick if present, return false otherwise. More...
 
virtual bool getTouch (unsigned int touch_id, yarp::sig::Vector &value)=0
 Get the value of a touch if present, return false otherwise. More...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
 ~DeviceDriver () override
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver. More...
 
bool close () override
 Close the DeviceDriver. More...
 
virtual std::string id () const
 Return the id assigned to the PolyDriver. More...
 
virtual void setId (const std::string &id)
 Set the id for this device. More...
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver. More...
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others. More...
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor. More...
 
virtual bool open (Searchable &config)
 Initialize the object. More...
 
virtual bool close ()
 Shut the object down. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 

Additional Inherited Members

- Public Types inherited from yarp::dev::IJoypadEventDriven
enum  JoypadCtrl_coordinateMode
 
- Public Types inherited from yarp::dev::IJoypadController
enum  JoypadCtrl_coordinateMode {
  JypCtrlcoord_POLAR = 0 ,
  JypCtrlcoord_CARTESIAN = 1
}
 
- Protected Member Functions inherited from yarp::dev::IJoypadEventDriven
virtual bool getRawAxisCount (unsigned int &axis_count)=0
 
virtual bool getRawButtonCount (unsigned int &button_count)=0
 
virtual bool getRawTrackballCount (unsigned int &Trackball_count)=0
 
virtual bool getRawHatCount (unsigned int &Hat_count)=0
 
virtual bool getRawTouchSurfaceCount (unsigned int &touch_count)=0
 
virtual bool getRawStickCount (unsigned int &stick_count)=0
 
virtual bool getRawStickDoF (unsigned int stick_id, unsigned int &DoF)=0
 
virtual bool getRawButton (unsigned int button_id, float &value)=0
 
virtual bool getRawTrackball (unsigned int trackball_id, yarp::sig::Vector &value)=0
 
virtual bool getRawHat (unsigned int hat_id, unsigned char &value)=0
 
virtual bool getRawAxis (unsigned int axis_id, double &value)=0
 
virtual bool getRawStick (unsigned int stick_id, yarp::sig::Vector &value, JoypadCtrl_coordinateMode coordinate_mode)=0
 
virtual bool getRawTouch (unsigned int touch_id, yarp::sig::Vector &value)=0
 
virtual bool executeAction (int action_id)
 
virtual bool parseActions (const yarp::os::Searchable &cfg, int *count=nullptr)
 
virtual bool parseActions (const yarp::os::Searchable &cfg, int *count=nullptr)
 
virtual bool executeAction (int action_id)
 
- Protected Attributes inherited from yarp::dev::IJoypadEventDriven
std::map< int, std::string > m_actions
 
- Protected Attributes inherited from yarp::dev::IJoypadController
std::map< int, std::string > m_actions
 

Detailed Description

JoypadControlClient: joypad input network wrapper on client side

Description of input parameters

Parameters accepted in the config argument of the open method:

Parameter name Type Units Default Value Required Description Notes
local string yes name for the local port to open
remote string yes name of the remote server port to connect to

Definition at line 40 of file JoypadControlClient.h.

Constructor & Destructor Documentation

◆ JoypadControlClient() [1/3]

JoypadControlClient::JoypadControlClient ( )

Definition at line 20 of file JoypadControlClient.cpp.

◆ JoypadControlClient() [2/3]

JoypadControlClient::JoypadControlClient ( const JoypadControlClient )
delete

◆ JoypadControlClient() [3/3]

JoypadControlClient::JoypadControlClient ( JoypadControlClient &&  )
delete

◆ ~JoypadControlClient()

JoypadControlClient::~JoypadControlClient ( )
overridedefault

Member Function Documentation

◆ close()

bool JoypadControlClient::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 535 of file JoypadControlClient.cpp.

◆ getRawAxis()

bool JoypadControlClient::getRawAxis ( unsigned int  axis_id,
double &  value 
)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 380 of file JoypadControlClient.cpp.

◆ getRawAxisCount()

bool JoypadControlClient::getRawAxisCount ( unsigned int &  axis_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 219 of file JoypadControlClient.cpp.

◆ getRawButton()

bool JoypadControlClient::getRawButton ( unsigned int  button_id,
float &  value 
)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 264 of file JoypadControlClient.cpp.

◆ getRawButtonCount()

bool JoypadControlClient::getRawButtonCount ( unsigned int &  button_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 214 of file JoypadControlClient.cpp.

◆ getRawHat()

bool JoypadControlClient::getRawHat ( unsigned int  hat_id,
unsigned char &  value 
)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 343 of file JoypadControlClient.cpp.

◆ getRawHatCount()

bool JoypadControlClient::getRawHatCount ( unsigned int &  Hat_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 229 of file JoypadControlClient.cpp.

◆ getRawStick()

bool JoypadControlClient::getRawStick ( unsigned int  stick_id,
yarp::sig::Vector value,
JoypadCtrl_coordinateMode  coordinate_mode 
)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 419 of file JoypadControlClient.cpp.

◆ getRawStickCount()

bool JoypadControlClient::getRawStickCount ( unsigned int &  stick_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 239 of file JoypadControlClient.cpp.

◆ getRawStickDoF()

bool JoypadControlClient::getRawStickDoF ( unsigned int  stick_id,
unsigned int &  DoF 
)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 244 of file JoypadControlClient.cpp.

◆ getRawTouch()

bool JoypadControlClient::getRawTouch ( unsigned int  touch_id,
yarp::sig::Vector value 
)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 495 of file JoypadControlClient.cpp.

◆ getRawTouchSurfaceCount()

bool JoypadControlClient::getRawTouchSurfaceCount ( unsigned int &  touch_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 234 of file JoypadControlClient.cpp.

◆ getRawTrackball()

bool JoypadControlClient::getRawTrackball ( unsigned int  trackball_id,
yarp::sig::Vector value 
)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 303 of file JoypadControlClient.cpp.

◆ getRawTrackballCount()

bool JoypadControlClient::getRawTrackballCount ( unsigned int &  Trackball_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 224 of file JoypadControlClient.cpp.

◆ open()

bool JoypadControlClient::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 96 of file JoypadControlClient.cpp.

◆ operator=() [1/2]

JoypadControlClient & JoypadControlClient::operator= ( const JoypadControlClient )
delete

◆ operator=() [2/2]

JoypadControlClient & JoypadControlClient::operator= ( JoypadControlClient &&  )
delete

The documentation for this class was generated from the following files: