Fawkes API  Fawkes Development Version
DynamixelServoInterface.cpp
1 
2 /***************************************************************************
3  * DynamixelServoInterface.cpp - Fawkes BlackBoard Interface - DynamixelServoInterface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2015 Tim Niemueller, Nicolas Limpert
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #include <interfaces/DynamixelServoInterface.h>
25 
26 #include <core/exceptions/software.h>
27 
28 #include <map>
29 #include <string>
30 #include <cstring>
31 #include <cstdlib>
32 
33 namespace fawkes {
34 
35 /** @class DynamixelServoInterface <interfaces/DynamixelServoInterface.h>
36  * DynamixelServoInterface Fawkes BlackBoard Interface.
37  *
38  Interface to access Robotis Dynamixel Servos.
39 
40  * @ingroup FawkesInterfaces
41  */
42 
43 
44 
45 /** Constructor */
46 DynamixelServoInterface::DynamixelServoInterface() : Interface()
47 {
48  data_size = sizeof(DynamixelServoInterface_data_t);
49  data_ptr = malloc(data_size);
50  data = (DynamixelServoInterface_data_t *)data_ptr;
51  data_ts = (interface_data_ts_t *)data_ptr;
52  memset(data_ptr, 0, data_size);
53  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
54  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
55  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
56  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
57  enum_map_WorkingMode[(int)JOINT] = "JOINT";
58  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
59  add_fieldinfo(IFT_STRING, "model", 8, data->model);
60  add_fieldinfo(IFT_UINT32, "model_number", 1, &data->model_number);
61  add_fieldinfo(IFT_UINT32, "cw_angle_limit", 1, &data->cw_angle_limit);
62  add_fieldinfo(IFT_UINT32, "ccw_angle_limit", 1, &data->ccw_angle_limit);
63  add_fieldinfo(IFT_UINT8, "temperature_limit", 1, &data->temperature_limit);
64  add_fieldinfo(IFT_UINT32, "max_torque", 1, &data->max_torque);
65  add_fieldinfo(IFT_UINT8, "cw_margin", 1, &data->cw_margin);
66  add_fieldinfo(IFT_UINT8, "ccw_margin", 1, &data->ccw_margin);
67  add_fieldinfo(IFT_UINT8, "cw_slope", 1, &data->cw_slope);
68  add_fieldinfo(IFT_UINT8, "ccw_slope", 1, &data->ccw_slope);
69  add_fieldinfo(IFT_UINT32, "goal_position", 1, &data->goal_position);
70  add_fieldinfo(IFT_UINT32, "goal_speed", 1, &data->goal_speed);
71  add_fieldinfo(IFT_UINT32, "torque_limit", 1, &data->torque_limit);
72  add_fieldinfo(IFT_UINT32, "position", 1, &data->position);
73  add_fieldinfo(IFT_UINT32, "speed", 1, &data->speed);
74  add_fieldinfo(IFT_UINT32, "load", 1, &data->load);
75  add_fieldinfo(IFT_UINT8, "voltage", 1, &data->voltage);
76  add_fieldinfo(IFT_UINT8, "temperature", 1, &data->temperature);
77  add_fieldinfo(IFT_UINT32, "punch", 1, &data->punch);
78  add_fieldinfo(IFT_UINT8, "alarm_shutdown", 1, &data->alarm_shutdown);
79  add_fieldinfo(IFT_UINT8, "error", 1, &data->error);
80  add_fieldinfo(IFT_BOOL, "enable_prevent_alarm_shutdown", 1, &data->enable_prevent_alarm_shutdown);
81  add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
82  add_fieldinfo(IFT_BOOL, "enabled", 1, &data->enabled);
83  add_fieldinfo(IFT_FLOAT, "min_angle", 1, &data->min_angle);
84  add_fieldinfo(IFT_FLOAT, "max_angle", 1, &data->max_angle);
85  add_fieldinfo(IFT_FLOAT, "max_velocity", 1, &data->max_velocity);
86  add_fieldinfo(IFT_FLOAT, "velocity", 1, &data->velocity);
87  add_fieldinfo(IFT_STRING, "mode", 5, data->mode);
88  add_fieldinfo(IFT_FLOAT, "angle_margin", 1, &data->angle_margin);
89  add_fieldinfo(IFT_BOOL, "autorecover_enabled", 1, &data->autorecover_enabled);
90  add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
91  add_fieldinfo(IFT_BOOL, "final", 1, &data->final);
92  add_fieldinfo(IFT_ENUM, "error_code", 1, &data->error_code, "ErrorCode", &enum_map_ErrorCode);
93  add_messageinfo("StopMessage");
94  add_messageinfo("FlushMessage");
95  add_messageinfo("GotoMessage");
96  add_messageinfo("TimedGotoMessage");
97  add_messageinfo("SetModeMessage");
98  add_messageinfo("SetSpeedMessage");
99  add_messageinfo("SetEnabledMessage");
100  add_messageinfo("SetVelocityMessage");
101  add_messageinfo("SetMarginMessage");
102  add_messageinfo("SetComplianceValuesMessage");
103  add_messageinfo("SetGoalSpeedMessage");
104  add_messageinfo("SetTorqueLimitMessage");
105  add_messageinfo("SetPunchMessage");
106  add_messageinfo("GotoPositionMessage");
107  add_messageinfo("SetAngleLimitsMessage");
108  add_messageinfo("ResetRawErrorMessage");
109  add_messageinfo("SetPreventAlarmShutdownMessage");
110  add_messageinfo("SetAutorecoverEnabledMessage");
111  add_messageinfo("RecoverMessage");
112  unsigned char tmp_hash[] = {0x18, 0x72, 0x74, 0xa6, 0x80, 0xfa, 0x62, 0xa2, 0x56, 0x91, 0x21, 0xfc, 0x48, 0xd5, 0xe0, 0x5f};
113  set_hash(tmp_hash);
114 }
115 
116 /** Destructor */
117 DynamixelServoInterface::~DynamixelServoInterface()
118 {
119  free(data_ptr);
120 }
121 /** Convert ErrorCode constant to string.
122  * @param value value to convert to string
123  * @return constant value as string.
124  */
125 const char *
126 DynamixelServoInterface::tostring_ErrorCode(ErrorCode value) const
127 {
128  switch (value) {
129  case ERROR_NONE: return "ERROR_NONE";
130  case ERROR_UNSPECIFIC: return "ERROR_UNSPECIFIC";
131  case ERROR_COMMUNICATION: return "ERROR_COMMUNICATION";
132  case ERROR_ANGLE_OUTOFRANGE: return "ERROR_ANGLE_OUTOFRANGE";
133  default: return "UNKNOWN";
134  }
135 }
136 /** Convert WorkingMode constant to string.
137  * @param value value to convert to string
138  * @return constant value as string.
139  */
140 const char *
141 DynamixelServoInterface::tostring_WorkingMode(WorkingMode value) const
142 {
143  switch (value) {
144  case JOINT: return "JOINT";
145  case WHEEL: return "WHEEL";
146  default: return "UNKNOWN";
147  }
148 }
149 /* Methods */
150 /** Get model value.
151  * Model if known
152  * @return model value
153  */
154 char *
155 DynamixelServoInterface::model() const
156 {
157  return data->model;
158 }
159 
160 /** Get maximum length of model value.
161  * @return length of model value, can be length of the array or number of
162  * maximum number of characters for a string
163  */
164 size_t
165 DynamixelServoInterface::maxlenof_model() const
166 {
167  return 8;
168 }
169 
170 /** Set model value.
171  * Model if known
172  * @param new_model new model value
173  */
174 void
175 DynamixelServoInterface::set_model(const char * new_model)
176 {
177  strncpy(data->model, new_model, sizeof(data->model));
178  data_changed = true;
179 }
180 
181 /** Get model_number value.
182  * Model number
183  * @return model_number value
184  */
185 uint32_t
186 DynamixelServoInterface::model_number() const
187 {
188  return data->model_number;
189 }
190 
191 /** Get maximum length of model_number value.
192  * @return length of model_number value, can be length of the array or number of
193  * maximum number of characters for a string
194  */
195 size_t
196 DynamixelServoInterface::maxlenof_model_number() const
197 {
198  return 1;
199 }
200 
201 /** Set model_number value.
202  * Model number
203  * @param new_model_number new model_number value
204  */
205 void
206 DynamixelServoInterface::set_model_number(const uint32_t new_model_number)
207 {
208  data->model_number = new_model_number;
209  data_changed = true;
210 }
211 
212 /** Get cw_angle_limit value.
213  * Clockwise angle limit
214  * @return cw_angle_limit value
215  */
216 uint32_t
217 DynamixelServoInterface::cw_angle_limit() const
218 {
219  return data->cw_angle_limit;
220 }
221 
222 /** Get maximum length of cw_angle_limit value.
223  * @return length of cw_angle_limit value, can be length of the array or number of
224  * maximum number of characters for a string
225  */
226 size_t
227 DynamixelServoInterface::maxlenof_cw_angle_limit() const
228 {
229  return 1;
230 }
231 
232 /** Set cw_angle_limit value.
233  * Clockwise angle limit
234  * @param new_cw_angle_limit new cw_angle_limit value
235  */
236 void
237 DynamixelServoInterface::set_cw_angle_limit(const uint32_t new_cw_angle_limit)
238 {
239  data->cw_angle_limit = new_cw_angle_limit;
240  data_changed = true;
241 }
242 
243 /** Get ccw_angle_limit value.
244  * Counter-clockwise angle limit
245  * @return ccw_angle_limit value
246  */
247 uint32_t
248 DynamixelServoInterface::ccw_angle_limit() const
249 {
250  return data->ccw_angle_limit;
251 }
252 
253 /** Get maximum length of ccw_angle_limit value.
254  * @return length of ccw_angle_limit value, can be length of the array or number of
255  * maximum number of characters for a string
256  */
257 size_t
258 DynamixelServoInterface::maxlenof_ccw_angle_limit() const
259 {
260  return 1;
261 }
262 
263 /** Set ccw_angle_limit value.
264  * Counter-clockwise angle limit
265  * @param new_ccw_angle_limit new ccw_angle_limit value
266  */
267 void
268 DynamixelServoInterface::set_ccw_angle_limit(const uint32_t new_ccw_angle_limit)
269 {
270  data->ccw_angle_limit = new_ccw_angle_limit;
271  data_changed = true;
272 }
273 
274 /** Get temperature_limit value.
275  * Temperature limit
276  * @return temperature_limit value
277  */
278 uint8_t
279 DynamixelServoInterface::temperature_limit() const
280 {
281  return data->temperature_limit;
282 }
283 
284 /** Get maximum length of temperature_limit value.
285  * @return length of temperature_limit value, can be length of the array or number of
286  * maximum number of characters for a string
287  */
288 size_t
289 DynamixelServoInterface::maxlenof_temperature_limit() const
290 {
291  return 1;
292 }
293 
294 /** Set temperature_limit value.
295  * Temperature limit
296  * @param new_temperature_limit new temperature_limit value
297  */
298 void
299 DynamixelServoInterface::set_temperature_limit(const uint8_t new_temperature_limit)
300 {
301  data->temperature_limit = new_temperature_limit;
302  data_changed = true;
303 }
304 
305 /** Get max_torque value.
306  * Max torque
307  * @return max_torque value
308  */
309 uint32_t
310 DynamixelServoInterface::max_torque() const
311 {
312  return data->max_torque;
313 }
314 
315 /** Get maximum length of max_torque value.
316  * @return length of max_torque value, can be length of the array or number of
317  * maximum number of characters for a string
318  */
319 size_t
320 DynamixelServoInterface::maxlenof_max_torque() const
321 {
322  return 1;
323 }
324 
325 /** Set max_torque value.
326  * Max torque
327  * @param new_max_torque new max_torque value
328  */
329 void
330 DynamixelServoInterface::set_max_torque(const uint32_t new_max_torque)
331 {
332  data->max_torque = new_max_torque;
333  data_changed = true;
334 }
335 
336 /** Get cw_margin value.
337  * CW Compliance Margin
338  * @return cw_margin value
339  */
340 uint8_t
341 DynamixelServoInterface::cw_margin() const
342 {
343  return data->cw_margin;
344 }
345 
346 /** Get maximum length of cw_margin value.
347  * @return length of cw_margin value, can be length of the array or number of
348  * maximum number of characters for a string
349  */
350 size_t
351 DynamixelServoInterface::maxlenof_cw_margin() const
352 {
353  return 1;
354 }
355 
356 /** Set cw_margin value.
357  * CW Compliance Margin
358  * @param new_cw_margin new cw_margin value
359  */
360 void
361 DynamixelServoInterface::set_cw_margin(const uint8_t new_cw_margin)
362 {
363  data->cw_margin = new_cw_margin;
364  data_changed = true;
365 }
366 
367 /** Get ccw_margin value.
368  * CCW Compliance Margin
369  * @return ccw_margin value
370  */
371 uint8_t
372 DynamixelServoInterface::ccw_margin() const
373 {
374  return data->ccw_margin;
375 }
376 
377 /** Get maximum length of ccw_margin value.
378  * @return length of ccw_margin value, can be length of the array or number of
379  * maximum number of characters for a string
380  */
381 size_t
382 DynamixelServoInterface::maxlenof_ccw_margin() const
383 {
384  return 1;
385 }
386 
387 /** Set ccw_margin value.
388  * CCW Compliance Margin
389  * @param new_ccw_margin new ccw_margin value
390  */
391 void
392 DynamixelServoInterface::set_ccw_margin(const uint8_t new_ccw_margin)
393 {
394  data->ccw_margin = new_ccw_margin;
395  data_changed = true;
396 }
397 
398 /** Get cw_slope value.
399  * CW Compliance Slope
400  * @return cw_slope value
401  */
402 uint8_t
403 DynamixelServoInterface::cw_slope() const
404 {
405  return data->cw_slope;
406 }
407 
408 /** Get maximum length of cw_slope value.
409  * @return length of cw_slope value, can be length of the array or number of
410  * maximum number of characters for a string
411  */
412 size_t
413 DynamixelServoInterface::maxlenof_cw_slope() const
414 {
415  return 1;
416 }
417 
418 /** Set cw_slope value.
419  * CW Compliance Slope
420  * @param new_cw_slope new cw_slope value
421  */
422 void
423 DynamixelServoInterface::set_cw_slope(const uint8_t new_cw_slope)
424 {
425  data->cw_slope = new_cw_slope;
426  data_changed = true;
427 }
428 
429 /** Get ccw_slope value.
430  * CCW Compliance Slope
431  * @return ccw_slope value
432  */
433 uint8_t
434 DynamixelServoInterface::ccw_slope() const
435 {
436  return data->ccw_slope;
437 }
438 
439 /** Get maximum length of ccw_slope value.
440  * @return length of ccw_slope value, can be length of the array or number of
441  * maximum number of characters for a string
442  */
443 size_t
444 DynamixelServoInterface::maxlenof_ccw_slope() const
445 {
446  return 1;
447 }
448 
449 /** Set ccw_slope value.
450  * CCW Compliance Slope
451  * @param new_ccw_slope new ccw_slope value
452  */
453 void
454 DynamixelServoInterface::set_ccw_slope(const uint8_t new_ccw_slope)
455 {
456  data->ccw_slope = new_ccw_slope;
457  data_changed = true;
458 }
459 
460 /** Get goal_position value.
461  * Goal position
462  * @return goal_position value
463  */
464 uint32_t
465 DynamixelServoInterface::goal_position() const
466 {
467  return data->goal_position;
468 }
469 
470 /** Get maximum length of goal_position value.
471  * @return length of goal_position value, can be length of the array or number of
472  * maximum number of characters for a string
473  */
474 size_t
475 DynamixelServoInterface::maxlenof_goal_position() const
476 {
477  return 1;
478 }
479 
480 /** Set goal_position value.
481  * Goal position
482  * @param new_goal_position new goal_position value
483  */
484 void
485 DynamixelServoInterface::set_goal_position(const uint32_t new_goal_position)
486 {
487  data->goal_position = new_goal_position;
488  data_changed = true;
489 }
490 
491 /** Get goal_speed value.
492  * Goal speed
493  * @return goal_speed value
494  */
495 uint32_t
496 DynamixelServoInterface::goal_speed() const
497 {
498  return data->goal_speed;
499 }
500 
501 /** Get maximum length of goal_speed value.
502  * @return length of goal_speed value, can be length of the array or number of
503  * maximum number of characters for a string
504  */
505 size_t
506 DynamixelServoInterface::maxlenof_goal_speed() const
507 {
508  return 1;
509 }
510 
511 /** Set goal_speed value.
512  * Goal speed
513  * @param new_goal_speed new goal_speed value
514  */
515 void
516 DynamixelServoInterface::set_goal_speed(const uint32_t new_goal_speed)
517 {
518  data->goal_speed = new_goal_speed;
519  data_changed = true;
520 }
521 
522 /** Get torque_limit value.
523  * Torque limit
524  * @return torque_limit value
525  */
526 uint32_t
527 DynamixelServoInterface::torque_limit() const
528 {
529  return data->torque_limit;
530 }
531 
532 /** Get maximum length of torque_limit value.
533  * @return length of torque_limit value, can be length of the array or number of
534  * maximum number of characters for a string
535  */
536 size_t
537 DynamixelServoInterface::maxlenof_torque_limit() const
538 {
539  return 1;
540 }
541 
542 /** Set torque_limit value.
543  * Torque limit
544  * @param new_torque_limit new torque_limit value
545  */
546 void
547 DynamixelServoInterface::set_torque_limit(const uint32_t new_torque_limit)
548 {
549  data->torque_limit = new_torque_limit;
550  data_changed = true;
551 }
552 
553 /** Get position value.
554  * Present position
555  * @return position value
556  */
557 uint32_t
558 DynamixelServoInterface::position() const
559 {
560  return data->position;
561 }
562 
563 /** Get maximum length of position value.
564  * @return length of position value, can be length of the array or number of
565  * maximum number of characters for a string
566  */
567 size_t
568 DynamixelServoInterface::maxlenof_position() const
569 {
570  return 1;
571 }
572 
573 /** Set position value.
574  * Present position
575  * @param new_position new position value
576  */
577 void
578 DynamixelServoInterface::set_position(const uint32_t new_position)
579 {
580  data->position = new_position;
581  data_changed = true;
582 }
583 
584 /** Get speed value.
585  * Present speed
586  * @return speed value
587  */
588 uint32_t
589 DynamixelServoInterface::speed() const
590 {
591  return data->speed;
592 }
593 
594 /** Get maximum length of speed value.
595  * @return length of speed value, can be length of the array or number of
596  * maximum number of characters for a string
597  */
598 size_t
599 DynamixelServoInterface::maxlenof_speed() const
600 {
601  return 1;
602 }
603 
604 /** Set speed value.
605  * Present speed
606  * @param new_speed new speed value
607  */
608 void
609 DynamixelServoInterface::set_speed(const uint32_t new_speed)
610 {
611  data->speed = new_speed;
612  data_changed = true;
613 }
614 
615 /** Get load value.
616  * Present load
617  * @return load value
618  */
619 uint32_t
620 DynamixelServoInterface::load() const
621 {
622  return data->load;
623 }
624 
625 /** Get maximum length of load value.
626  * @return length of load value, can be length of the array or number of
627  * maximum number of characters for a string
628  */
629 size_t
630 DynamixelServoInterface::maxlenof_load() const
631 {
632  return 1;
633 }
634 
635 /** Set load value.
636  * Present load
637  * @param new_load new load value
638  */
639 void
640 DynamixelServoInterface::set_load(const uint32_t new_load)
641 {
642  data->load = new_load;
643  data_changed = true;
644 }
645 
646 /** Get voltage value.
647  * Present voltage
648  * @return voltage value
649  */
650 uint8_t
651 DynamixelServoInterface::voltage() const
652 {
653  return data->voltage;
654 }
655 
656 /** Get maximum length of voltage value.
657  * @return length of voltage value, can be length of the array or number of
658  * maximum number of characters for a string
659  */
660 size_t
661 DynamixelServoInterface::maxlenof_voltage() const
662 {
663  return 1;
664 }
665 
666 /** Set voltage value.
667  * Present voltage
668  * @param new_voltage new voltage value
669  */
670 void
671 DynamixelServoInterface::set_voltage(const uint8_t new_voltage)
672 {
673  data->voltage = new_voltage;
674  data_changed = true;
675 }
676 
677 /** Get temperature value.
678  * Present temperature
679  * @return temperature value
680  */
681 uint8_t
682 DynamixelServoInterface::temperature() const
683 {
684  return data->temperature;
685 }
686 
687 /** Get maximum length of temperature value.
688  * @return length of temperature value, can be length of the array or number of
689  * maximum number of characters for a string
690  */
691 size_t
692 DynamixelServoInterface::maxlenof_temperature() const
693 {
694  return 1;
695 }
696 
697 /** Set temperature value.
698  * Present temperature
699  * @param new_temperature new temperature value
700  */
701 void
702 DynamixelServoInterface::set_temperature(const uint8_t new_temperature)
703 {
704  data->temperature = new_temperature;
705  data_changed = true;
706 }
707 
708 /** Get punch value.
709  * Punch
710  * @return punch value
711  */
712 uint32_t
713 DynamixelServoInterface::punch() const
714 {
715  return data->punch;
716 }
717 
718 /** Get maximum length of punch value.
719  * @return length of punch value, can be length of the array or number of
720  * maximum number of characters for a string
721  */
722 size_t
723 DynamixelServoInterface::maxlenof_punch() const
724 {
725  return 1;
726 }
727 
728 /** Set punch value.
729  * Punch
730  * @param new_punch new punch value
731  */
732 void
733 DynamixelServoInterface::set_punch(const uint32_t new_punch)
734 {
735  data->punch = new_punch;
736  data_changed = true;
737 }
738 
739 /** Get alarm_shutdown value.
740  * Alarm Shutdown.
741  The bitmask is set as follows (taken from Trossen Robotics PDF "AX-12(English).pdf"):
742  Bit 7: 0
743  Bit 6: If set to 1, torque off when an Instruction Error occurs
744  Bit 5: If set to 1, torque off when an Overload Error occurs
745  Bit 4: If set to 1, torque off when a Checksum Error occurs
746  Bit 3: If set to 1, torque off when a Range Error occurs
747  Bit 2: If set to 1, torque off when an Overheating Error occurs
748  Bit 1: If set to 1, torque off when an Angle Limit Error occurs
749  Bit 0: If set to 1, torque off when an Input Voltage Error occurs
750 
751  * @return alarm_shutdown value
752  */
753 uint8_t
754 DynamixelServoInterface::alarm_shutdown() const
755 {
756  return data->alarm_shutdown;
757 }
758 
759 /** Get maximum length of alarm_shutdown value.
760  * @return length of alarm_shutdown value, can be length of the array or number of
761  * maximum number of characters for a string
762  */
763 size_t
764 DynamixelServoInterface::maxlenof_alarm_shutdown() const
765 {
766  return 1;
767 }
768 
769 /** Set alarm_shutdown value.
770  * Alarm Shutdown.
771  The bitmask is set as follows (taken from Trossen Robotics PDF "AX-12(English).pdf"):
772  Bit 7: 0
773  Bit 6: If set to 1, torque off when an Instruction Error occurs
774  Bit 5: If set to 1, torque off when an Overload Error occurs
775  Bit 4: If set to 1, torque off when a Checksum Error occurs
776  Bit 3: If set to 1, torque off when a Range Error occurs
777  Bit 2: If set to 1, torque off when an Overheating Error occurs
778  Bit 1: If set to 1, torque off when an Angle Limit Error occurs
779  Bit 0: If set to 1, torque off when an Input Voltage Error occurs
780 
781  * @param new_alarm_shutdown new alarm_shutdown value
782  */
783 void
784 DynamixelServoInterface::set_alarm_shutdown(const uint8_t new_alarm_shutdown)
785 {
786  data->alarm_shutdown = new_alarm_shutdown;
787  data_changed = true;
788 }
789 
790 /** Get error value.
791  * Raw error code from servo.
792  The bitmask is set as follows (taken from Trossen Robotics PDF "AX-12(English).pdf"):
793  Bit 7: 0
794  Bit 6: Set to 1 if an undefined instruction is sent or an action instruction is sent without a Reg_Write instruction.
795  Bit 5: Set to 1 if the specified maximum torque can't control the applied load.
796  Bit 4: Set to 1 if the checksum of the instruction packet is incorrect.
797  Bit 3: Set to 1 if the instruction sent is out of the defined range.
798  Bit 2: Set to 1 if the internal temperature of the Dynamixel unit is above the operating temperature range as defined in the control table.
799  Bit 1: Set as 1 if the Goal Position is set outside of the range between CW Angle Limit and CCW Angle Limit.
800  Bit 0: Set to 1 if the voltage is out of the operating voltage range as defined in the control table.
801 
802  * @return error value
803  */
804 uint8_t
805 DynamixelServoInterface::error() const
806 {
807  return data->error;
808 }
809 
810 /** Get maximum length of error value.
811  * @return length of error value, can be length of the array or number of
812  * maximum number of characters for a string
813  */
814 size_t
815 DynamixelServoInterface::maxlenof_error() const
816 {
817  return 1;
818 }
819 
820 /** Set error value.
821  * Raw error code from servo.
822  The bitmask is set as follows (taken from Trossen Robotics PDF "AX-12(English).pdf"):
823  Bit 7: 0
824  Bit 6: Set to 1 if an undefined instruction is sent or an action instruction is sent without a Reg_Write instruction.
825  Bit 5: Set to 1 if the specified maximum torque can't control the applied load.
826  Bit 4: Set to 1 if the checksum of the instruction packet is incorrect.
827  Bit 3: Set to 1 if the instruction sent is out of the defined range.
828  Bit 2: Set to 1 if the internal temperature of the Dynamixel unit is above the operating temperature range as defined in the control table.
829  Bit 1: Set as 1 if the Goal Position is set outside of the range between CW Angle Limit and CCW Angle Limit.
830  Bit 0: Set to 1 if the voltage is out of the operating voltage range as defined in the control table.
831 
832  * @param new_error new error value
833  */
834 void
835 DynamixelServoInterface::set_error(const uint8_t new_error)
836 {
837  data->error = new_error;
838  data_changed = true;
839 }
840 
841 /** Get enable_prevent_alarm_shutdown value.
842  * Enable alarm shutdown
843  * @return enable_prevent_alarm_shutdown value
844  */
845 bool
846 DynamixelServoInterface::is_enable_prevent_alarm_shutdown() const
847 {
848  return data->enable_prevent_alarm_shutdown;
849 }
850 
851 /** Get maximum length of enable_prevent_alarm_shutdown value.
852  * @return length of enable_prevent_alarm_shutdown value, can be length of the array or number of
853  * maximum number of characters for a string
854  */
855 size_t
856 DynamixelServoInterface::maxlenof_enable_prevent_alarm_shutdown() const
857 {
858  return 1;
859 }
860 
861 /** Set enable_prevent_alarm_shutdown value.
862  * Enable alarm shutdown
863  * @param new_enable_prevent_alarm_shutdown new enable_prevent_alarm_shutdown value
864  */
865 void
866 DynamixelServoInterface::set_enable_prevent_alarm_shutdown(const bool new_enable_prevent_alarm_shutdown)
867 {
868  data->enable_prevent_alarm_shutdown = new_enable_prevent_alarm_shutdown;
869  data_changed = true;
870 }
871 
872 /** Get angle value.
873  * Current angle.
874  * @return angle value
875  */
876 float
877 DynamixelServoInterface::angle() const
878 {
879  return data->angle;
880 }
881 
882 /** Get maximum length of angle value.
883  * @return length of angle value, can be length of the array or number of
884  * maximum number of characters for a string
885  */
886 size_t
887 DynamixelServoInterface::maxlenof_angle() const
888 {
889  return 1;
890 }
891 
892 /** Set angle value.
893  * Current angle.
894  * @param new_angle new angle value
895  */
896 void
897 DynamixelServoInterface::set_angle(const float new_angle)
898 {
899  data->angle = new_angle;
900  data_changed = true;
901 }
902 
903 /** Get enabled value.
904  * Is the servo enabled?
905  * @return enabled value
906  */
907 bool
908 DynamixelServoInterface::is_enabled() const
909 {
910  return data->enabled;
911 }
912 
913 /** Get maximum length of enabled value.
914  * @return length of enabled value, can be length of the array or number of
915  * maximum number of characters for a string
916  */
917 size_t
918 DynamixelServoInterface::maxlenof_enabled() const
919 {
920  return 1;
921 }
922 
923 /** Set enabled value.
924  * Is the servo enabled?
925  * @param new_enabled new enabled value
926  */
927 void
928 DynamixelServoInterface::set_enabled(const bool new_enabled)
929 {
930  data->enabled = new_enabled;
931  data_changed = true;
932 }
933 
934 /** Get min_angle value.
935  * Minimum angle allowed.
936  * @return min_angle value
937  */
938 float
939 DynamixelServoInterface::min_angle() const
940 {
941  return data->min_angle;
942 }
943 
944 /** Get maximum length of min_angle value.
945  * @return length of min_angle value, can be length of the array or number of
946  * maximum number of characters for a string
947  */
948 size_t
949 DynamixelServoInterface::maxlenof_min_angle() const
950 {
951  return 1;
952 }
953 
954 /** Set min_angle value.
955  * Minimum angle allowed.
956  * @param new_min_angle new min_angle value
957  */
958 void
959 DynamixelServoInterface::set_min_angle(const float new_min_angle)
960 {
961  data->min_angle = new_min_angle;
962  data_changed = true;
963 }
964 
965 /** Get max_angle value.
966  * Maximum angle allowed.
967  * @return max_angle value
968  */
969 float
970 DynamixelServoInterface::max_angle() const
971 {
972  return data->max_angle;
973 }
974 
975 /** Get maximum length of max_angle value.
976  * @return length of max_angle value, can be length of the array or number of
977  * maximum number of characters for a string
978  */
979 size_t
980 DynamixelServoInterface::maxlenof_max_angle() const
981 {
982  return 1;
983 }
984 
985 /** Set max_angle value.
986  * Maximum angle allowed.
987  * @param new_max_angle new max_angle value
988  */
989 void
990 DynamixelServoInterface::set_max_angle(const float new_max_angle)
991 {
992  data->max_angle = new_max_angle;
993  data_changed = true;
994 }
995 
996 /** Get max_velocity value.
997  * Maximum supported velocity.
998  * @return max_velocity value
999  */
1000 float
1001 DynamixelServoInterface::max_velocity() const
1002 {
1003  return data->max_velocity;
1004 }
1005 
1006 /** Get maximum length of max_velocity value.
1007  * @return length of max_velocity value, can be length of the array or number of
1008  * maximum number of characters for a string
1009  */
1010 size_t
1011 DynamixelServoInterface::maxlenof_max_velocity() const
1012 {
1013  return 1;
1014 }
1015 
1016 /** Set max_velocity value.
1017  * Maximum supported velocity.
1018  * @param new_max_velocity new max_velocity value
1019  */
1020 void
1021 DynamixelServoInterface::set_max_velocity(const float new_max_velocity)
1022 {
1023  data->max_velocity = new_max_velocity;
1024  data_changed = true;
1025 }
1026 
1027 /** Get velocity value.
1028  * Maximum servo velocity currently reached.
1029  * @return velocity value
1030  */
1031 float
1032 DynamixelServoInterface::velocity() const
1033 {
1034  return data->velocity;
1035 }
1036 
1037 /** Get maximum length of velocity value.
1038  * @return length of velocity value, can be length of the array or number of
1039  * maximum number of characters for a string
1040  */
1041 size_t
1042 DynamixelServoInterface::maxlenof_velocity() const
1043 {
1044  return 1;
1045 }
1046 
1047 /** Set velocity value.
1048  * Maximum servo velocity currently reached.
1049  * @param new_velocity new velocity value
1050  */
1051 void
1052 DynamixelServoInterface::set_velocity(const float new_velocity)
1053 {
1054  data->velocity = new_velocity;
1055  data_changed = true;
1056 }
1057 
1058 /** Get mode value.
1059  * Working mode, can either be JOINT or WHEEL
1060  * @return mode value
1061  */
1062 char *
1063 DynamixelServoInterface::mode() const
1064 {
1065  return data->mode;
1066 }
1067 
1068 /** Get maximum length of mode value.
1069  * @return length of mode value, can be length of the array or number of
1070  * maximum number of characters for a string
1071  */
1072 size_t
1073 DynamixelServoInterface::maxlenof_mode() const
1074 {
1075  return 5;
1076 }
1077 
1078 /** Set mode value.
1079  * Working mode, can either be JOINT or WHEEL
1080  * @param new_mode new mode value
1081  */
1082 void
1083 DynamixelServoInterface::set_mode(const char * new_mode)
1084 {
1085  strncpy(data->mode, new_mode, sizeof(data->mode));
1086  data_changed = true;
1087 }
1088 
1089 /** Get angle_margin value.
1090  *
1091  Margin in radians around a target servo value to consider the
1092  motion as final.
1093 
1094  * @return angle_margin value
1095  */
1096 float
1097 DynamixelServoInterface::angle_margin() const
1098 {
1099  return data->angle_margin;
1100 }
1101 
1102 /** Get maximum length of angle_margin value.
1103  * @return length of angle_margin value, can be length of the array or number of
1104  * maximum number of characters for a string
1105  */
1106 size_t
1107 DynamixelServoInterface::maxlenof_angle_margin() const
1108 {
1109  return 1;
1110 }
1111 
1112 /** Set angle_margin value.
1113  *
1114  Margin in radians around a target servo value to consider the
1115  motion as final.
1116 
1117  * @param new_angle_margin new angle_margin value
1118  */
1119 void
1120 DynamixelServoInterface::set_angle_margin(const float new_angle_margin)
1121 {
1122  data->angle_margin = new_angle_margin;
1123  data_changed = true;
1124 }
1125 
1126 /** Get autorecover_enabled value.
1127  * Automatically recover on alarm shutdown
1128  * @return autorecover_enabled value
1129  */
1130 bool
1131 DynamixelServoInterface::is_autorecover_enabled() const
1132 {
1133  return data->autorecover_enabled;
1134 }
1135 
1136 /** Get maximum length of autorecover_enabled value.
1137  * @return length of autorecover_enabled value, can be length of the array or number of
1138  * maximum number of characters for a string
1139  */
1140 size_t
1141 DynamixelServoInterface::maxlenof_autorecover_enabled() const
1142 {
1143  return 1;
1144 }
1145 
1146 /** Set autorecover_enabled value.
1147  * Automatically recover on alarm shutdown
1148  * @param new_autorecover_enabled new autorecover_enabled value
1149  */
1150 void
1151 DynamixelServoInterface::set_autorecover_enabled(const bool new_autorecover_enabled)
1152 {
1153  data->autorecover_enabled = new_autorecover_enabled;
1154  data_changed = true;
1155 }
1156 
1157 /** Get msgid value.
1158  * The ID of the message that is currently being
1159  processed, or 0 if no message is being processed.
1160  * @return msgid value
1161  */
1162 uint32_t
1163 DynamixelServoInterface::msgid() const
1164 {
1165  return data->msgid;
1166 }
1167 
1168 /** Get maximum length of msgid value.
1169  * @return length of msgid value, can be length of the array or number of
1170  * maximum number of characters for a string
1171  */
1172 size_t
1173 DynamixelServoInterface::maxlenof_msgid() const
1174 {
1175  return 1;
1176 }
1177 
1178 /** Set msgid value.
1179  * The ID of the message that is currently being
1180  processed, or 0 if no message is being processed.
1181  * @param new_msgid new msgid value
1182  */
1183 void
1184 DynamixelServoInterface::set_msgid(const uint32_t new_msgid)
1185 {
1186  data->msgid = new_msgid;
1187  data_changed = true;
1188 }
1189 
1190 /** Get final value.
1191  * True, if the last goto command has been finished,
1192  false if it is still running
1193  * @return final value
1194  */
1195 bool
1196 DynamixelServoInterface::is_final() const
1197 {
1198  return data->final;
1199 }
1200 
1201 /** Get maximum length of final value.
1202  * @return length of final value, can be length of the array or number of
1203  * maximum number of characters for a string
1204  */
1205 size_t
1206 DynamixelServoInterface::maxlenof_final() const
1207 {
1208  return 1;
1209 }
1210 
1211 /** Set final value.
1212  * True, if the last goto command has been finished,
1213  false if it is still running
1214  * @param new_final new final value
1215  */
1216 void
1217 DynamixelServoInterface::set_final(const bool new_final)
1218 {
1219  data->final = new_final;
1220  data_changed = true;
1221 }
1222 
1223 /** Get error_code value.
1224  * Failure code set if
1225  final is true. ERROR_NONE if no error occured.
1226  * @return error_code value
1227  */
1229 DynamixelServoInterface::error_code() const
1230 {
1231  return (DynamixelServoInterface::ErrorCode)data->error_code;
1232 }
1233 
1234 /** Get maximum length of error_code value.
1235  * @return length of error_code value, can be length of the array or number of
1236  * maximum number of characters for a string
1237  */
1238 size_t
1239 DynamixelServoInterface::maxlenof_error_code() const
1240 {
1241  return 1;
1242 }
1243 
1244 /** Set error_code value.
1245  * Failure code set if
1246  final is true. ERROR_NONE if no error occured.
1247  * @param new_error_code new error_code value
1248  */
1249 void
1250 DynamixelServoInterface::set_error_code(const ErrorCode new_error_code)
1251 {
1252  data->error_code = new_error_code;
1253  data_changed = true;
1254 }
1255 
1256 /* =========== message create =========== */
1257 Message *
1258 DynamixelServoInterface::create_message(const char *type) const
1259 {
1260  if ( strncmp("StopMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1261  return new StopMessage();
1262  } else if ( strncmp("FlushMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1263  return new FlushMessage();
1264  } else if ( strncmp("GotoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1265  return new GotoMessage();
1266  } else if ( strncmp("TimedGotoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1267  return new TimedGotoMessage();
1268  } else if ( strncmp("SetModeMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1269  return new SetModeMessage();
1270  } else if ( strncmp("SetSpeedMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1271  return new SetSpeedMessage();
1272  } else if ( strncmp("SetEnabledMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1273  return new SetEnabledMessage();
1274  } else if ( strncmp("SetVelocityMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1275  return new SetVelocityMessage();
1276  } else if ( strncmp("SetMarginMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1277  return new SetMarginMessage();
1278  } else if ( strncmp("SetComplianceValuesMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1279  return new SetComplianceValuesMessage();
1280  } else if ( strncmp("SetGoalSpeedMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1281  return new SetGoalSpeedMessage();
1282  } else if ( strncmp("SetTorqueLimitMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1283  return new SetTorqueLimitMessage();
1284  } else if ( strncmp("SetPunchMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1285  return new SetPunchMessage();
1286  } else if ( strncmp("GotoPositionMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1287  return new GotoPositionMessage();
1288  } else if ( strncmp("SetAngleLimitsMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1289  return new SetAngleLimitsMessage();
1290  } else if ( strncmp("ResetRawErrorMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1291  return new ResetRawErrorMessage();
1292  } else if ( strncmp("SetPreventAlarmShutdownMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1293  return new SetPreventAlarmShutdownMessage();
1294  } else if ( strncmp("SetAutorecoverEnabledMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1295  return new SetAutorecoverEnabledMessage();
1296  } else if ( strncmp("RecoverMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
1297  return new RecoverMessage();
1298  } else {
1299  throw UnknownTypeException("The given type '%s' does not match any known "
1300  "message type for this interface type.", type);
1301  }
1302 }
1303 
1304 
1305 /** Copy values from other interface.
1306  * @param other other interface to copy values from
1307  */
1308 void
1309 DynamixelServoInterface::copy_values(const Interface *other)
1310 {
1311  const DynamixelServoInterface *oi = dynamic_cast<const DynamixelServoInterface *>(other);
1312  if (oi == NULL) {
1313  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
1314  type(), other->type());
1315  }
1316  memcpy(data, oi->data, sizeof(DynamixelServoInterface_data_t));
1317 }
1318 
1319 const char *
1320 DynamixelServoInterface::enum_tostring(const char *enumtype, int val) const
1321 {
1322  if (strcmp(enumtype, "ErrorCode") == 0) {
1323  return tostring_ErrorCode((ErrorCode)val);
1324  }
1325  if (strcmp(enumtype, "WorkingMode") == 0) {
1326  return tostring_WorkingMode((WorkingMode)val);
1327  }
1328  throw UnknownTypeException("Unknown enum type %s", enumtype);
1329 }
1330 
1331 /* =========== messages =========== */
1332 /** @class DynamixelServoInterface::StopMessage <interfaces/DynamixelServoInterface.h>
1333  * StopMessage Fawkes BlackBoard Interface Message.
1334  *
1335 
1336  */
1337 
1338 
1339 /** Constructor */
1340 DynamixelServoInterface::StopMessage::StopMessage() : Message("StopMessage")
1341 {
1342  data_size = sizeof(StopMessage_data_t);
1343  data_ptr = malloc(data_size);
1344  memset(data_ptr, 0, data_size);
1345  data = (StopMessage_data_t *)data_ptr;
1347  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1348  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1349  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1350  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1351  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1352  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1353 }
1354 
1355 /** Destructor */
1357 {
1358  free(data_ptr);
1359 }
1360 
1361 /** Copy constructor.
1362  * @param m message to copy from
1363  */
1365 {
1366  data_size = m->data_size;
1367  data_ptr = malloc(data_size);
1368  memcpy(data_ptr, m->data_ptr, data_size);
1369  data = (StopMessage_data_t *)data_ptr;
1371 }
1372 
1373 /* Methods */
1374 /** Clone this message.
1375  * Produces a message of the same type as this message and copies the
1376  * data to the new message.
1377  * @return clone of this message
1378  */
1379 Message *
1381 {
1382  return new DynamixelServoInterface::StopMessage(this);
1383 }
1384 /** @class DynamixelServoInterface::FlushMessage <interfaces/DynamixelServoInterface.h>
1385  * FlushMessage Fawkes BlackBoard Interface Message.
1386  *
1387 
1388  */
1389 
1390 
1391 /** Constructor */
1393 {
1394  data_size = sizeof(FlushMessage_data_t);
1395  data_ptr = malloc(data_size);
1396  memset(data_ptr, 0, data_size);
1397  data = (FlushMessage_data_t *)data_ptr;
1399  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1400  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1401  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1402  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1403  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1404  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1405 }
1406 
1407 /** Destructor */
1409 {
1410  free(data_ptr);
1411 }
1412 
1413 /** Copy constructor.
1414  * @param m message to copy from
1415  */
1417 {
1418  data_size = m->data_size;
1419  data_ptr = malloc(data_size);
1420  memcpy(data_ptr, m->data_ptr, data_size);
1421  data = (FlushMessage_data_t *)data_ptr;
1423 }
1424 
1425 /* Methods */
1426 /** Clone this message.
1427  * Produces a message of the same type as this message and copies the
1428  * data to the new message.
1429  * @return clone of this message
1430  */
1431 Message *
1433 {
1434  return new DynamixelServoInterface::FlushMessage(this);
1435 }
1436 /** @class DynamixelServoInterface::GotoMessage <interfaces/DynamixelServoInterface.h>
1437  * GotoMessage Fawkes BlackBoard Interface Message.
1438  *
1439 
1440  */
1441 
1442 
1443 /** Constructor with initial values.
1444  * @param ini_angle initial value for angle
1445  */
1446 DynamixelServoInterface::GotoMessage::GotoMessage(const float ini_angle) : Message("GotoMessage")
1447 {
1448  data_size = sizeof(GotoMessage_data_t);
1449  data_ptr = malloc(data_size);
1450  memset(data_ptr, 0, data_size);
1451  data = (GotoMessage_data_t *)data_ptr;
1453  data->angle = ini_angle;
1454  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1455  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1456  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1457  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1458  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1459  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1460  add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
1461 }
1462 /** Constructor */
1464 {
1465  data_size = sizeof(GotoMessage_data_t);
1466  data_ptr = malloc(data_size);
1467  memset(data_ptr, 0, data_size);
1468  data = (GotoMessage_data_t *)data_ptr;
1470  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1471  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1472  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1473  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1474  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1475  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1476  add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
1477 }
1478 
1479 /** Destructor */
1481 {
1482  free(data_ptr);
1483 }
1484 
1485 /** Copy constructor.
1486  * @param m message to copy from
1487  */
1489 {
1490  data_size = m->data_size;
1491  data_ptr = malloc(data_size);
1492  memcpy(data_ptr, m->data_ptr, data_size);
1493  data = (GotoMessage_data_t *)data_ptr;
1495 }
1496 
1497 /* Methods */
1498 /** Get angle value.
1499  * Current angle.
1500  * @return angle value
1501  */
1502 float
1504 {
1505  return data->angle;
1506 }
1507 
1508 /** Get maximum length of angle value.
1509  * @return length of angle value, can be length of the array or number of
1510  * maximum number of characters for a string
1511  */
1512 size_t
1514 {
1515  return 1;
1516 }
1517 
1518 /** Set angle value.
1519  * Current angle.
1520  * @param new_angle new angle value
1521  */
1522 void
1524 {
1525  data->angle = new_angle;
1526 }
1527 
1528 /** Clone this message.
1529  * Produces a message of the same type as this message and copies the
1530  * data to the new message.
1531  * @return clone of this message
1532  */
1533 Message *
1535 {
1536  return new DynamixelServoInterface::GotoMessage(this);
1537 }
1538 /** @class DynamixelServoInterface::TimedGotoMessage <interfaces/DynamixelServoInterface.h>
1539  * TimedGotoMessage Fawkes BlackBoard Interface Message.
1540  *
1541 
1542  */
1543 
1544 
1545 /** Constructor with initial values.
1546  * @param ini_time_sec initial value for time_sec
1547  * @param ini_angle initial value for angle
1548  */
1549 DynamixelServoInterface::TimedGotoMessage::TimedGotoMessage(const float ini_time_sec, const float ini_angle) : Message("TimedGotoMessage")
1550 {
1551  data_size = sizeof(TimedGotoMessage_data_t);
1552  data_ptr = malloc(data_size);
1553  memset(data_ptr, 0, data_size);
1554  data = (TimedGotoMessage_data_t *)data_ptr;
1556  data->time_sec = ini_time_sec;
1557  data->angle = ini_angle;
1558  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1559  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1560  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1561  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1562  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1563  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1564  add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
1565  add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
1566 }
1567 /** Constructor */
1569 {
1570  data_size = sizeof(TimedGotoMessage_data_t);
1571  data_ptr = malloc(data_size);
1572  memset(data_ptr, 0, data_size);
1573  data = (TimedGotoMessage_data_t *)data_ptr;
1575  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1576  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1577  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1578  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1579  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1580  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1581  add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
1582  add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
1583 }
1584 
1585 /** Destructor */
1587 {
1588  free(data_ptr);
1589 }
1590 
1591 /** Copy constructor.
1592  * @param m message to copy from
1593  */
1595 {
1596  data_size = m->data_size;
1597  data_ptr = malloc(data_size);
1598  memcpy(data_ptr, m->data_ptr, data_size);
1599  data = (TimedGotoMessage_data_t *)data_ptr;
1601 }
1602 
1603 /* Methods */
1604 /** Get time_sec value.
1605  * Time in seconds when to reach
1606  the final position.
1607  * @return time_sec value
1608  */
1609 float
1611 {
1612  return data->time_sec;
1613 }
1614 
1615 /** Get maximum length of time_sec value.
1616  * @return length of time_sec value, can be length of the array or number of
1617  * maximum number of characters for a string
1618  */
1619 size_t
1621 {
1622  return 1;
1623 }
1624 
1625 /** Set time_sec value.
1626  * Time in seconds when to reach
1627  the final position.
1628  * @param new_time_sec new time_sec value
1629  */
1630 void
1632 {
1633  data->time_sec = new_time_sec;
1634 }
1635 
1636 /** Get angle value.
1637  * Current angle.
1638  * @return angle value
1639  */
1640 float
1642 {
1643  return data->angle;
1644 }
1645 
1646 /** Get maximum length of angle value.
1647  * @return length of angle value, can be length of the array or number of
1648  * maximum number of characters for a string
1649  */
1650 size_t
1652 {
1653  return 1;
1654 }
1655 
1656 /** Set angle value.
1657  * Current angle.
1658  * @param new_angle new angle value
1659  */
1660 void
1662 {
1663  data->angle = new_angle;
1664 }
1665 
1666 /** Clone this message.
1667  * Produces a message of the same type as this message and copies the
1668  * data to the new message.
1669  * @return clone of this message
1670  */
1671 Message *
1673 {
1675 }
1676 /** @class DynamixelServoInterface::SetModeMessage <interfaces/DynamixelServoInterface.h>
1677  * SetModeMessage Fawkes BlackBoard Interface Message.
1678  *
1679 
1680  */
1681 
1682 
1683 /** Constructor with initial values.
1684  * @param ini_mode initial value for mode
1685  */
1686 DynamixelServoInterface::SetModeMessage::SetModeMessage(const uint8_t ini_mode) : Message("SetModeMessage")
1687 {
1688  data_size = sizeof(SetModeMessage_data_t);
1689  data_ptr = malloc(data_size);
1690  memset(data_ptr, 0, data_size);
1691  data = (SetModeMessage_data_t *)data_ptr;
1693  data->mode = ini_mode;
1694  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1695  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1696  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1697  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1698  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1699  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1700  add_fieldinfo(IFT_UINT8, "mode", 1, &data->mode);
1701 }
1702 /** Constructor */
1704 {
1705  data_size = sizeof(SetModeMessage_data_t);
1706  data_ptr = malloc(data_size);
1707  memset(data_ptr, 0, data_size);
1708  data = (SetModeMessage_data_t *)data_ptr;
1710  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1711  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1712  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1713  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1714  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1715  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1716  add_fieldinfo(IFT_UINT8, "mode", 1, &data->mode);
1717 }
1718 
1719 /** Destructor */
1721 {
1722  free(data_ptr);
1723 }
1724 
1725 /** Copy constructor.
1726  * @param m message to copy from
1727  */
1729 {
1730  data_size = m->data_size;
1731  data_ptr = malloc(data_size);
1732  memcpy(data_ptr, m->data_ptr, data_size);
1733  data = (SetModeMessage_data_t *)data_ptr;
1735 }
1736 
1737 /* Methods */
1738 /** Get mode value.
1739  * New mode, see the enum WorkingMode in this interface
1740  * @return mode value
1741  */
1742 uint8_t
1744 {
1745  return data->mode;
1746 }
1747 
1748 /** Get maximum length of mode value.
1749  * @return length of mode value, can be length of the array or number of
1750  * maximum number of characters for a string
1751  */
1752 size_t
1754 {
1755  return 1;
1756 }
1757 
1758 /** Set mode value.
1759  * New mode, see the enum WorkingMode in this interface
1760  * @param new_mode new mode value
1761  */
1762 void
1764 {
1765  data->mode = new_mode;
1766 }
1767 
1768 /** Clone this message.
1769  * Produces a message of the same type as this message and copies the
1770  * data to the new message.
1771  * @return clone of this message
1772  */
1773 Message *
1775 {
1776  return new DynamixelServoInterface::SetModeMessage(this);
1777 }
1778 /** @class DynamixelServoInterface::SetSpeedMessage <interfaces/DynamixelServoInterface.h>
1779  * SetSpeedMessage Fawkes BlackBoard Interface Message.
1780  *
1781 
1782  */
1783 
1784 
1785 /** Constructor with initial values.
1786  * @param ini_speed initial value for speed
1787  */
1788 DynamixelServoInterface::SetSpeedMessage::SetSpeedMessage(const uint16_t ini_speed) : Message("SetSpeedMessage")
1789 {
1790  data_size = sizeof(SetSpeedMessage_data_t);
1791  data_ptr = malloc(data_size);
1792  memset(data_ptr, 0, data_size);
1793  data = (SetSpeedMessage_data_t *)data_ptr;
1795  data->speed = ini_speed;
1796  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1797  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1798  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1799  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1800  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1801  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1802  add_fieldinfo(IFT_UINT16, "speed", 1, &data->speed);
1803 }
1804 /** Constructor */
1806 {
1807  data_size = sizeof(SetSpeedMessage_data_t);
1808  data_ptr = malloc(data_size);
1809  memset(data_ptr, 0, data_size);
1810  data = (SetSpeedMessage_data_t *)data_ptr;
1812  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1813  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1814  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1815  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1816  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1817  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1818  add_fieldinfo(IFT_UINT16, "speed", 1, &data->speed);
1819 }
1820 
1821 /** Destructor */
1823 {
1824  free(data_ptr);
1825 }
1826 
1827 /** Copy constructor.
1828  * @param m message to copy from
1829  */
1831 {
1832  data_size = m->data_size;
1833  data_ptr = malloc(data_size);
1834  memcpy(data_ptr, m->data_ptr, data_size);
1835  data = (SetSpeedMessage_data_t *)data_ptr;
1837 }
1838 
1839 /* Methods */
1840 /** Get speed value.
1841  * New speed. Used when the servo is in wheel mode. Bits 0-9 determine the rotation speed and bit 10 determines the rotation direction (0 for ccw and 1 for cw)
1842  * @return speed value
1843  */
1844 uint16_t
1846 {
1847  return data->speed;
1848 }
1849 
1850 /** Get maximum length of speed value.
1851  * @return length of speed value, can be length of the array or number of
1852  * maximum number of characters for a string
1853  */
1854 size_t
1856 {
1857  return 1;
1858 }
1859 
1860 /** Set speed value.
1861  * New speed. Used when the servo is in wheel mode. Bits 0-9 determine the rotation speed and bit 10 determines the rotation direction (0 for ccw and 1 for cw)
1862  * @param new_speed new speed value
1863  */
1864 void
1866 {
1867  data->speed = new_speed;
1868 }
1869 
1870 /** Clone this message.
1871  * Produces a message of the same type as this message and copies the
1872  * data to the new message.
1873  * @return clone of this message
1874  */
1875 Message *
1877 {
1879 }
1880 /** @class DynamixelServoInterface::SetEnabledMessage <interfaces/DynamixelServoInterface.h>
1881  * SetEnabledMessage Fawkes BlackBoard Interface Message.
1882  *
1883 
1884  */
1885 
1886 
1887 /** Constructor with initial values.
1888  * @param ini_enabled initial value for enabled
1889  */
1890 DynamixelServoInterface::SetEnabledMessage::SetEnabledMessage(const bool ini_enabled) : Message("SetEnabledMessage")
1891 {
1892  data_size = sizeof(SetEnabledMessage_data_t);
1893  data_ptr = malloc(data_size);
1894  memset(data_ptr, 0, data_size);
1895  data = (SetEnabledMessage_data_t *)data_ptr;
1897  data->enabled = ini_enabled;
1898  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1899  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1900  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1901  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1902  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1903  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1904  add_fieldinfo(IFT_BOOL, "enabled", 1, &data->enabled);
1905 }
1906 /** Constructor */
1908 {
1909  data_size = sizeof(SetEnabledMessage_data_t);
1910  data_ptr = malloc(data_size);
1911  memset(data_ptr, 0, data_size);
1912  data = (SetEnabledMessage_data_t *)data_ptr;
1914  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
1915  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
1916  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
1917  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
1918  enum_map_WorkingMode[(int)JOINT] = "JOINT";
1919  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
1920  add_fieldinfo(IFT_BOOL, "enabled", 1, &data->enabled);
1921 }
1922 
1923 /** Destructor */
1925 {
1926  free(data_ptr);
1927 }
1928 
1929 /** Copy constructor.
1930  * @param m message to copy from
1931  */
1933 {
1934  data_size = m->data_size;
1935  data_ptr = malloc(data_size);
1936  memcpy(data_ptr, m->data_ptr, data_size);
1937  data = (SetEnabledMessage_data_t *)data_ptr;
1939 }
1940 
1941 /* Methods */
1942 /** Get enabled value.
1943  * Is the servo enabled?
1944  * @return enabled value
1945  */
1946 bool
1948 {
1949  return data->enabled;
1950 }
1951 
1952 /** Get maximum length of enabled value.
1953  * @return length of enabled value, can be length of the array or number of
1954  * maximum number of characters for a string
1955  */
1956 size_t
1958 {
1959  return 1;
1960 }
1961 
1962 /** Set enabled value.
1963  * Is the servo enabled?
1964  * @param new_enabled new enabled value
1965  */
1966 void
1968 {
1969  data->enabled = new_enabled;
1970 }
1971 
1972 /** Clone this message.
1973  * Produces a message of the same type as this message and copies the
1974  * data to the new message.
1975  * @return clone of this message
1976  */
1977 Message *
1979 {
1981 }
1982 /** @class DynamixelServoInterface::SetVelocityMessage <interfaces/DynamixelServoInterface.h>
1983  * SetVelocityMessage Fawkes BlackBoard Interface Message.
1984  *
1985 
1986  */
1987 
1988 
1989 /** Constructor with initial values.
1990  * @param ini_velocity initial value for velocity
1991  */
1992 DynamixelServoInterface::SetVelocityMessage::SetVelocityMessage(const float ini_velocity) : Message("SetVelocityMessage")
1993 {
1994  data_size = sizeof(SetVelocityMessage_data_t);
1995  data_ptr = malloc(data_size);
1996  memset(data_ptr, 0, data_size);
1997  data = (SetVelocityMessage_data_t *)data_ptr;
1999  data->velocity = ini_velocity;
2000  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2001  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2002  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2003  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2004  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2005  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2006  add_fieldinfo(IFT_FLOAT, "velocity", 1, &data->velocity);
2007 }
2008 /** Constructor */
2010 {
2011  data_size = sizeof(SetVelocityMessage_data_t);
2012  data_ptr = malloc(data_size);
2013  memset(data_ptr, 0, data_size);
2014  data = (SetVelocityMessage_data_t *)data_ptr;
2016  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2017  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2018  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2019  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2020  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2021  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2022  add_fieldinfo(IFT_FLOAT, "velocity", 1, &data->velocity);
2023 }
2024 
2025 /** Destructor */
2027 {
2028  free(data_ptr);
2029 }
2030 
2031 /** Copy constructor.
2032  * @param m message to copy from
2033  */
2035 {
2036  data_size = m->data_size;
2037  data_ptr = malloc(data_size);
2038  memcpy(data_ptr, m->data_ptr, data_size);
2039  data = (SetVelocityMessage_data_t *)data_ptr;
2041 }
2042 
2043 /* Methods */
2044 /** Get velocity value.
2045  * Maximum servo velocity currently reached.
2046  * @return velocity value
2047  */
2048 float
2050 {
2051  return data->velocity;
2052 }
2053 
2054 /** Get maximum length of velocity value.
2055  * @return length of velocity value, can be length of the array or number of
2056  * maximum number of characters for a string
2057  */
2058 size_t
2060 {
2061  return 1;
2062 }
2063 
2064 /** Set velocity value.
2065  * Maximum servo velocity currently reached.
2066  * @param new_velocity new velocity value
2067  */
2068 void
2070 {
2071  data->velocity = new_velocity;
2072 }
2073 
2074 /** Clone this message.
2075  * Produces a message of the same type as this message and copies the
2076  * data to the new message.
2077  * @return clone of this message
2078  */
2079 Message *
2081 {
2083 }
2084 /** @class DynamixelServoInterface::SetMarginMessage <interfaces/DynamixelServoInterface.h>
2085  * SetMarginMessage Fawkes BlackBoard Interface Message.
2086  *
2087 
2088  */
2089 
2090 
2091 /** Constructor with initial values.
2092  * @param ini_angle_margin initial value for angle_margin
2093  */
2094 DynamixelServoInterface::SetMarginMessage::SetMarginMessage(const float ini_angle_margin) : Message("SetMarginMessage")
2095 {
2096  data_size = sizeof(SetMarginMessage_data_t);
2097  data_ptr = malloc(data_size);
2098  memset(data_ptr, 0, data_size);
2099  data = (SetMarginMessage_data_t *)data_ptr;
2101  data->angle_margin = ini_angle_margin;
2102  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2103  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2104  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2105  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2106  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2107  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2108  add_fieldinfo(IFT_FLOAT, "angle_margin", 1, &data->angle_margin);
2109 }
2110 /** Constructor */
2112 {
2113  data_size = sizeof(SetMarginMessage_data_t);
2114  data_ptr = malloc(data_size);
2115  memset(data_ptr, 0, data_size);
2116  data = (SetMarginMessage_data_t *)data_ptr;
2118  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2119  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2120  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2121  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2122  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2123  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2124  add_fieldinfo(IFT_FLOAT, "angle_margin", 1, &data->angle_margin);
2125 }
2126 
2127 /** Destructor */
2129 {
2130  free(data_ptr);
2131 }
2132 
2133 /** Copy constructor.
2134  * @param m message to copy from
2135  */
2137 {
2138  data_size = m->data_size;
2139  data_ptr = malloc(data_size);
2140  memcpy(data_ptr, m->data_ptr, data_size);
2141  data = (SetMarginMessage_data_t *)data_ptr;
2143 }
2144 
2145 /* Methods */
2146 /** Get angle_margin value.
2147  *
2148  Margin in radians around a target servo value to consider the
2149  motion as final.
2150 
2151  * @return angle_margin value
2152  */
2153 float
2155 {
2156  return data->angle_margin;
2157 }
2158 
2159 /** Get maximum length of angle_margin value.
2160  * @return length of angle_margin value, can be length of the array or number of
2161  * maximum number of characters for a string
2162  */
2163 size_t
2165 {
2166  return 1;
2167 }
2168 
2169 /** Set angle_margin value.
2170  *
2171  Margin in radians around a target servo value to consider the
2172  motion as final.
2173 
2174  * @param new_angle_margin new angle_margin value
2175  */
2176 void
2178 {
2179  data->angle_margin = new_angle_margin;
2180 }
2181 
2182 /** Clone this message.
2183  * Produces a message of the same type as this message and copies the
2184  * data to the new message.
2185  * @return clone of this message
2186  */
2187 Message *
2189 {
2191 }
2192 /** @class DynamixelServoInterface::SetComplianceValuesMessage <interfaces/DynamixelServoInterface.h>
2193  * SetComplianceValuesMessage Fawkes BlackBoard Interface Message.
2194  *
2195 
2196  */
2197 
2198 
2199 /** Constructor with initial values.
2200  * @param ini_cw_margin initial value for cw_margin
2201  * @param ini_ccw_margin initial value for ccw_margin
2202  * @param ini_cw_slope initial value for cw_slope
2203  * @param ini_ccw_slope initial value for ccw_slope
2204  */
2205 DynamixelServoInterface::SetComplianceValuesMessage::SetComplianceValuesMessage(const uint8_t ini_cw_margin, const uint8_t ini_ccw_margin, const uint8_t ini_cw_slope, const uint8_t ini_ccw_slope) : Message("SetComplianceValuesMessage")
2206 {
2207  data_size = sizeof(SetComplianceValuesMessage_data_t);
2208  data_ptr = malloc(data_size);
2209  memset(data_ptr, 0, data_size);
2210  data = (SetComplianceValuesMessage_data_t *)data_ptr;
2212  data->cw_margin = ini_cw_margin;
2213  data->ccw_margin = ini_ccw_margin;
2214  data->cw_slope = ini_cw_slope;
2215  data->ccw_slope = ini_ccw_slope;
2216  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2217  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2218  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2219  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2220  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2221  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2222  add_fieldinfo(IFT_UINT8, "cw_margin", 1, &data->cw_margin);
2223  add_fieldinfo(IFT_UINT8, "ccw_margin", 1, &data->ccw_margin);
2224  add_fieldinfo(IFT_UINT8, "cw_slope", 1, &data->cw_slope);
2225  add_fieldinfo(IFT_UINT8, "ccw_slope", 1, &data->ccw_slope);
2226 }
2227 /** Constructor */
2229 {
2230  data_size = sizeof(SetComplianceValuesMessage_data_t);
2231  data_ptr = malloc(data_size);
2232  memset(data_ptr, 0, data_size);
2233  data = (SetComplianceValuesMessage_data_t *)data_ptr;
2235  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2236  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2237  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2238  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2239  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2240  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2241  add_fieldinfo(IFT_UINT8, "cw_margin", 1, &data->cw_margin);
2242  add_fieldinfo(IFT_UINT8, "ccw_margin", 1, &data->ccw_margin);
2243  add_fieldinfo(IFT_UINT8, "cw_slope", 1, &data->cw_slope);
2244  add_fieldinfo(IFT_UINT8, "ccw_slope", 1, &data->ccw_slope);
2245 }
2246 
2247 /** Destructor */
2249 {
2250  free(data_ptr);
2251 }
2252 
2253 /** Copy constructor.
2254  * @param m message to copy from
2255  */
2257 {
2258  data_size = m->data_size;
2259  data_ptr = malloc(data_size);
2260  memcpy(data_ptr, m->data_ptr, data_size);
2261  data = (SetComplianceValuesMessage_data_t *)data_ptr;
2263 }
2264 
2265 /* Methods */
2266 /** Get cw_margin value.
2267  * New CW compliance margin
2268  * @return cw_margin value
2269  */
2270 uint8_t
2272 {
2273  return data->cw_margin;
2274 }
2275 
2276 /** Get maximum length of cw_margin value.
2277  * @return length of cw_margin value, can be length of the array or number of
2278  * maximum number of characters for a string
2279  */
2280 size_t
2282 {
2283  return 1;
2284 }
2285 
2286 /** Set cw_margin value.
2287  * New CW compliance margin
2288  * @param new_cw_margin new cw_margin value
2289  */
2290 void
2292 {
2293  data->cw_margin = new_cw_margin;
2294 }
2295 
2296 /** Get ccw_margin value.
2297  * New CCW compliance margin
2298  * @return ccw_margin value
2299  */
2300 uint8_t
2302 {
2303  return data->ccw_margin;
2304 }
2305 
2306 /** Get maximum length of ccw_margin value.
2307  * @return length of ccw_margin value, can be length of the array or number of
2308  * maximum number of characters for a string
2309  */
2310 size_t
2312 {
2313  return 1;
2314 }
2315 
2316 /** Set ccw_margin value.
2317  * New CCW compliance margin
2318  * @param new_ccw_margin new ccw_margin value
2319  */
2320 void
2322 {
2323  data->ccw_margin = new_ccw_margin;
2324 }
2325 
2326 /** Get cw_slope value.
2327  * New CW compliance slope
2328  * @return cw_slope value
2329  */
2330 uint8_t
2332 {
2333  return data->cw_slope;
2334 }
2335 
2336 /** Get maximum length of cw_slope value.
2337  * @return length of cw_slope value, can be length of the array or number of
2338  * maximum number of characters for a string
2339  */
2340 size_t
2342 {
2343  return 1;
2344 }
2345 
2346 /** Set cw_slope value.
2347  * New CW compliance slope
2348  * @param new_cw_slope new cw_slope value
2349  */
2350 void
2352 {
2353  data->cw_slope = new_cw_slope;
2354 }
2355 
2356 /** Get ccw_slope value.
2357  * New LED enabled value
2358  * @return ccw_slope value
2359  */
2360 uint8_t
2362 {
2363  return data->ccw_slope;
2364 }
2365 
2366 /** Get maximum length of ccw_slope value.
2367  * @return length of ccw_slope value, can be length of the array or number of
2368  * maximum number of characters for a string
2369  */
2370 size_t
2372 {
2373  return 1;
2374 }
2375 
2376 /** Set ccw_slope value.
2377  * New LED enabled value
2378  * @param new_ccw_slope new ccw_slope value
2379  */
2380 void
2382 {
2383  data->ccw_slope = new_ccw_slope;
2384 }
2385 
2386 /** Clone this message.
2387  * Produces a message of the same type as this message and copies the
2388  * data to the new message.
2389  * @return clone of this message
2390  */
2391 Message *
2393 {
2395 }
2396 /** @class DynamixelServoInterface::SetGoalSpeedMessage <interfaces/DynamixelServoInterface.h>
2397  * SetGoalSpeedMessage Fawkes BlackBoard Interface Message.
2398  *
2399 
2400  */
2401 
2402 
2403 /** Constructor with initial values.
2404  * @param ini_goal_speed initial value for goal_speed
2405  */
2406 DynamixelServoInterface::SetGoalSpeedMessage::SetGoalSpeedMessage(const uint32_t ini_goal_speed) : Message("SetGoalSpeedMessage")
2407 {
2408  data_size = sizeof(SetGoalSpeedMessage_data_t);
2409  data_ptr = malloc(data_size);
2410  memset(data_ptr, 0, data_size);
2411  data = (SetGoalSpeedMessage_data_t *)data_ptr;
2413  data->goal_speed = ini_goal_speed;
2414  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2415  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2416  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2417  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2418  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2419  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2420  add_fieldinfo(IFT_UINT32, "goal_speed", 1, &data->goal_speed);
2421 }
2422 /** Constructor */
2424 {
2425  data_size = sizeof(SetGoalSpeedMessage_data_t);
2426  data_ptr = malloc(data_size);
2427  memset(data_ptr, 0, data_size);
2428  data = (SetGoalSpeedMessage_data_t *)data_ptr;
2430  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2431  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2432  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2433  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2434  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2435  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2436  add_fieldinfo(IFT_UINT32, "goal_speed", 1, &data->goal_speed);
2437 }
2438 
2439 /** Destructor */
2441 {
2442  free(data_ptr);
2443 }
2444 
2445 /** Copy constructor.
2446  * @param m message to copy from
2447  */
2449 {
2450  data_size = m->data_size;
2451  data_ptr = malloc(data_size);
2452  memcpy(data_ptr, m->data_ptr, data_size);
2453  data = (SetGoalSpeedMessage_data_t *)data_ptr;
2455 }
2456 
2457 /* Methods */
2458 /** Get goal_speed value.
2459  * New goal speed
2460  * @return goal_speed value
2461  */
2462 uint32_t
2464 {
2465  return data->goal_speed;
2466 }
2467 
2468 /** Get maximum length of goal_speed value.
2469  * @return length of goal_speed value, can be length of the array or number of
2470  * maximum number of characters for a string
2471  */
2472 size_t
2474 {
2475  return 1;
2476 }
2477 
2478 /** Set goal_speed value.
2479  * New goal speed
2480  * @param new_goal_speed new goal_speed value
2481  */
2482 void
2484 {
2485  data->goal_speed = new_goal_speed;
2486 }
2487 
2488 /** Clone this message.
2489  * Produces a message of the same type as this message and copies the
2490  * data to the new message.
2491  * @return clone of this message
2492  */
2493 Message *
2495 {
2497 }
2498 /** @class DynamixelServoInterface::SetTorqueLimitMessage <interfaces/DynamixelServoInterface.h>
2499  * SetTorqueLimitMessage Fawkes BlackBoard Interface Message.
2500  *
2501 
2502  */
2503 
2504 
2505 /** Constructor with initial values.
2506  * @param ini_torque_limit initial value for torque_limit
2507  */
2508 DynamixelServoInterface::SetTorqueLimitMessage::SetTorqueLimitMessage(const uint32_t ini_torque_limit) : Message("SetTorqueLimitMessage")
2509 {
2510  data_size = sizeof(SetTorqueLimitMessage_data_t);
2511  data_ptr = malloc(data_size);
2512  memset(data_ptr, 0, data_size);
2513  data = (SetTorqueLimitMessage_data_t *)data_ptr;
2515  data->torque_limit = ini_torque_limit;
2516  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2517  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2518  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2519  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2520  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2521  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2522  add_fieldinfo(IFT_UINT32, "torque_limit", 1, &data->torque_limit);
2523 }
2524 /** Constructor */
2526 {
2527  data_size = sizeof(SetTorqueLimitMessage_data_t);
2528  data_ptr = malloc(data_size);
2529  memset(data_ptr, 0, data_size);
2530  data = (SetTorqueLimitMessage_data_t *)data_ptr;
2532  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2533  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2534  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2535  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2536  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2537  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2538  add_fieldinfo(IFT_UINT32, "torque_limit", 1, &data->torque_limit);
2539 }
2540 
2541 /** Destructor */
2543 {
2544  free(data_ptr);
2545 }
2546 
2547 /** Copy constructor.
2548  * @param m message to copy from
2549  */
2551 {
2552  data_size = m->data_size;
2553  data_ptr = malloc(data_size);
2554  memcpy(data_ptr, m->data_ptr, data_size);
2555  data = (SetTorqueLimitMessage_data_t *)data_ptr;
2557 }
2558 
2559 /* Methods */
2560 /** Get torque_limit value.
2561  * New torque limit
2562  * @return torque_limit value
2563  */
2564 uint32_t
2566 {
2567  return data->torque_limit;
2568 }
2569 
2570 /** Get maximum length of torque_limit value.
2571  * @return length of torque_limit value, can be length of the array or number of
2572  * maximum number of characters for a string
2573  */
2574 size_t
2576 {
2577  return 1;
2578 }
2579 
2580 /** Set torque_limit value.
2581  * New torque limit
2582  * @param new_torque_limit new torque_limit value
2583  */
2584 void
2586 {
2587  data->torque_limit = new_torque_limit;
2588 }
2589 
2590 /** Clone this message.
2591  * Produces a message of the same type as this message and copies the
2592  * data to the new message.
2593  * @return clone of this message
2594  */
2595 Message *
2597 {
2599 }
2600 /** @class DynamixelServoInterface::SetPunchMessage <interfaces/DynamixelServoInterface.h>
2601  * SetPunchMessage Fawkes BlackBoard Interface Message.
2602  *
2603 
2604  */
2605 
2606 
2607 /** Constructor with initial values.
2608  * @param ini_punch initial value for punch
2609  */
2610 DynamixelServoInterface::SetPunchMessage::SetPunchMessage(const uint32_t ini_punch) : Message("SetPunchMessage")
2611 {
2612  data_size = sizeof(SetPunchMessage_data_t);
2613  data_ptr = malloc(data_size);
2614  memset(data_ptr, 0, data_size);
2615  data = (SetPunchMessage_data_t *)data_ptr;
2617  data->punch = ini_punch;
2618  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2619  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2620  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2621  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2622  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2623  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2624  add_fieldinfo(IFT_UINT32, "punch", 1, &data->punch);
2625 }
2626 /** Constructor */
2628 {
2629  data_size = sizeof(SetPunchMessage_data_t);
2630  data_ptr = malloc(data_size);
2631  memset(data_ptr, 0, data_size);
2632  data = (SetPunchMessage_data_t *)data_ptr;
2634  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2635  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2636  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2637  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2638  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2639  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2640  add_fieldinfo(IFT_UINT32, "punch", 1, &data->punch);
2641 }
2642 
2643 /** Destructor */
2645 {
2646  free(data_ptr);
2647 }
2648 
2649 /** Copy constructor.
2650  * @param m message to copy from
2651  */
2653 {
2654  data_size = m->data_size;
2655  data_ptr = malloc(data_size);
2656  memcpy(data_ptr, m->data_ptr, data_size);
2657  data = (SetPunchMessage_data_t *)data_ptr;
2659 }
2660 
2661 /* Methods */
2662 /** Get punch value.
2663  * New punch
2664  * @return punch value
2665  */
2666 uint32_t
2668 {
2669  return data->punch;
2670 }
2671 
2672 /** Get maximum length of punch value.
2673  * @return length of punch value, can be length of the array or number of
2674  * maximum number of characters for a string
2675  */
2676 size_t
2678 {
2679  return 1;
2680 }
2681 
2682 /** Set punch value.
2683  * New punch
2684  * @param new_punch new punch value
2685  */
2686 void
2688 {
2689  data->punch = new_punch;
2690 }
2691 
2692 /** Clone this message.
2693  * Produces a message of the same type as this message and copies the
2694  * data to the new message.
2695  * @return clone of this message
2696  */
2697 Message *
2699 {
2701 }
2702 /** @class DynamixelServoInterface::GotoPositionMessage <interfaces/DynamixelServoInterface.h>
2703  * GotoPositionMessage Fawkes BlackBoard Interface Message.
2704  *
2705 
2706  */
2707 
2708 
2709 /** Constructor with initial values.
2710  * @param ini_position initial value for position
2711  */
2712 DynamixelServoInterface::GotoPositionMessage::GotoPositionMessage(const uint32_t ini_position) : Message("GotoPositionMessage")
2713 {
2714  data_size = sizeof(GotoPositionMessage_data_t);
2715  data_ptr = malloc(data_size);
2716  memset(data_ptr, 0, data_size);
2717  data = (GotoPositionMessage_data_t *)data_ptr;
2719  data->position = ini_position;
2720  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2721  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2722  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2723  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2724  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2725  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2726  add_fieldinfo(IFT_UINT32, "position", 1, &data->position);
2727 }
2728 /** Constructor */
2730 {
2731  data_size = sizeof(GotoPositionMessage_data_t);
2732  data_ptr = malloc(data_size);
2733  memset(data_ptr, 0, data_size);
2734  data = (GotoPositionMessage_data_t *)data_ptr;
2736  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2737  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2738  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2739  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2740  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2741  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2742  add_fieldinfo(IFT_UINT32, "position", 1, &data->position);
2743 }
2744 
2745 /** Destructor */
2747 {
2748  free(data_ptr);
2749 }
2750 
2751 /** Copy constructor.
2752  * @param m message to copy from
2753  */
2755 {
2756  data_size = m->data_size;
2757  data_ptr = malloc(data_size);
2758  memcpy(data_ptr, m->data_ptr, data_size);
2759  data = (GotoPositionMessage_data_t *)data_ptr;
2761 }
2762 
2763 /* Methods */
2764 /** Get position value.
2765  * New position
2766  * @return position value
2767  */
2768 uint32_t
2770 {
2771  return data->position;
2772 }
2773 
2774 /** Get maximum length of position value.
2775  * @return length of position value, can be length of the array or number of
2776  * maximum number of characters for a string
2777  */
2778 size_t
2780 {
2781  return 1;
2782 }
2783 
2784 /** Set position value.
2785  * New position
2786  * @param new_position new position value
2787  */
2788 void
2790 {
2791  data->position = new_position;
2792 }
2793 
2794 /** Clone this message.
2795  * Produces a message of the same type as this message and copies the
2796  * data to the new message.
2797  * @return clone of this message
2798  */
2799 Message *
2801 {
2803 }
2804 /** @class DynamixelServoInterface::SetAngleLimitsMessage <interfaces/DynamixelServoInterface.h>
2805  * SetAngleLimitsMessage Fawkes BlackBoard Interface Message.
2806  *
2807 
2808  */
2809 
2810 
2811 /** Constructor with initial values.
2812  * @param ini_angle_limit_cw initial value for angle_limit_cw
2813  * @param ini_angle_limit_ccw initial value for angle_limit_ccw
2814  */
2815 DynamixelServoInterface::SetAngleLimitsMessage::SetAngleLimitsMessage(const uint32_t ini_angle_limit_cw, const uint32_t ini_angle_limit_ccw) : Message("SetAngleLimitsMessage")
2816 {
2817  data_size = sizeof(SetAngleLimitsMessage_data_t);
2818  data_ptr = malloc(data_size);
2819  memset(data_ptr, 0, data_size);
2820  data = (SetAngleLimitsMessage_data_t *)data_ptr;
2822  data->angle_limit_cw = ini_angle_limit_cw;
2823  data->angle_limit_ccw = ini_angle_limit_ccw;
2824  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2825  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2826  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2827  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2828  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2829  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2830  add_fieldinfo(IFT_UINT32, "angle_limit_cw", 1, &data->angle_limit_cw);
2831  add_fieldinfo(IFT_UINT32, "angle_limit_ccw", 1, &data->angle_limit_ccw);
2832 }
2833 /** Constructor */
2835 {
2836  data_size = sizeof(SetAngleLimitsMessage_data_t);
2837  data_ptr = malloc(data_size);
2838  memset(data_ptr, 0, data_size);
2839  data = (SetAngleLimitsMessage_data_t *)data_ptr;
2841  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2842  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2843  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2844  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2845  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2846  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2847  add_fieldinfo(IFT_UINT32, "angle_limit_cw", 1, &data->angle_limit_cw);
2848  add_fieldinfo(IFT_UINT32, "angle_limit_ccw", 1, &data->angle_limit_ccw);
2849 }
2850 
2851 /** Destructor */
2853 {
2854  free(data_ptr);
2855 }
2856 
2857 /** Copy constructor.
2858  * @param m message to copy from
2859  */
2861 {
2862  data_size = m->data_size;
2863  data_ptr = malloc(data_size);
2864  memcpy(data_ptr, m->data_ptr, data_size);
2865  data = (SetAngleLimitsMessage_data_t *)data_ptr;
2867 }
2868 
2869 /* Methods */
2870 /** Get angle_limit_cw value.
2871  * New cw angle limit
2872  * @return angle_limit_cw value
2873  */
2874 uint32_t
2876 {
2877  return data->angle_limit_cw;
2878 }
2879 
2880 /** Get maximum length of angle_limit_cw value.
2881  * @return length of angle_limit_cw value, can be length of the array or number of
2882  * maximum number of characters for a string
2883  */
2884 size_t
2886 {
2887  return 1;
2888 }
2889 
2890 /** Set angle_limit_cw value.
2891  * New cw angle limit
2892  * @param new_angle_limit_cw new angle_limit_cw value
2893  */
2894 void
2896 {
2897  data->angle_limit_cw = new_angle_limit_cw;
2898 }
2899 
2900 /** Get angle_limit_ccw value.
2901  * New ccw angle limit
2902  * @return angle_limit_ccw value
2903  */
2904 uint32_t
2906 {
2907  return data->angle_limit_ccw;
2908 }
2909 
2910 /** Get maximum length of angle_limit_ccw value.
2911  * @return length of angle_limit_ccw value, can be length of the array or number of
2912  * maximum number of characters for a string
2913  */
2914 size_t
2916 {
2917  return 1;
2918 }
2919 
2920 /** Set angle_limit_ccw value.
2921  * New ccw angle limit
2922  * @param new_angle_limit_ccw new angle_limit_ccw value
2923  */
2924 void
2926 {
2927  data->angle_limit_ccw = new_angle_limit_ccw;
2928 }
2929 
2930 /** Clone this message.
2931  * Produces a message of the same type as this message and copies the
2932  * data to the new message.
2933  * @return clone of this message
2934  */
2935 Message *
2937 {
2939 }
2940 /** @class DynamixelServoInterface::ResetRawErrorMessage <interfaces/DynamixelServoInterface.h>
2941  * ResetRawErrorMessage Fawkes BlackBoard Interface Message.
2942  *
2943 
2944  */
2945 
2946 
2947 /** Constructor */
2949 {
2950  data_size = sizeof(ResetRawErrorMessage_data_t);
2951  data_ptr = malloc(data_size);
2952  memset(data_ptr, 0, data_size);
2953  data = (ResetRawErrorMessage_data_t *)data_ptr;
2955  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
2956  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
2957  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
2958  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
2959  enum_map_WorkingMode[(int)JOINT] = "JOINT";
2960  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
2961 }
2962 
2963 /** Destructor */
2965 {
2966  free(data_ptr);
2967 }
2968 
2969 /** Copy constructor.
2970  * @param m message to copy from
2971  */
2973 {
2974  data_size = m->data_size;
2975  data_ptr = malloc(data_size);
2976  memcpy(data_ptr, m->data_ptr, data_size);
2977  data = (ResetRawErrorMessage_data_t *)data_ptr;
2979 }
2980 
2981 /* Methods */
2982 /** Clone this message.
2983  * Produces a message of the same type as this message and copies the
2984  * data to the new message.
2985  * @return clone of this message
2986  */
2987 Message *
2989 {
2991 }
2992 /** @class DynamixelServoInterface::SetPreventAlarmShutdownMessage <interfaces/DynamixelServoInterface.h>
2993  * SetPreventAlarmShutdownMessage Fawkes BlackBoard Interface Message.
2994  *
2995 
2996  */
2997 
2998 
2999 /** Constructor with initial values.
3000  * @param ini_enable_prevent_alarm_shutdown initial value for enable_prevent_alarm_shutdown
3001  */
3002 DynamixelServoInterface::SetPreventAlarmShutdownMessage::SetPreventAlarmShutdownMessage(const bool ini_enable_prevent_alarm_shutdown) : Message("SetPreventAlarmShutdownMessage")
3003 {
3004  data_size = sizeof(SetPreventAlarmShutdownMessage_data_t);
3005  data_ptr = malloc(data_size);
3006  memset(data_ptr, 0, data_size);
3007  data = (SetPreventAlarmShutdownMessage_data_t *)data_ptr;
3009  data->enable_prevent_alarm_shutdown = ini_enable_prevent_alarm_shutdown;
3010  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
3011  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
3012  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
3013  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
3014  enum_map_WorkingMode[(int)JOINT] = "JOINT";
3015  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
3016  add_fieldinfo(IFT_BOOL, "enable_prevent_alarm_shutdown", 1, &data->enable_prevent_alarm_shutdown);
3017 }
3018 /** Constructor */
3020 {
3021  data_size = sizeof(SetPreventAlarmShutdownMessage_data_t);
3022  data_ptr = malloc(data_size);
3023  memset(data_ptr, 0, data_size);
3024  data = (SetPreventAlarmShutdownMessage_data_t *)data_ptr;
3026  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
3027  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
3028  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
3029  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
3030  enum_map_WorkingMode[(int)JOINT] = "JOINT";
3031  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
3032  add_fieldinfo(IFT_BOOL, "enable_prevent_alarm_shutdown", 1, &data->enable_prevent_alarm_shutdown);
3033 }
3034 
3035 /** Destructor */
3037 {
3038  free(data_ptr);
3039 }
3040 
3041 /** Copy constructor.
3042  * @param m message to copy from
3043  */
3045 {
3046  data_size = m->data_size;
3047  data_ptr = malloc(data_size);
3048  memcpy(data_ptr, m->data_ptr, data_size);
3049  data = (SetPreventAlarmShutdownMessage_data_t *)data_ptr;
3051 }
3052 
3053 /* Methods */
3054 /** Get enable_prevent_alarm_shutdown value.
3055  * Enable alarm shutdown
3056  * @return enable_prevent_alarm_shutdown value
3057  */
3058 bool
3060 {
3061  return data->enable_prevent_alarm_shutdown;
3062 }
3063 
3064 /** Get maximum length of enable_prevent_alarm_shutdown value.
3065  * @return length of enable_prevent_alarm_shutdown value, can be length of the array or number of
3066  * maximum number of characters for a string
3067  */
3068 size_t
3070 {
3071  return 1;
3072 }
3073 
3074 /** Set enable_prevent_alarm_shutdown value.
3075  * Enable alarm shutdown
3076  * @param new_enable_prevent_alarm_shutdown new enable_prevent_alarm_shutdown value
3077  */
3078 void
3080 {
3081  data->enable_prevent_alarm_shutdown = new_enable_prevent_alarm_shutdown;
3082 }
3083 
3084 /** Clone this message.
3085  * Produces a message of the same type as this message and copies the
3086  * data to the new message.
3087  * @return clone of this message
3088  */
3089 Message *
3091 {
3093 }
3094 /** @class DynamixelServoInterface::SetAutorecoverEnabledMessage <interfaces/DynamixelServoInterface.h>
3095  * SetAutorecoverEnabledMessage Fawkes BlackBoard Interface Message.
3096  *
3097 
3098  */
3099 
3100 
3101 /** Constructor with initial values.
3102  * @param ini_autorecover_enabled initial value for autorecover_enabled
3103  */
3104 DynamixelServoInterface::SetAutorecoverEnabledMessage::SetAutorecoverEnabledMessage(const bool ini_autorecover_enabled) : Message("SetAutorecoverEnabledMessage")
3105 {
3106  data_size = sizeof(SetAutorecoverEnabledMessage_data_t);
3107  data_ptr = malloc(data_size);
3108  memset(data_ptr, 0, data_size);
3109  data = (SetAutorecoverEnabledMessage_data_t *)data_ptr;
3111  data->autorecover_enabled = ini_autorecover_enabled;
3112  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
3113  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
3114  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
3115  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
3116  enum_map_WorkingMode[(int)JOINT] = "JOINT";
3117  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
3118  add_fieldinfo(IFT_BOOL, "autorecover_enabled", 1, &data->autorecover_enabled);
3119 }
3120 /** Constructor */
3122 {
3123  data_size = sizeof(SetAutorecoverEnabledMessage_data_t);
3124  data_ptr = malloc(data_size);
3125  memset(data_ptr, 0, data_size);
3126  data = (SetAutorecoverEnabledMessage_data_t *)data_ptr;
3128  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
3129  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
3130  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
3131  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
3132  enum_map_WorkingMode[(int)JOINT] = "JOINT";
3133  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
3134  add_fieldinfo(IFT_BOOL, "autorecover_enabled", 1, &data->autorecover_enabled);
3135 }
3136 
3137 /** Destructor */
3139 {
3140  free(data_ptr);
3141 }
3142 
3143 /** Copy constructor.
3144  * @param m message to copy from
3145  */
3147 {
3148  data_size = m->data_size;
3149  data_ptr = malloc(data_size);
3150  memcpy(data_ptr, m->data_ptr, data_size);
3151  data = (SetAutorecoverEnabledMessage_data_t *)data_ptr;
3153 }
3154 
3155 /* Methods */
3156 /** Get autorecover_enabled value.
3157  * Automatically recover on alarm shutdown
3158  * @return autorecover_enabled value
3159  */
3160 bool
3162 {
3163  return data->autorecover_enabled;
3164 }
3165 
3166 /** Get maximum length of autorecover_enabled value.
3167  * @return length of autorecover_enabled value, can be length of the array or number of
3168  * maximum number of characters for a string
3169  */
3170 size_t
3172 {
3173  return 1;
3174 }
3175 
3176 /** Set autorecover_enabled value.
3177  * Automatically recover on alarm shutdown
3178  * @param new_autorecover_enabled new autorecover_enabled value
3179  */
3180 void
3182 {
3183  data->autorecover_enabled = new_autorecover_enabled;
3184 }
3185 
3186 /** Clone this message.
3187  * Produces a message of the same type as this message and copies the
3188  * data to the new message.
3189  * @return clone of this message
3190  */
3191 Message *
3193 {
3195 }
3196 /** @class DynamixelServoInterface::RecoverMessage <interfaces/DynamixelServoInterface.h>
3197  * RecoverMessage Fawkes BlackBoard Interface Message.
3198  *
3199 
3200  */
3201 
3202 
3203 /** Constructor */
3205 {
3206  data_size = sizeof(RecoverMessage_data_t);
3207  data_ptr = malloc(data_size);
3208  memset(data_ptr, 0, data_size);
3209  data = (RecoverMessage_data_t *)data_ptr;
3211  enum_map_ErrorCode[(int)ERROR_NONE] = "ERROR_NONE";
3212  enum_map_ErrorCode[(int)ERROR_UNSPECIFIC] = "ERROR_UNSPECIFIC";
3213  enum_map_ErrorCode[(int)ERROR_COMMUNICATION] = "ERROR_COMMUNICATION";
3214  enum_map_ErrorCode[(int)ERROR_ANGLE_OUTOFRANGE] = "ERROR_ANGLE_OUTOFRANGE";
3215  enum_map_WorkingMode[(int)JOINT] = "JOINT";
3216  enum_map_WorkingMode[(int)WHEEL] = "WHEEL";
3217 }
3218 
3219 /** Destructor */
3221 {
3222  free(data_ptr);
3223 }
3224 
3225 /** Copy constructor.
3226  * @param m message to copy from
3227  */
3229 {
3230  data_size = m->data_size;
3231  data_ptr = malloc(data_size);
3232  memcpy(data_ptr, m->data_ptr, data_size);
3233  data = (RecoverMessage_data_t *)data_ptr;
3235 }
3236 
3237 /* Methods */
3238 /** Clone this message.
3239  * Produces a message of the same type as this message and copies the
3240  * data to the new message.
3241  * @return clone of this message
3242  */
3243 Message *
3245 {
3246  return new DynamixelServoInterface::RecoverMessage(this);
3247 }
3248 /** Check if message is valid and can be enqueued.
3249  * @param message Message to check
3250  * @return true if the message is valid, false otherwise.
3251  */
3252 bool
3254 {
3255  const StopMessage *m0 = dynamic_cast<const StopMessage *>(message);
3256  if ( m0 != NULL ) {
3257  return true;
3258  }
3259  const FlushMessage *m1 = dynamic_cast<const FlushMessage *>(message);
3260  if ( m1 != NULL ) {
3261  return true;
3262  }
3263  const GotoMessage *m2 = dynamic_cast<const GotoMessage *>(message);
3264  if ( m2 != NULL ) {
3265  return true;
3266  }
3267  const TimedGotoMessage *m3 = dynamic_cast<const TimedGotoMessage *>(message);
3268  if ( m3 != NULL ) {
3269  return true;
3270  }
3271  const SetModeMessage *m4 = dynamic_cast<const SetModeMessage *>(message);
3272  if ( m4 != NULL ) {
3273  return true;
3274  }
3275  const SetSpeedMessage *m5 = dynamic_cast<const SetSpeedMessage *>(message);
3276  if ( m5 != NULL ) {
3277  return true;
3278  }
3279  const SetEnabledMessage *m6 = dynamic_cast<const SetEnabledMessage *>(message);
3280  if ( m6 != NULL ) {
3281  return true;
3282  }
3283  const SetVelocityMessage *m7 = dynamic_cast<const SetVelocityMessage *>(message);
3284  if ( m7 != NULL ) {
3285  return true;
3286  }
3287  const SetMarginMessage *m8 = dynamic_cast<const SetMarginMessage *>(message);
3288  if ( m8 != NULL ) {
3289  return true;
3290  }
3291  const SetComplianceValuesMessage *m9 = dynamic_cast<const SetComplianceValuesMessage *>(message);
3292  if ( m9 != NULL ) {
3293  return true;
3294  }
3295  const SetGoalSpeedMessage *m10 = dynamic_cast<const SetGoalSpeedMessage *>(message);
3296  if ( m10 != NULL ) {
3297  return true;
3298  }
3299  const SetTorqueLimitMessage *m11 = dynamic_cast<const SetTorqueLimitMessage *>(message);
3300  if ( m11 != NULL ) {
3301  return true;
3302  }
3303  const SetPunchMessage *m12 = dynamic_cast<const SetPunchMessage *>(message);
3304  if ( m12 != NULL ) {
3305  return true;
3306  }
3307  const GotoPositionMessage *m13 = dynamic_cast<const GotoPositionMessage *>(message);
3308  if ( m13 != NULL ) {
3309  return true;
3310  }
3311  const SetAngleLimitsMessage *m14 = dynamic_cast<const SetAngleLimitsMessage *>(message);
3312  if ( m14 != NULL ) {
3313  return true;
3314  }
3315  const ResetRawErrorMessage *m15 = dynamic_cast<const ResetRawErrorMessage *>(message);
3316  if ( m15 != NULL ) {
3317  return true;
3318  }
3319  const SetPreventAlarmShutdownMessage *m16 = dynamic_cast<const SetPreventAlarmShutdownMessage *>(message);
3320  if ( m16 != NULL ) {
3321  return true;
3322  }
3323  const SetAutorecoverEnabledMessage *m17 = dynamic_cast<const SetAutorecoverEnabledMessage *>(message);
3324  if ( m17 != NULL ) {
3325  return true;
3326  }
3327  const RecoverMessage *m18 = dynamic_cast<const RecoverMessage *>(message);
3328  if ( m18 != NULL ) {
3329  return true;
3330  }
3331  return false;
3332 }
3333 
3334 /// @cond INTERNALS
3335 EXPORT_INTERFACE(DynamixelServoInterface)
3336 /// @endcond
3337 
3338 
3339 } // end namespace fawkes
size_t maxlenof_angle() const
Get maximum length of angle value.
virtual Message * clone() const
Clone this message.
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:124
size_t maxlenof_angle_limit_cw() const
Get maximum length of angle_limit_cw value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
Joint mode to move in a range of -2.616 to +2.616 rad.
virtual Message * clone() const
Clone this message.
SetAutorecoverEnabledMessage Fawkes BlackBoard Interface Message.
void set_torque_limit(const uint32_t new_torque_limit)
Set torque_limit value.
void set_punch(const uint32_t new_punch)
Set punch value.
virtual Message * clone() const
Clone this message.
void set_angle_margin(const float new_angle_margin)
Set angle_margin value.
void set_time_sec(const float new_time_sec)
Set time_sec value.
SetGoalSpeedMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
bool is_autorecover_enabled() const
Get autorecover_enabled value.
virtual Message * clone() const
Clone this message.
SetAngleLimitsMessage Fawkes BlackBoard Interface Message.
void set_angle(const float new_angle)
Set angle value.
Fawkes library namespace.
8 bit unsigned integer field
Definition: types.h:38
Timestamp data, must be present and first entries for each interface data structs! This leans on time...
Definition: message.h:129
size_t maxlenof_cw_slope() const
Get maximum length of cw_slope value.
void set_cw_margin(const uint8_t new_cw_margin)
Set cw_margin value.
16 bit unsigned integer field
Definition: types.h:40
void set_speed(const uint16_t new_speed)
Set speed value.
SetTorqueLimitMessage Fawkes BlackBoard Interface Message.
void set_position(const uint32_t new_position)
Set position value.
SetComplianceValuesMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_mode() const
Get maximum length of mode value.
SetMarginMessage Fawkes BlackBoard Interface Message.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:79
size_t maxlenof_torque_limit() const
Get maximum length of torque_limit value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_enable_prevent_alarm_shutdown() const
Get maximum length of enable_prevent_alarm_shutdown value.
void set_angle_limit_cw(const uint32_t new_angle_limit_cw)
Set angle_limit_cw value.
ResetRawErrorMessage Fawkes BlackBoard Interface Message.
StopMessage Fawkes BlackBoard Interface Message.
Wheel mode to use the servo in a continuously rotating mode.
message_data_ts_t * data_ts
data timestamp aliasing pointer
Definition: message.h:133
virtual Message * clone() const
Clone this message.
unsigned int data_size
Size of memory needed to hold all data.
Definition: message.h:125
size_t maxlenof_position() const
Get maximum length of position value.
SetModeMessage Fawkes BlackBoard Interface Message.
FlushMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
uint32_t angle_limit_cw() const
Get angle_limit_cw value.
virtual Message * clone() const
Clone this message.
virtual Message * clone() const
Clone this message.
const char * type() const
Get type of interface.
Definition: interface.cpp:651
virtual Message * clone() const
Clone this message.
void set_autorecover_enabled(const bool new_autorecover_enabled)
Set autorecover_enabled value.
void set_velocity(const float new_velocity)
Set velocity value.
bool is_enable_prevent_alarm_shutdown() const
Get enable_prevent_alarm_shutdown value.
void set_goal_speed(const uint32_t new_goal_speed)
Set goal_speed value.
SetPunchMessage Fawkes BlackBoard Interface Message.
void set_ccw_slope(const uint8_t new_ccw_slope)
Set ccw_slope value.
size_t maxlenof_enabled() const
Get maximum length of enabled value.
size_t maxlenof_goal_speed() const
Get maximum length of goal_speed value.
TimedGotoMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_angle_limit_ccw() const
Get maximum length of angle_limit_ccw value.
virtual Message * clone() const
Clone this message.
SetEnabledMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_cw_margin() const
Get maximum length of cw_margin value.
float field
Definition: types.h:45
size_t maxlenof_speed() const
Get maximum length of speed value.
size_t maxlenof_ccw_slope() const
Get maximum length of ccw_slope value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
size_t maxlenof_ccw_margin() const
Get maximum length of ccw_margin value.
ErrorCode
Error code to explain an error.
virtual Message * clone() const
Clone this message.
size_t maxlenof_angle() const
Get maximum length of angle value.
SetSpeedMessage Fawkes BlackBoard Interface Message.
void set_enable_prevent_alarm_shutdown(const bool new_enable_prevent_alarm_shutdown)
Set enable_prevent_alarm_shutdown value.
GotoPositionMessage Fawkes BlackBoard Interface Message.
GotoMessage Fawkes BlackBoard Interface Message.
void set_ccw_margin(const uint8_t new_ccw_margin)
Set ccw_margin value.
void set_angle(const float new_angle)
Set angle value.
WorkingMode
Mode to be set for the servo.
DynamixelServoInterface Fawkes BlackBoard Interface.
void set_cw_slope(const uint8_t new_cw_slope)
Set cw_slope value.
void set_enabled(const bool new_enabled)
Set enabled value.
void set_mode(const uint8_t new_mode)
Set mode value.
size_t maxlenof_angle_margin() const
Get maximum length of angle_margin value.
void set_angle_limit_ccw(const uint32_t new_angle_limit_ccw)
Set angle_limit_ccw value.
void add_fieldinfo(interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
Add an entry to the info list.
Definition: message.cpp:436
boolean field
Definition: types.h:36
size_t maxlenof_punch() const
Get maximum length of punch value.
size_t maxlenof_autorecover_enabled() const
Get maximum length of autorecover_enabled value.
size_t maxlenof_time_sec() const
Get maximum length of time_sec value.
RecoverMessage Fawkes BlackBoard Interface Message.
32 bit unsigned integer field
Definition: types.h:42
size_t maxlenof_velocity() const
Get maximum length of velocity value.
SetVelocityMessage Fawkes BlackBoard Interface Message.
uint32_t angle_limit_ccw() const
Get angle_limit_ccw value.
SetPreventAlarmShutdownMessage Fawkes BlackBoard Interface Message.