YARP
Yet Another Robot Platform
JoypadControlClient.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #include "JoypadControlClient.h"
10 #include <yarp/os/LogComponent.h>
11 #include <yarp/os/LogStream.h>
12 #include <tuple>
14 
15 using namespace yarp::dev;
16 using namespace yarp::sig;
17 using namespace yarp::os;
18 using namespace std;
19 
20 namespace {
21 YARP_LOG_COMPONENT(JOYPADCONTROLCLIENT, "yarp.device.JoypadControlClient")
22 }
23 
25 {
26  m_ports.push_back(&m_buttonsPort );
27  m_ports.push_back(&m_axisPort );
28  m_ports.push_back(&m_stickPort );
29  m_ports.push_back(&m_trackballPort);
30  m_ports.push_back(&m_touchPort );
31  m_ports.push_back(&m_hatsPort );
32  watchdog.m_ports = m_ports;
33 }
34 
35 bool JoypadControlClient::getJoypadInfo()
36 {
37  unsigned int count;
38  bool temp;
39 
40  temp = m_rpc_only;
41  m_rpc_only = true;
42  vector<tuple<int, JoypadControl::LoopablePort*, string> > vocabs_ports;
43  vocabs_ports.emplace_back(VOCAB_BUTTON, &m_buttonsPort, "/buttons");
44  vocabs_ports.emplace_back(VOCAB_AXIS, &m_axisPort, "/axis");
45  vocabs_ports.emplace_back(VOCAB_STICK, &m_stickPort, "/stick");
46  vocabs_ports.emplace_back(VOCAB_TRACKBALL, &m_trackballPort, "/trackballs");
47  vocabs_ports.emplace_back(VOCAB_TOUCH, &m_touchPort, "/touch");
48  vocabs_ports.emplace_back(VOCAB_HAT, &m_hatsPort, "/hat");
49 
50  for(auto vocab_port : vocabs_ports)
51  {
52  if(!getCount(get<0>(vocab_port), count)) return false;
53  if(count)
54  {
55  string source;
56  string destination;
57  std::string portname = m_local + get<2>(vocab_port) + ":i";
58  get<1>(vocab_port)->valid = true;
59  get<1>(vocab_port)->count = count;
60 
61  if(get<0>(vocab_port) == VOCAB_STICK)
62  {
63  for(unsigned int i = 0; i < count; i++)
64  {
65  unsigned int dofCount;
66  if(!getStickDoF(i, dofCount))
67  {
68  yCError(JOYPADCONTROLCLIENT) << "Unable to get sticks DoF";
69  return false;
70  }
71  m_stickDof.push_back(dofCount);
72  }
73  }
74 
75  yCInfo(JOYPADCONTROLCLIENT) << "Opening" << portname;
76 
77  if(!get<1>(vocab_port)->contactable->open(portname))
78  {
79  yCError(JOYPADCONTROLCLIENT) << "Unable to open" << portname << "port";
80  return false;
81  }
82 
83  source = m_remote + get<2>(vocab_port) + ":o";
84  destination = m_local + get<2>(vocab_port) + ":i";
85  if(!yarp::os::NetworkBase::connect(source.c_str(), destination.c_str(), "udp"))
86  {
87  yCError(JOYPADCONTROLCLIENT) << "Unable to connect" << portname << "port";
88  return false;
89  }
90 
91  get<1>(vocab_port)->useCallback();
92  }
93  }
94  m_rpc_only = temp;
95  return true;
96 }
97 
99 {
100  if(config.check("help"))
101  {
102  yCInfo(JOYPADCONTROLCLIENT) << "Parameter:\n\n" <<
103  "local - prefix of the local port\n" <<
104  "remote - prefix of the port provided to and opened by JoypadControlServer\n";
105  }
106  if(!config.check("local"))
107  {
108  yCError(JOYPADCONTROLCLIENT) << "Unable to 'local' parameter. check configuration file";
109  return false;
110  }
111 
112  m_local = config.find("local").asString();
113 
114  if(!m_rpcPort.open(m_local + "/rpc:o"))
115  {
116  yCError(JOYPADCONTROLCLIENT) << "Unable to open rpc port.";
117  return false;
118  }
119 
120  yCInfo(JOYPADCONTROLCLIENT) << "rpc port opened. starting the handshake";
121 
122  if(!config.check("remote"))
123  {
124  yCError(JOYPADCONTROLCLIENT) << "Unable to find the 'remote' parameter. check configuration file";
125  return false;
126  }
127 
128  m_remote = config.find("remote").asString();
129 
130  if(!yarp::os::NetworkBase::connect(m_local + "/rpc:o", m_remote + "/rpc:i"))
131  {
132  yCError(JOYPADCONTROLCLIENT) << "Handshake failed. unable to connect to remote port" << m_remote + "/rpc:i";
133  return false;
134  }
135 
136  yCInfo(JOYPADCONTROLCLIENT) << "Handshake succeeded! retrieving info";
137 
138  if(!getJoypadInfo())
139  {
140  yCError(JOYPADCONTROLCLIENT) << "Unable to get joypad info.";
141  return false;
142  }
143 
144  watchdog.start();
145 
146  return true;
147 }
148 
150 {
151  for (auto port : m_ports)
152  {
153  if (port->count)
154  {
155  port->onTimeout(0.5);
156  }
157  }
158 }
159 
160 bool JoypadControlClient::getCount(const int& vocab_toget, unsigned int& value)
161 {
162  if(!m_rpc_only)
163  {
164  switch(vocab_toget)
165  {
166  case VOCAB_BUTTON:
167  value = m_buttonsPort.count;
168  return true;
169 
170  case VOCAB_AXIS:
171 
172  value = m_axisPort.count;
173  return true;
174 
175  case VOCAB_TRACKBALL:
176  value = m_trackballPort.count;
177  return true;
178 
179  case VOCAB_TOUCH:
180 
181  value = m_touchPort.count;
182  return true;
183 
184  case VOCAB_STICK:
185 
186  value = m_stickPort.count;
187  return true;
188 
189  case VOCAB_HAT:
190 
191  value = m_hatsPort.count;
192  return true;
193 
194  default:
195  break;
196  }
197  }
198 
199  Bottle cmd, response;
201  cmd.addVocab(VOCAB_GET);
202  cmd.addVocab(vocab_toget);
203  cmd.addVocab(VOCAB_COUNT);
204  m_rpcPort.write(cmd, response);
205  if(response.get(0).asVocab() == VOCAB_OK && response .get(1).isInt32())
206  {
207  value = response.get(1).asInt32();
208  return true;
209  }
210  else
211  {
212  return false;
213  }
214 }
215 
216 bool JoypadControlClient::getRawButtonCount(unsigned int& button_count)
217 {
218  return getCount(VOCAB_BUTTON, button_count);
219 }
220 
221 bool JoypadControlClient::getRawAxisCount(unsigned int& axis_count)
222 {
223  return getCount(VOCAB_AXIS, axis_count);
224 }
225 
226 bool JoypadControlClient::getRawTrackballCount(unsigned int& Trackball_count)
227 {
228  return getCount(VOCAB_TRACKBALL, Trackball_count);
229 }
230 
231 bool JoypadControlClient::getRawHatCount(unsigned int& Hat_count)
232 {
233  return getCount(VOCAB_HAT, Hat_count);
234 }
235 
236 bool JoypadControlClient::getRawTouchSurfaceCount(unsigned int& touch_count)
237 {
238  return getCount(VOCAB_TOUCH, touch_count);
239 }
240 
241 bool JoypadControlClient::getRawStickCount(unsigned int& stick_count)
242 {
243  return getCount(VOCAB_STICK, stick_count);
244 }
245 
246 bool JoypadControlClient::getRawStickDoF(unsigned int stick_id, unsigned int& DoF)
247 {
248  Bottle cmd, response;
250  cmd.addVocab(VOCAB_GET);
252  cmd.addVocab(VOCAB_COUNT);
253  cmd.addInt32(stick_id);
254  m_rpcPort.write(cmd, response);
255  if(response.get(0).asVocab() == VOCAB_OK && response .get(1).isInt32())
256  {
257  DoF = response.get(1).asInt32();
258  return true;
259  }
260  else
261  {
262  return false;
263  }
264 }
265 
266 bool JoypadControlClient::getRawButton(unsigned int button_id, float& value)
267 {
268  if(m_rpc_only)
269  {
270  Bottle cmd, response;
271 
273  cmd.addVocab(VOCAB_GET);
274  cmd.addVocab(VOCAB_BUTTON);
275  cmd.addVocab(VOCAB_VALUE);
276  cmd.addInt32(button_id);
277  m_rpcPort.write(cmd, response);
278  if(response.get(0).asVocab() == VOCAB_OK && response .get(1).isFloat64())
279  {
280  value = response.get(1).asFloat64();
281  return true;
282  }
283  else
284  {
285  yCError(JOYPADCONTROLCLIENT) << "GetButton() error. VOCAB_FAILED";
286  return false;
287  }
288  }
289  else
290  {
291  std::lock_guard<std::mutex> l(m_buttonsPort.mutex);
292  if(button_id < m_buttonsPort.storage.size())
293  {
294  value = m_buttonsPort.storage[button_id];
295  return true;
296  }
297  else
298  {
299  yCError(JOYPADCONTROLCLIENT) << "GetButton() error. button_id out of bound";
300  return false;
301  }
302  }
303 }
304 
305 bool JoypadControlClient::getRawTrackball(unsigned int trackball_id, yarp::sig::Vector& value)
306 {
307  value.clear();
308  if(m_rpc_only)
309  {
310  Bottle cmd, response;
311 
313  cmd.addVocab(VOCAB_GET);
315  cmd.addVocab(VOCAB_VALUE);
316  cmd.addInt32(trackball_id);
317  m_rpcPort.write(cmd, response);
318  if(response.get(0).asVocab() == VOCAB_OK && response .get(1).isFloat64() && response.get(2).isFloat64())
319  {
320  value.push_back(response.get(1).asFloat64());
321  value.push_back(response.get(2).asFloat64());
322  return true;
323  }
324  else
325  {
326  return false;
327  }
328  }
329  else
330  {
331  std::lock_guard<std::mutex> l(m_trackballPort.mutex);
332  if(trackball_id < m_trackballPort.storage.size() / 2)
333  {
334  value.push_back(m_trackballPort.storage[trackball_id * 2]);
335  value.push_back(m_trackballPort.storage[trackball_id * 2 + 1]);
336  return true;
337  }
338  else
339  {
340  return false;
341  }
342  }
343 }
344 
345 bool JoypadControlClient::getRawHat(unsigned int hat_id, unsigned char& value)
346 {
347  if(m_rpc_only)
348  {
349  Bottle cmd, response;
350 
352  cmd.addVocab(VOCAB_GET);
353  cmd.addVocab(VOCAB_HAT);
354  cmd.addVocab(VOCAB_VALUE);
355  cmd.addInt32(hat_id);
356  m_rpcPort.write(cmd, response);
357  if(response.get(0).asVocab() == VOCAB_OK && response .get(1).isInt32())
358  {
359  value = response.get(1).asInt32();
360  return true;
361  }
362  else
363  {
364  return false;
365  }
366  }
367  else
368  {
369  std::lock_guard<std::mutex> l(m_hatsPort.mutex);
370  if(hat_id < m_hatsPort.storage.size())
371  {
372  value = m_hatsPort.storage[hat_id];
373  return true;
374  }
375  else
376  {
377  return false;
378  }
379  }
380 }
381 
382 bool JoypadControlClient::getRawAxis(unsigned int axis_id, double& value)
383 {
384  if(m_rpc_only)
385  {
386  Bottle cmd, response;
387 
389  cmd.addVocab(VOCAB_GET);
390  cmd.addVocab(VOCAB_AXIS);
391  cmd.addVocab(VOCAB_VALUE);
392  cmd.addInt32(axis_id);
393  m_rpcPort.write(cmd, response);
394  if(response.get(0).asVocab() == VOCAB_OK && response .get(1).isFloat64())
395  {
396  value = response.get(1).asFloat64();
397  return true;
398  }
399  else
400  {
401  yCError(JOYPADCONTROLCLIENT) << "GetAxis() error. VOCAB_FAILED";
402  return false;
403  }
404  }
405  else
406  {
407  std::lock_guard<std::mutex> l(m_axisPort.mutex);
408  if(axis_id < m_axisPort.storage.size())
409  {
410  value = m_axisPort.storage[axis_id];
411  return true;
412  }
413  else
414  {
415  yCError(JOYPADCONTROLCLIENT) << "GetAxis() error. Axis_id out of bound";
416  return false;
417  }
418  }
419 }
420 
421 bool JoypadControlClient::getRawStick(unsigned int stick_id, yarp::sig::Vector& value, JoypadCtrl_coordinateMode coordinate_mode)
422 {
423  value.clear();
424  if(m_rpc_only || coordinate_mode == IJoypadController::JypCtrlcoord_POLAR)
425  {
426  Bottle cmd, response;
427  int dof, coordmode;
428 
429  coordmode = coordinate_mode == IJoypadController::JypCtrlcoord_CARTESIAN ? VOCAB_CARTESIAN : VOCAB_POLAR;
431  cmd.addVocab(VOCAB_GET);
433  cmd.addVocab(VOCAB_VALUE);
434  cmd.addInt32(stick_id);
435  m_rpcPort.write(cmd, response);
436 
437  if(response.get(0).asVocab() == VOCAB_OK && response.get(1).isInt32())
438  {
439  dof = response.get(1).asInt32();
440  }
441  else
442  {
443  return false;
444  }
446  cmd.addVocab(VOCAB_GET);
447  cmd.addVocab(VOCAB_STICK);
448  cmd.addVocab(VOCAB_VALUE);
449  cmd.addVocab(coordmode);
450  cmd.addInt32(stick_id);
451  m_rpcPort.write(cmd, response);
452  if(response.get(0).asVocab() == VOCAB_OK)
453  {
454  for(int i = 0; i < dof; i++)
455  {
456  if(response.get(i).isFloat64())
457  {
458  value.push_back(response.get(i).asFloat64());
459  }
460  else
461  {
462  return false;
463  }
464  }
465  return true;
466  }
467  else
468  {
469  return false;
470  }
471  }
472  else
473  {
474  std::lock_guard<std::mutex> l(m_stickPort.mutex);
475  int offset = 0;
476 
477  unsigned int i;
478  if(getStickCount(i), stick_id >= i)
479  {
480  yCError(JOYPADCONTROLCLIENT) << "GetStick() error. Stick_id out of bound";
481  return false;
482  }
483  for(size_t j = 0; j < stick_id; j++)
484  {
485  offset += m_stickDof[j];
486  }
487 
488  for(size_t i = 0; i < m_stickDof[stick_id]; ++i)
489  {
490  value.push_back(m_stickPort.storage[offset + i]);
491  }
492 
493  return true;
494  }
495 }
496 
497 bool JoypadControlClient::getRawTouch(unsigned int touch_id, yarp::sig::Vector& value)
498 {
499  value.clear();
500  if(m_rpc_only)
501  {
502  Bottle cmd, response;
503 
505  cmd.addVocab(VOCAB_GET);
506  cmd.addVocab(VOCAB_TOUCH);
507  cmd.addVocab(VOCAB_VALUE);
508  cmd.addInt32(touch_id);
509  m_rpcPort.write(cmd, response);
510  if(response.get(0).asVocab() == VOCAB_OK && response .get(1).isFloat64() && response.get(2).isFloat64())
511  {
512  value.push_back(response.get(1).asFloat64());
513  value.push_back(response.get(2).asFloat64());
514  return true;
515  }
516  else
517  {
518  return false;
519  }
520  }
521  else
522  {
523  std::lock_guard<std::mutex> l(m_touchPort.mutex);
524  if(touch_id < m_touchPort.storage.size()/2)
525  {
526  value.push_back(m_touchPort.storage[touch_id * 2]);
527  value.push_back(m_touchPort.storage[touch_id * 2 + 1]);
528  return true;
529  }
530  else
531  {
532  return false;
533  }
534  }
535 }
536 
538 {
539 
540  vector<JoypadControl::LoopablePort*> portv;
541  portv.push_back(&m_buttonsPort);
542  portv.push_back(&m_axisPort);
543  portv.push_back(&m_hatsPort);
544  portv.push_back(&m_touchPort);
545  portv.push_back(&m_trackballPort);
546  portv.push_back(&m_stickPort);
547 
548  for(auto p : portv)
549  {
550  p->contactable->interrupt();
551  p->contactable->close();
552  }
553 
554  m_rpcPort.close();
555  return true;
556 }
yarp::os::Port::close
void close() override
Stop port activity.
Definition: Port.cpp:357
LogStream.h
yarp::dev::IJoypadController::JoypadCtrl_coordinateMode
JoypadCtrl_coordinateMode
Definition: IJoypadController.h:37
JoypadControlClient::getRawStickCount
bool getRawStickCount(unsigned int &stick_count) override
Definition: JoypadControlClient.cpp:241
yarp::os::Bottle
A simple collection of objects that can be described and transmitted in a portable way.
Definition: Bottle.h:73
yarp::dev::IJoypadEventDriven::getStickCount
bool getStickCount(unsigned int &stick_count) override final
get the number of the sticks
Definition: IJoypadController.cpp:312
yarp::os::Value::asVocab
virtual std::int32_t asVocab() const
Get vocabulary identifier as an integer.
Definition: Value.cpp:231
yarp::os::Searchable
A base class for nested structures that can be searched.
Definition: Searchable.h:69
VOCAB_STICKDOF
constexpr yarp::conf::vocab32_t VOCAB_STICKDOF
Definition: IJoypadController.h:294
JoypadControlClient::getRawStick
bool getRawStick(unsigned int stick_id, yarp::sig::Vector &value, JoypadCtrl_coordinateMode coordinate_mode) override
Definition: JoypadControlClient.cpp:421
yarp::sig
Signal processing.
Definition: Image.h:25
JoypadControlClient.h
JoypadControlClient::getRawTrackballCount
bool getRawTrackballCount(unsigned int &Trackball_count) override
Definition: JoypadControlClient.cpp:226
YARP_LOG_COMPONENT
#define YARP_LOG_COMPONENT(name,...)
Definition: LogComponent.h:80
VOCAB_GET
constexpr yarp::conf::vocab32_t VOCAB_GET
Definition: GenericVocabs.h:16
JoypadControlClient::getRawButton
bool getRawButton(unsigned int button_id, float &value) override
Definition: JoypadControlClient.cpp:266
VOCAB_TRACKBALL
constexpr yarp::conf::vocab32_t VOCAB_TRACKBALL
Definition: IJoypadController.h:290
JoypadControlClient::getRawTouchSurfaceCount
bool getRawTouchSurfaceCount(unsigned int &touch_count) override
Definition: JoypadControlClient.cpp:236
yarp::os::Port::open
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
Definition: Port.cpp:82
yarp::sig::VectorOf::clear
void clear()
Definition: Vector.h:521
JoypadControlWatchdog::m_ports
std::vector< JoypadControl::LoopablePort * > m_ports
Definition: JoypadControlClient.h:25
JoypadControlWatchdog::run
void run() override
Loop function.
Definition: JoypadControlClient.cpp:149
yarp::dev
An interface for the device drivers.
Definition: audioBufferSizeData.cpp:17
yarp::sig::VectorOf< double >
JoypadControlClient::getRawHatCount
bool getRawHatCount(unsigned int &Hat_count) override
Definition: JoypadControlClient.cpp:231
VOCAB_POLAR
constexpr yarp::conf::vocab32_t VOCAB_POLAR
Definition: IJoypadController.h:296
JoypadControlClient::close
bool close() override
Close the DeviceDriver.
Definition: JoypadControlClient.cpp:537
VOCAB_VALUE
constexpr yarp::conf::vocab32_t VOCAB_VALUE
Definition: GenericVocabs.h:41
yarp::os::Bottle::get
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Definition: Bottle.cpp:249
VOCAB_BUTTON
constexpr yarp::conf::vocab32_t VOCAB_BUTTON
Definition: IJoypadController.h:289
yarp::os::Value::isFloat64
virtual bool isFloat64() const
Checks if value is a 64-bit floating point number.
Definition: Value.cpp:153
yarp::dev::IJoypadEventDriven::getStickDoF
bool getStickDoF(unsigned int stick_id, unsigned int &DoF) override final
Get the Degree Of Freedom count for desired stick.
Definition: IJoypadController.cpp:317
JoypadControlClient::getRawButtonCount
bool getRawButtonCount(unsigned int &button_count) override
Definition: JoypadControlClient.cpp:216
JoypadControlClient::getRawAxisCount
bool getRawAxisCount(unsigned int &axis_count) override
Definition: JoypadControlClient.cpp:221
yarp::os::Value::asString
virtual std::string asString() const
Get string value.
Definition: Value.cpp:237
JoypadControlClient::getRawAxis
bool getRawAxis(unsigned int axis_id, double &value) override
Definition: JoypadControlClient.cpp:382
yarp::os::NetworkBase::connect
static bool connect(const std::string &src, const std::string &dest, const std::string &carrier="", bool quiet=true)
Request that an output port connect to an input port.
Definition: Network.cpp:685
yarp::os::PeriodicThread::start
bool start()
Call this to start the thread.
Definition: PeriodicThread.cpp:311
JoypadControlClient::getRawTouch
bool getRawTouch(unsigned int touch_id, yarp::sig::Vector &value) override
Definition: JoypadControlClient.cpp:497
VOCAB_AXIS
constexpr yarp::conf::vocab32_t VOCAB_AXIS
Definition: IJoypadController.h:292
yarp::os::Searchable::check
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
VOCAB_TOUCH
constexpr yarp::conf::vocab32_t VOCAB_TOUCH
Definition: IJoypadController.h:295
yarp::os::Searchable::find
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
JoypadControlClient::open
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
Definition: JoypadControlClient.cpp:98
yarp::os::Bottle::addInt32
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
Definition: Bottle.cpp:143
DriverLinkCreator.h
yarp::os::Bottle::addVocab
void addVocab(int x)
Places a vocabulary item in the bottle, at the end of the list.
Definition: Bottle.cpp:167
LogComponent.h
VOCAB_CARTESIAN
constexpr yarp::conf::vocab32_t VOCAB_CARTESIAN
Definition: IJoypadController.h:297
VOCAB_HAT
constexpr yarp::conf::vocab32_t VOCAB_HAT
Definition: IJoypadController.h:291
yCError
#define yCError(component,...)
Definition: LogComponent.h:157
yarp::os::Value::asInt32
virtual std::int32_t asInt32() const
Get 32-bit integer value.
Definition: Value.cpp:207
yarp::os::Port::write
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
Definition: Port.cpp:430
yCInfo
#define yCInfo(component,...)
Definition: LogComponent.h:135
yarp::os
An interface to the operating system, including Port based communication.
Definition: AbstractCarrier.h:17
VOCAB_COUNT
constexpr yarp::conf::vocab32_t VOCAB_COUNT
Definition: GenericVocabs.h:40
JoypadControlClient::getRawHat
bool getRawHat(unsigned int hat_id, unsigned char &value) override
Definition: JoypadControlClient.cpp:345
JoypadControlClient::getRawStickDoF
bool getRawStickDoF(unsigned int stick_id, unsigned int &DoF) override
Definition: JoypadControlClient.cpp:246
VOCAB_IJOYPADCTRL
constexpr yarp::conf::vocab32_t VOCAB_IJOYPADCTRL
Definition: IJoypadController.h:287
JoypadControlClient::JoypadControlClient
JoypadControlClient()
Definition: JoypadControlClient.cpp:24
VOCAB_STICK
constexpr yarp::conf::vocab32_t VOCAB_STICK
Definition: IJoypadController.h:293
yarp::os::Value::asFloat64
virtual yarp::conf::float64_t asFloat64() const
Get 64-bit floating point value.
Definition: Value.cpp:225
yarp::sig::VectorOf::push_back
void push_back(const T &elem)
Push a new element in the vector: size is changed.
Definition: Vector.h:282
JoypadControlClient::getRawTrackball
bool getRawTrackball(unsigned int trackball_id, yarp::sig::Vector &value) override
Definition: JoypadControlClient.cpp:305
VOCAB_OK
constexpr yarp::conf::vocab32_t VOCAB_OK
Definition: GenericVocabs.h:18
yarp::os::Value::isInt32
virtual bool isInt32() const
Checks if value is a 32-bit integer.
Definition: Value.cpp:135