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...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 ~DeviceDriver () override=default
 Destructor. 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 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 executeAction (int action_id)
 
virtual bool parseActions (const yarp::os::Searchable &cfg, int *count=nullptr)
 
- Protected Member Functions inherited from yarp::dev::IJoypadController
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 21 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 536 of file JoypadControlClient.cpp.

◆ getRawAxis()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 381 of file JoypadControlClient.cpp.

◆ getRawAxisCount()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 220 of file JoypadControlClient.cpp.

◆ getRawButton()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 265 of file JoypadControlClient.cpp.

◆ getRawButtonCount()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 215 of file JoypadControlClient.cpp.

◆ getRawHat()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 344 of file JoypadControlClient.cpp.

◆ getRawHatCount()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 230 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 420 of file JoypadControlClient.cpp.

◆ getRawStickCount()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 240 of file JoypadControlClient.cpp.

◆ getRawStickDoF()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 245 of file JoypadControlClient.cpp.

◆ getRawTouch()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 496 of file JoypadControlClient.cpp.

◆ getRawTouchSurfaceCount()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 235 of file JoypadControlClient.cpp.

◆ getRawTrackball()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 304 of file JoypadControlClient.cpp.

◆ getRawTrackballCount()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 225 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 97 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: