YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches

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

#include <networkWrappers/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.
 
bool close () override
 Close the DeviceDriver.
 
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.
 
bool getButtonCount (unsigned int &button_count) override final
 Get number of buttons.
 
bool getTrackballCount (unsigned int &Trackball_count) override final
 Get number of trackballs.
 
bool getHatCount (unsigned int &Hat_count) override final
 Get number of hats.
 
bool getTouchSurfaceCount (unsigned int &touch_count) override final
 Get the number of touch surface.
 
bool getStickCount (unsigned int &stick_count) override final
 Get the number of the sticks.
 
bool getStickDoF (unsigned int stick_id, unsigned int &DoF) override final
 Get the Degree Of Freedom count for desired stick.
 
bool getButton (unsigned int button_id, float &value) override final
 Get the value of a button.
 
bool getTrackball (unsigned int trackball_id, yarp::sig::Vector &value) override final
 Get the axes change of a Trackball.
 
bool getHat (unsigned int hat_id, unsigned char &value) override final
 Get the value of an Hat.
 
bool getAxis (unsigned int axis_id, double &value) override final
 Get the value of an axis if present, return false otherwise.
 
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.
 
bool getTouch (unsigned int touch_id, yarp::sig::Vector &value) override final
 Get the value of a touch if present, return false otherwise.
 
 IJoypadEventDriven ()
 
 IJoypadEventDriven (int rate)
 
 IJoypadEventDriven (double period)
 
bool threadInit () override final
 Initialization method.
 
void run () override final
 Loop function.
 
bool eventDriven (bool enable, yarp::dev::IJoypadEvent *event=nullptr) override
 Activate event Driven mode.
 
bool isEventDriven () override
 
- Public Member Functions inherited from yarp::dev::IJoypadController
virtual ~IJoypadController ()=default
 Destructor.
 
- 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
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from JoypadControlClient_ParamsParser
 JoypadControlClient_ParamsParser ()
 
 ~JoypadControlClient_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

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
}
 
- Public Attributes inherited from JoypadControlClient_ParamsParser
const std::string m_device_classname = {"JoypadControlClient"}
 
const std::string m_device_name = {"JoypadControlClient"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
const std::string m_local_defaultValue = {""}
 
const std::string m_remote_defaultValue = {""}
 
std::string m_local = {}
 
std::string m_remote = {}
 
- 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 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 required by this device are shown in class: JoypadControlClient_ParamsParser

Definition at line 37 of file JoypadControlClient.h.

Constructor & Destructor Documentation

◆ JoypadControlClient() [1/3]

JoypadControlClient::JoypadControlClient ( )

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

◆ getRawAxis()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 358 of file JoypadControlClient.cpp.

◆ getRawAxisCount()

bool JoypadControlClient::getRawAxisCount ( unsigned int axis_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 197 of file JoypadControlClient.cpp.

◆ getRawButton()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 242 of file JoypadControlClient.cpp.

◆ getRawButtonCount()

bool JoypadControlClient::getRawButtonCount ( unsigned int button_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 192 of file JoypadControlClient.cpp.

◆ getRawHat()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 321 of file JoypadControlClient.cpp.

◆ getRawHatCount()

bool JoypadControlClient::getRawHatCount ( unsigned int Hat_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

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

◆ getRawStickCount()

bool JoypadControlClient::getRawStickCount ( unsigned int stick_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 217 of file JoypadControlClient.cpp.

◆ getRawStickDoF()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 222 of file JoypadControlClient.cpp.

◆ getRawTouch()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 473 of file JoypadControlClient.cpp.

◆ getRawTouchSurfaceCount()

bool JoypadControlClient::getRawTouchSurfaceCount ( unsigned int touch_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 212 of file JoypadControlClient.cpp.

◆ getRawTrackball()

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

Implements yarp::dev::IJoypadEventDriven.

Definition at line 281 of file JoypadControlClient.cpp.

◆ getRawTrackballCount()

bool JoypadControlClient::getRawTrackballCount ( unsigned int Trackball_count)
overridevirtual

Implements yarp::dev::IJoypadEventDriven.

Definition at line 202 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 95 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: