YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
JoypadControlServer.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
7#include <map>
8#include <vector>
10#include <yarp/os/LogStream.h>
11
12#define DEFAULT_THREAD_PERIOD 0.010 //s
13
14using namespace yarp::dev;
15using namespace yarp::os;
16using namespace yarp::sig;
17
18namespace {
19YARP_LOG_COMPONENT(JOYPADCONTROLSERVER, "yarp.device.JoypadControlServer")
20}
21
22
24{
25 m_countGetters.insert(std::make_pair(VOCAB_BUTTON, &IJoypadController::getButtonCount));
26 m_countGetters.insert(std::make_pair(VOCAB_HAT, &IJoypadController::getHatCount));
27 m_countGetters.insert(std::make_pair(VOCAB_TRACKBALL, &IJoypadController::getTrackballCount));
28 m_countGetters.insert(std::make_pair(VOCAB_AXIS, &IJoypadController::getAxisCount));
29 m_countGetters.insert(std::make_pair(VOCAB_STICK, &IJoypadController::getStickCount));
30 m_countGetters.insert(std::make_pair(VOCAB_TOUCH, &IJoypadController::getTouchSurfaceCount));
31}
32
33inline void cat(Vector& a, const Vector& b)
34{
35 for (size_t i = 0; i < b.size(); i++)
36 {
37 a.push_back(b[i]);
38 }
39}
40
42{
43 bool ret;
44 if(interface)
45 {
46 m_device = interface;
47 ret = true;
48 }
49 else
50 {
51 m_device = nullptr;
52 ret = false;
53 }
54
55 return ret;
56}
57
59{
60 bool ret;
61
62 ret = false;
63 if(cmd.get(0).asVocab32() != VOCAB_IJOYPADCTRL || !cmd.get(1).isVocab32() || !cmd.get(2).isVocab32() || !cmd.get(3).isVocab32())
64 {
65 response.addVocab32(VOCAB_FAILED);
66 return ret;
67 }
68
69 if(cmd.get(1).asVocab32() == VOCAB_GET)
70 {
71 int toGet;
72
73 toGet = cmd.get(2).asVocab32();
74
75 if(cmd.get(3).asVocab32() == VOCAB_COUNT)
76 {
77 if(m_countGetters.find(toGet) != m_countGetters.end())
78 {
79 unsigned int count;
80 getcountmethod getter;
81 getter = m_countGetters[toGet];
82 if((m_device->*getter)(count))
83 {
84 response.addVocab32(VOCAB_OK);
85 response.addInt32(count);
86 ret = true;
87 }
88 }
89 else if (toGet == VOCAB_STICKDOF && cmd.get(4).isInt32())
90 {
91 unsigned int count;
92 if (m_device->getStickDoF(cmd.get(4).asInt32(), count))
93 {
94 response.addVocab32(VOCAB_OK);
95 response.addInt32(count);
96 ret = true;
97 }
98 else
99 {
100 response.addVocab32(VOCAB_FAILED);
101 ret = false;
102 }
103 }
104 else
105 {
106 response.addVocab32(VOCAB_FAILED);
107 ret = false;
108 }
109 }
110 else if(cmd.get(3).asVocab32() == VOCAB_VALUE)
111 {
112 switch (cmd.get(2).asVocab32()) {
113 case VOCAB_BUTTON:
114 {
115 float value;
116 if(cmd.get(4).isInt32() && m_device->getButton(cmd.get(4).asInt32(), value))
117 {
118 response.addVocab32(VOCAB_OK);
119 response.addFloat64(value);
120 ret = true;
121 }
122 break;
123 }
124 case VOCAB_AXIS:
125 {
126 double value;
127 if(cmd.get(4).isInt32() && m_device->getAxis(cmd.get(4).asInt32(), value))
128 {
129 response.addVocab32(VOCAB_OK);
130 response.addFloat64(value);
131 ret = true;
132 }
133 break;
134 }
135 case VOCAB_STICK:
136 {
137 if(cmd.get(4).isVocab32())
138 {
140
142 if(cmd.get(5).isInt32() && m_device->getStick(cmd.get(5).asInt32(), frame, mode))
143 {
144 response.addVocab32(VOCAB_OK);
145 for(size_t i = 0; i < frame.size(); ++i)
146 {
147 response.addFloat64(frame[i]);
148 }
149
150 ret = true;
151 }
152 }
153 break;
154 }
155 case VOCAB_STICKDOF:
156 {
157
158 unsigned int dofCount;
159
160 if(cmd.get(5).isInt32() && m_device->getStickDoF(cmd.get(5).asInt32(), dofCount))
161 {
162 response.addVocab32(VOCAB_OK);
163 response.addInt32(dofCount);
164 ret = true;
165 }
166
167 break;
168 }
169 case VOCAB_TOUCH:
170 {
172 unsigned int id;
173
174 id = cmd.get(4).asInt32();
175 if(cmd.get(4).isInt32() && m_device->getTouch(id, pos))
176 {
177 response.addVocab32(VOCAB_OK);
178 for(size_t i = 0; i < pos.size(); ++i)
179 {
180 response.addFloat64(pos[i]);
181 }
182 ret = true;
183 }
184 break;
185 }
186 case VOCAB_TRACKBALL:
187 {
189 unsigned int id;
190
191 id = cmd.get(4).asInt32();
192 if(cmd.get(4).isInt32() && m_device->getTrackball(id, axes))
193 {
194 response.addVocab32(VOCAB_OK);
195 for(size_t i = 0; i < axes.size(); ++i)
196 {
197 response.addFloat64(axes[i]);
198 }
199 ret = true;
200 }
201 break;
202 }
203 case VOCAB_HAT:
204 {
205 unsigned char value;
206 if(cmd.get(4).isInt32() && m_device->getHat(cmd.get(4).asInt32(), value))
207 {
208 response.addVocab32(VOCAB_OK);
209 response.addInt32(value);
210 ret = true;
211 }
212 break;
213 }
214 default:
215 break;
216 }
217 }
218 }
219 return ret;
220
221}
222
223
225 m_period(DEFAULT_THREAD_PERIOD),
226 m_IJoypad(nullptr),
227 m_separatePorts(false),
228 m_profile(false),
229 m_coordsMode(yarp::dev::IJoypadController::JoypadCtrl_coordinateMode::JypCtrlcoord_POLAR)
230{
231
232}
233
235{
236 m_IJoypad = nullptr;
237}
238
240{
241 if(params.check("help"))
242 {
244 << "parameters:\n\n"
245 << "period - refresh period of the broadcasted values in ms.. default" << DEFAULT_THREAD_PERIOD * 1000 << "\n"
246 << "use_separate_ports - set it to 1 to use separate ports (buttons, axes, trackballs, hats) and 0 to stream all in one single port\n"
247 << "name - Prefix name of the ports opened by the JoypadControlServer, e.g. /robotName/joypad\n"
248 << "subdevice - name of the subdevice to open\n"
249 << "profile - print the joypad data for debugging purpose";
250 return false;
251 }
252 std::string rootName;
253 if (!params.check("period", "refresh period of the broadcasted values in ms"))
254 {
255 yCInfo(JOYPADCONTROLSERVER) << "Using default 'period' parameter of" << DEFAULT_THREAD_PERIOD << "s";
256 }
257 else
258 {
259 m_period = params.find("period").asInt32() / 1000.0;
260 }
261
262 m_profile = params.check("profile");
263
264 if(params.check("use_separate_ports"))
265 {
266 m_separatePorts = params.find("use_separate_ports").asBool();
267 if(!m_separatePorts)
268 {
269 yCError(JOYPADCONTROLSERVER) << "Single port mode not supported at the moment";
270 return false;
271 }
272 }
273 else
274 {
275 yCError(JOYPADCONTROLSERVER) << "Missing use_separate_ports in configuration";
276 return false;
277 }
279 rootName = params.check("name",Value("/"), "starting '/' if needed.").asString();
280
281 if (!params.check("name", "Prefix name of the ports opened by the JoypadControlServer."))
282 {
283 yCError(JOYPADCONTROLSERVER) << "Missing 'name' parameter. Check you configuration file; it must be like:";
284 yCError(JOYPADCONTROLSERVER) << " name: Prefix name of the ports opened by the JoypadControlServer, e.g. /robotName/joypad";
285 return false;
286 }
287
288 rootName = params.find("name").asString();
289 m_rpcPortName = rootName + "/rpc:i";
290 m_portButtons.name = rootName + "/buttons:o";
291 m_portAxis.name = rootName + "/axis:o";
292 m_portStick.name = rootName + "/stick:o";
293 m_portTouch.name = rootName + "/touch:o";
294 m_portTrackball.name = rootName + "/trackball:o";
295 m_portHats.name = rootName + "/hat:o";
296
297 yCInfo(JOYPADCONTROLSERVER) << "Running, waiting for attach...";
298 return true;
299}
300
302{
303 if (poly) {
304 poly->view(m_IJoypad);
305 }
306
307 if(m_IJoypad == nullptr)
308 {
309 yCError(JOYPADCONTROLSERVER) << "Attached device has no valid IJoypadController interface.";
310 return false;
311 }
312
314 if (!PeriodicThread::start()) {
315 return false;
316 }
317
318 openPorts();
319 if (!m_parser.configure(m_IJoypad))
320 {
321 yCError(JOYPADCONTROLSERVER) << "Error configuring interfaces for parsers";
322 return false;
323 }
324
325 return true;
326}
327
329{
332 }
333
334 m_IJoypad = nullptr;
335 return true;
336}
337
339{
340 // Get interface from attached device if any.
341 return true;
342}
343
345{
346 // Detach() calls stop() which in turns calls this functions, therefore no calls to detach here!
347}
348
349bool JoypadControlServer::openPorts()
350{
351 if(!m_IJoypad)
352 {
353 return false;
354 }
355
356 if(!m_rpcPort.open(m_rpcPortName))
357 {
358 yCError(JOYPADCONTROLSERVER) << "Unable to open rpc Port" << m_rpcPortName.c_str();
359 return false;
360 }
361 m_rpcPort.setReader(m_parser);
362// dumb(or K.I.S.S.) version of the method:
363// unsigned int count;
364// if(m_device->getAxisCount(count))
365// {
366// if(count == 0)
367// {
368// m_portAxis.valid = false;
369// }
370// else
371// {
372// m_portAxis.open();
373// m_portAxis.valid = true;
374// }
375// }
376// else
377// {
378// return false;
379// }
380//
381// if(m_device->getButtonCount(count))
382// {
383// if(count == 0)
384// {
385// m_portButton.valid = false;
386// }
387// else
388// {
389// m_portButton.open();
390// m_portButton.valid = true;
391// }
392// }
393// else
394// {
395// return false;
396// }
397//
398// if(m_device->getStickCount(count))
399// {
400// if(count == 0)
401// {
402// m_portStick.valid = false;
403// }
404// else
405// {
406// m_portStick.open();
407// m_portStick.valid = true;
408// }
409// }
410// else
411// {
412// return false;
413// }
414//
415// if(m_device->getTouchSurfaceCount(count))
416// {
417// if(count == 0)
418// {
419// m_portTouch.valid = false;
420// }
421// else
422// {
423// m_portTouch.open();
424// m_portTouch.valid = true;
425// }
426// }
427// else
428// {
429// return false;
430// }
431// if(m_device->getTrackballCount(count))
432// {
433// if(count == 0)
434// {
435// m_portTrackball.valid = false;
436// }
437// else
438// {
439// m_portTrackball.open();
440// m_portTrackball.valid = true;
441// }
442// }
443// else
444// {
445// return false;
446// }
447//
448// if(m_device->getHatCount(count))
449// {
450// if(count == 0)
451// {
452// m_portHats.valid = false;
453// }
454// else
455// {
456// m_portHats.open();
457// m_portHats.valid = true;
458// }
459// }
460// else
461// {
462// return false;
463// }
464// return true;
465 if(m_separatePorts)
466 {
468
469 struct solver
470 {
473
475 {}
476 };
477
478 std::vector<solver> getters;
479
480 getters.emplace_back(&IJoypadController::getAxisCount, &m_portAxis );
481 getters.emplace_back(&IJoypadController::getButtonCount, &m_portButtons );
482 getters.emplace_back(&IJoypadController::getStickCount, &m_portStick );
483 getters.emplace_back(&IJoypadController::getTouchSurfaceCount, &m_portTouch );
484 getters.emplace_back(&IJoypadController::getTrackballCount, &m_portTrackball);
485 getters.emplace_back(&IJoypadController::getHatCount, &m_portHats );
486
487 for(auto& getter : getters)
488 {
489 if((m_IJoypad->*(getter.getter))(getter.port->count))
490 {
491 if(getter.port->count == 0)
492 {
493 getter.port->valid = false;
494 }
495 else
496 {
497 getter.port->contactable->open(getter.port->name);
498 getter.port->valid = true;
499 }
500 }
501 else
502 {
503 return false;
504 }
505 }
506
507 return true;
508 }
509 else
510 {
511 return false;
512 //m_godPort.open(m_name + "/joydata:o");
513 }
514}
515
516void JoypadControlServer::profile()
517{
518 std::string message;
519 unsigned int count;
520
521 message = "Axes: ";
522 m_IJoypad->getAxisCount(count);
523 for(unsigned int i = 0; i < count; ++i)
524 {
525 double data;
526 m_IJoypad->getAxis(i, data);
527 message += std::to_string(data) + " ";
528 }
529 yCInfo(JOYPADCONTROLSERVER) << message;
530
531 message = "Hats: ";
532 m_IJoypad->getHatCount(count);
533 for(unsigned int i = 0; i < count; ++i)
534 {
535 unsigned char data;
536 m_IJoypad->getHat(i, data);
537 message += std::to_string(data) + " ";
538 }
539 yCInfo(JOYPADCONTROLSERVER) << message;
540
541 message = "Buttons: ";
542 m_IJoypad->getButtonCount(count);
543 for(unsigned int i = 0; i < count; ++i)
544 {
545 float data;
546 m_IJoypad->getButton(i, data);
547 message += std::to_string(data) + " ";
548 }
549 yCInfo(JOYPADCONTROLSERVER) << message;
550
551 message = "Stick: ";
552 m_IJoypad->getStickCount(count);
553 for(unsigned int i = 0; i < count; ++i)
554 {
555 Vector data;
557 message += "n_" + std::to_string(i) + ": ";
558 for (size_t j = 0; j < data.size(); ++j)
559 {
560 message += std::to_string(data[j]) + " ";
561 }
562 message += "\n";
563
564 }
565 yCInfo(JOYPADCONTROLSERVER) << message;
566
567 message = "trackball: ";
568 m_IJoypad->getTrackballCount(count);
569 for(unsigned int i = 0; i < count; ++i)
570 {
571 Vector data;
572 m_IJoypad->getTrackball(i, data);
573 message += "n_" + std::to_string(i) + ": ";
574 for (size_t j = 0; j < data.size(); ++j)
575 {
576 message += std::to_string(data[j]) + " ";
577 }
578 message += "\n";
579 }
580
581 message = "touch Surface: ";
582 m_IJoypad->getTouchSurfaceCount(count);
583 for(unsigned int i = 0; i < count; ++i)
584 {
585 Vector data;
586 m_IJoypad->getTouch(i, data);
587 message += "n_" + std::to_string(i) + ": ";
588 for (size_t j = 0; j < data.size(); ++j)
589 {
590 message += std::to_string(data[j]) + " ";
591 }
592 message += "\n";
593 }
594 yCInfo(JOYPADCONTROLSERVER) << message;
595}
596
598{
599 if(m_separatePorts)
600 {
601 if (m_portButtons.valid)
602 {
603 bool write;
604 write = true;
605 Vector& b = m_portButtons.prepare();
606 b.clear();
607 for(size_t i = 0; i < m_portButtons.count; ++i)
608 {
609 float v;
610 if(!m_IJoypad->getButton(i, v))
611 {
612 write = false;
613 break;
614 }
615 b.push_back(v);
616 }
617 if (write) {
618 m_portButtons.write();
619 }
620 }
621
622 if (m_portHats.valid)
623 {
624 bool write;
625
626 write = true;
627 VecOfChar& b = m_portHats.prepare();
628 b.clear();
629 for(size_t i = 0; i < m_portHats.count; ++i)
630 {
631 unsigned char v;
632 if(!m_IJoypad->getHat(i, v))
633 {
634 write = false;
635 break;
636 }
637 b.push_back(v);
638 }
639 if (write) {
640 m_portHats.write();
641 }
642 }
643
644 if (m_portAxis.valid)
645 {
646 bool write;
647
648 write = true;
649 Vector& b = m_portAxis.prepare();
650 b.clear();
651 for(size_t i = 0; i < m_portAxis.count; ++i)
652 {
653 double v;
654 if(!m_IJoypad->getAxis(i, v))
655 {
656 yCError(JOYPADCONTROLSERVER) << "Cannot get axis with id" << i;
657 write = false;
658 break;
659 }
660 b.push_back(v);
661 }
662 if (write) {
663 m_portAxis.write();
664 }
665 }
666
667 if (m_portTrackball.valid)
668 {
669 bool write;
670
671 write = true;
672 Vector& b = m_portTrackball.prepare();
673 b.clear();
674 for(size_t i = 0; i < m_portTrackball.count; ++i)
675 {
676 Vector v;
677 if(!m_IJoypad->getTrackball(i, v))
678 {
679 yCError(JOYPADCONTROLSERVER) << "Cannot get axis with id" << i;
680 write = false;
681 break;
682 }
683 cat(b, v);
684 }
685 if (write) {
686 m_portTrackball.write();
687 }
688 }
689
690 if (m_portStick.valid)
691 {
692 bool write;
693 write = true;
694 Vector& b = m_portStick.prepare();
695 b.clear();
696 for(size_t i = 0; i < m_portStick.count; ++i)
697 {
698 Vector v;
699 unsigned int dofCount;
700 if(!m_IJoypad->getStick(i, v, m_coordsMode) || !m_IJoypad->getStickDoF(i, dofCount) || v.size() != dofCount)
701 {
702 write = false;
703 break;
704 }
705 cat(b, v);
706 }
707 if (write) {
708 m_portStick.write();
709 }
710 }
711
712 if (m_portTouch.valid)
713 {
714 bool write;
715 write = true;
716 Vector& b = m_portTouch.prepare();
717 b.clear();
718 for(unsigned int i = 0; i < m_portTouch.count; ++i)
719 {
720 Vector v;
721 if(!m_IJoypad->getTouch(i, v))
722 {
723 write = false;
724 break;
725 }
726 cat(b, v);
727 }
728
729 if (write) {
730 m_portTouch.write();
731 }
732 }
733 }
734 else
735 {
736 return;
737 //JoyData& message = m_godPort.prepare();
738 //for(size_t i = 0; i < m_device->getAxisCount();)
739 //message.Axes
740 }
741
742 if(m_profile)
743 {
744 profile();
745 }
746}
747
749{
750 detachAll();
751
752 // Closing port
753 std::vector<JoypadControl::LoopablePort*> portv;
754 portv.push_back(&m_portButtons);
755 portv.push_back(&m_portAxis);
756 portv.push_back(&m_portStick);
757 portv.push_back(&m_portTouch);
758 portv.push_back(&m_portTrackball);
759 portv.push_back(&m_portHats);
760
761 for(auto p : portv)
762 {
763 //p->contactable->interrupt();
764 p->contactable->close();
765 }
766
767 m_rpcPort.close();
768 return true;
769}
#define DEFAULT_THREAD_PERIOD
constexpr yarp::conf::vocab32_t VOCAB_OK
constexpr yarp::conf::vocab32_t VOCAB_GET
constexpr yarp::conf::vocab32_t VOCAB_FAILED
constexpr yarp::conf::vocab32_t VOCAB_VALUE
constexpr yarp::conf::vocab32_t VOCAB_COUNT
constexpr yarp::conf::vocab32_t VOCAB_BUTTON
constexpr yarp::conf::vocab32_t VOCAB_IJOYPADCTRL
constexpr yarp::conf::vocab32_t VOCAB_TOUCH
constexpr yarp::conf::vocab32_t VOCAB_HAT
constexpr yarp::conf::vocab32_t VOCAB_TRACKBALL
constexpr yarp::conf::vocab32_t VOCAB_CARTESIAN
constexpr yarp::conf::vocab32_t VOCAB_STICKDOF
constexpr yarp::conf::vocab32_t VOCAB_AXIS
constexpr yarp::conf::vocab32_t VOCAB_STICK
bool ret
#define DEFAULT_THREAD_PERIOD
void cat(Vector &a, const Vector &b)
bool open(yarp::os::Searchable &params) override
Open the DeviceDriver.
void threadRelease() override
Release method.
bool attach(yarp::dev::PolyDriver *poly) override
Attach to another object.
bool close() override
Close the DeviceDriver.
bool detach() override
Detach the object (you must have first called attach).
void run() override
Loop function.
bool threadInit() override
Initialization method.
bool configure(yarp::dev::IJoypadController *interface)
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override
Respond to a message.
bool view(T *&x)
Get an interface to the device driver.
virtual bool getHatCount(unsigned int &Hat_count)=0
Get number of hats.
virtual bool getTrackballCount(unsigned int &Trackball_count)=0
Get number of trackballs.
virtual bool getTouchSurfaceCount(unsigned int &touch_count)=0
Get the number of touch surface.
virtual bool getButton(unsigned int button_id, float &value)=0
Get the value of a button.
virtual bool getAxisCount(unsigned int &axis_count)=0
Get number of axes.
virtual bool getAxis(unsigned int axis_id, double &value)=0
Get the value of an axis if present, return false otherwise.
virtual bool getStickCount(unsigned int &stick_count)=0
Get the number of the sticks.
virtual bool getTrackball(unsigned int trackball_id, yarp::sig::Vector &value)=0
Get the axes change of a Trackball.
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.
virtual bool getStickDoF(unsigned int stick_id, unsigned int &DoF)=0
Get the Degree Of Freedom count for desired stick.
virtual bool getHat(unsigned int hat_id, unsigned char &value)=0
Get the value of an Hat.
virtual bool getButtonCount(unsigned int &button_count)=0
Get number of buttons.
virtual bool getTouch(unsigned int touch_id, yarp::sig::Vector &value)=0
Get the value of a touch if present, return false otherwise.
A container for a device driver.
Definition PolyDriver.h:23
bool detachAll() final
Detach the object (you must have first called attach).
A simple collection of objects that can be described and transmitted in a portable way.
Definition Bottle.h:64
void addVocab32(yarp::conf::vocab32_t x)
Places a vocabulary item in the bottle, at the end of the list.
Definition Bottle.cpp:164
void addFloat64(yarp::conf::float64_t x)
Places a 64-bit floating point number in the bottle, at the end of the list.
Definition Bottle.cpp:158
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
Definition Bottle.cpp:246
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
Definition Bottle.cpp:140
A mini-server for performing network communication in the background.
void close() override
Stop port activity.
void write(bool forceStrict=false)
Write the current object being returned by BufferedPort::prepare.
T & prepare()
Access the object which will be transmitted by the next call to yarp::os::BufferedPort::write.
An abstraction for a periodic thread.
bool setPeriod(double period)
Set the (new) period of the thread.
bool isRunning() const
Returns true when the thread is started, false otherwise.
bool start()
Call this to start the thread.
void stop()
Call this to stop the thread, this call blocks until the thread is terminated (and releaseThread() ca...
void setReader(PortReader &reader) override
Set an external reader for port data.
Definition Port.cpp:511
void close() override
Stop port activity.
Definition Port.cpp:363
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
Definition Port.cpp:79
A base class for nested structures that can be searched.
Definition Searchable.h:31
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
A single value (typically within a Bottle).
Definition Value.h:43
virtual yarp::conf::vocab32_t asVocab32() const
Get vocabulary identifier as an integer.
Definition Value.cpp:228
virtual std::int32_t asInt32() const
Get 32-bit integer value.
Definition Value.cpp:204
virtual bool isInt32() const
Checks if value is a 32-bit integer.
Definition Value.cpp:132
virtual bool isVocab32() const
Checks if value is a vocabulary identifier.
Definition Value.cpp:174
size_t size() const
Definition Vector.h:322
void push_back(const T &elem)
Push a new element in the vector: size is changed.
Definition Vector.h:249
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.
The main, catch-all namespace for YARP.
Definition dirs.h:16