Fawkes API  Fawkes Development Version
NavigatorInterface.cpp
1 
2 /***************************************************************************
3  * NavigatorInterface.cpp - Fawkes BlackBoard Interface - NavigatorInterface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2007-2009 Martin Liebenberg, Daniel Beck, Tim Niemueller
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/NavigatorInterface.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 NavigatorInterface <interfaces/NavigatorInterface.h>
36  * NavigatorInterface Fawkes BlackBoard Interface.
37  *
38  The navigator interface is used by the navigator to export information about
39  the current status of the navigator and to define all messages by which the navigator
40  can be instructed.
41 
42  There are three coordinate systems, the robot system which is a right-handed cartesian
43  coordinate system with the robot in its origin, X axis pointing forward, Y pointing to
44  the left and Z pointing upwards. The second coordinate system is the so-called
45  navigator system. It is a coordinate system similar to the robot system, but the
46  origin is defined on the initialization of the navigator. The last system is the
47  odometry system. It is again a similar system, but the origin is reset from time
48  to time and the robot's position in this system gives the odometry deltas.
49 
50  * @ingroup FawkesInterfaces
51  */
52 
53 
54 /** ERROR_NONE constant */
55 const uint32_t NavigatorInterface::ERROR_NONE = 0u;
56 /** ERROR_MOTOR constant */
57 const uint32_t NavigatorInterface::ERROR_MOTOR = 1u;
58 /** ERROR_OBSTRUCTION constant */
59 const uint32_t NavigatorInterface::ERROR_OBSTRUCTION = 2u;
60 /** ERROR_UNKNOWN_PLACE constant */
61 const uint32_t NavigatorInterface::ERROR_UNKNOWN_PLACE = 4u;
62 /** ERROR_PATH_GEN_FAIL constant */
63 const uint32_t NavigatorInterface::ERROR_PATH_GEN_FAIL = 8u;
64 /** FLAG_NONE constant */
65 const uint32_t NavigatorInterface::FLAG_NONE = 0u;
66 /** FLAG_CART_GOTO constant */
67 const uint32_t NavigatorInterface::FLAG_CART_GOTO = 1u;
68 /** FLAG_POLAR_GOTO constant */
69 const uint32_t NavigatorInterface::FLAG_POLAR_GOTO = 2u;
70 /** FLAG_PLACE_GOTO constant */
71 const uint32_t NavigatorInterface::FLAG_PLACE_GOTO = 4u;
72 /** FLAG_UPDATES_DEST_DIST constant */
74 /** FLAG_SECURITY_DISTANCE constant */
76 /** FLAG_ESCAPING constant */
77 const uint32_t NavigatorInterface::FLAG_ESCAPING = 32u;
78 
79 /** Constructor */
80 NavigatorInterface::NavigatorInterface() : Interface()
81 {
82  data_size = sizeof(NavigatorInterface_data_t);
83  data_ptr = malloc(data_size);
84  data = (NavigatorInterface_data_t *)data_ptr;
85  data_ts = (interface_data_ts_t *)data_ptr;
86  memset(data_ptr, 0, data_size);
87  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
88  enum_map_DriveMode[(int)Forward] = "Forward";
89  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
90  enum_map_DriveMode[(int)Backward] = "Backward";
91  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
92  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
93  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
94  add_fieldinfo(IFT_UINT32, "flags", 1, &data->flags);
95  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
96  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
97  add_fieldinfo(IFT_FLOAT, "dest_x", 1, &data->dest_x);
98  add_fieldinfo(IFT_FLOAT, "dest_y", 1, &data->dest_y);
99  add_fieldinfo(IFT_FLOAT, "dest_ori", 1, &data->dest_ori);
100  add_fieldinfo(IFT_FLOAT, "dest_dist", 1, &data->dest_dist);
101  add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
102  add_fieldinfo(IFT_BOOL, "final", 1, &data->final);
103  add_fieldinfo(IFT_UINT32, "error_code", 1, &data->error_code);
104  add_fieldinfo(IFT_FLOAT, "max_velocity", 1, &data->max_velocity);
105  add_fieldinfo(IFT_FLOAT, "max_rotation", 1, &data->max_rotation);
106  add_fieldinfo(IFT_FLOAT, "security_distance", 1, &data->security_distance);
107  add_fieldinfo(IFT_BOOL, "escaping_enabled", 1, &data->escaping_enabled);
108  add_fieldinfo(IFT_ENUM, "drive_mode", 1, &data->drive_mode, "DriveMode", &enum_map_DriveMode);
109  add_fieldinfo(IFT_BOOL, "auto_drive_mode", 1, &data->auto_drive_mode);
110  add_fieldinfo(IFT_BOOL, "stop_at_target", 1, &data->stop_at_target);
111  add_fieldinfo(IFT_ENUM, "orientation_mode", 1, &data->orientation_mode, "OrientationMode", &enum_map_OrientationMode);
112  add_messageinfo("StopMessage");
113  add_messageinfo("TurnMessage");
114  add_messageinfo("CartesianGotoMessage");
115  add_messageinfo("PolarGotoMessage");
116  add_messageinfo("PlaceGotoMessage");
117  add_messageinfo("PlaceWithOriGotoMessage");
118  add_messageinfo("ObstacleMessage");
119  add_messageinfo("ResetOdometryMessage");
120  add_messageinfo("SetMaxVelocityMessage");
121  add_messageinfo("SetMaxRotationMessage");
122  add_messageinfo("SetEscapingMessage");
123  add_messageinfo("SetSecurityDistanceMessage");
124  add_messageinfo("SetDriveModeMessage");
125  add_messageinfo("SetStopAtTargetMessage");
126  add_messageinfo("SetOrientationModeMessage");
127  add_messageinfo("ResetParametersMessage");
128  unsigned char tmp_hash[] = {0x44, 0x8, 0x67, 0xd0, 0x2d, 0xf0, 0x41, 0xe7, 0x78, 0x46, 0x10, 0xda, 0x85, 0x81, 0x1f, 0x32};
129  set_hash(tmp_hash);
130 }
131 
132 /** Destructor */
133 NavigatorInterface::~NavigatorInterface()
134 {
135  free(data_ptr);
136 }
137 /** Convert DriveMode constant to string.
138  * @param value value to convert to string
139  * @return constant value as string.
140  */
141 const char *
143 {
144  switch (value) {
145  case MovingNotAllowed: return "MovingNotAllowed";
146  case Forward: return "Forward";
147  case AllowBackward: return "AllowBackward";
148  case Backward: return "Backward";
149  case ESCAPE: return "ESCAPE";
150  default: return "UNKNOWN";
151  }
152 }
153 /** Convert OrientationMode constant to string.
154  * @param value value to convert to string
155  * @return constant value as string.
156  */
157 const char *
159 {
160  switch (value) {
161  case OrientAtTarget: return "OrientAtTarget";
162  case OrientDuringTravel: return "OrientDuringTravel";
163  default: return "UNKNOWN";
164  }
165 }
166 /* Methods */
167 /** Get flags value.
168  * Bit-wise combination of
169  FLAG_* constants denoting navigator component features.
170  * @return flags value
171  */
172 uint32_t
174 {
175  return data->flags;
176 }
177 
178 /** Get maximum length of flags value.
179  * @return length of flags value, can be length of the array or number of
180  * maximum number of characters for a string
181  */
182 size_t
184 {
185  return 1;
186 }
187 
188 /** Set flags value.
189  * Bit-wise combination of
190  FLAG_* constants denoting navigator component features.
191  * @param new_flags new flags value
192  */
193 void
194 NavigatorInterface::set_flags(const uint32_t new_flags)
195 {
196  data->flags = new_flags;
197  data_changed = true;
198 }
199 
200 /** Get x value.
201  * Current X-coordinate in the navigator coordinate system.
202  * @return x value
203  */
204 float
206 {
207  return data->x;
208 }
209 
210 /** Get maximum length of x value.
211  * @return length of x value, can be length of the array or number of
212  * maximum number of characters for a string
213  */
214 size_t
216 {
217  return 1;
218 }
219 
220 /** Set x value.
221  * Current X-coordinate in the navigator coordinate system.
222  * @param new_x new x value
223  */
224 void
225 NavigatorInterface::set_x(const float new_x)
226 {
227  data->x = new_x;
228  data_changed = true;
229 }
230 
231 /** Get y value.
232  * Current Y-coordinate in the navigator coordinate system.
233  * @return y value
234  */
235 float
237 {
238  return data->y;
239 }
240 
241 /** Get maximum length of y value.
242  * @return length of y value, can be length of the array or number of
243  * maximum number of characters for a string
244  */
245 size_t
247 {
248  return 1;
249 }
250 
251 /** Set y value.
252  * Current Y-coordinate in the navigator coordinate system.
253  * @param new_y new y value
254  */
255 void
256 NavigatorInterface::set_y(const float new_y)
257 {
258  data->y = new_y;
259  data_changed = true;
260 }
261 
262 /** Get dest_x value.
263  * X-coordinate of the current destination, or 0.0 if no target has been set.
264  * @return dest_x value
265  */
266 float
268 {
269  return data->dest_x;
270 }
271 
272 /** Get maximum length of dest_x value.
273  * @return length of dest_x value, can be length of the array or number of
274  * maximum number of characters for a string
275  */
276 size_t
278 {
279  return 1;
280 }
281 
282 /** Set dest_x value.
283  * X-coordinate of the current destination, or 0.0 if no target has been set.
284  * @param new_dest_x new dest_x value
285  */
286 void
287 NavigatorInterface::set_dest_x(const float new_dest_x)
288 {
289  data->dest_x = new_dest_x;
290  data_changed = true;
291 }
292 
293 /** Get dest_y value.
294  * Y-coordinate of the current destination, or 0.0 if no target has been set.
295  * @return dest_y value
296  */
297 float
299 {
300  return data->dest_y;
301 }
302 
303 /** Get maximum length of dest_y value.
304  * @return length of dest_y value, can be length of the array or number of
305  * maximum number of characters for a string
306  */
307 size_t
309 {
310  return 1;
311 }
312 
313 /** Set dest_y value.
314  * Y-coordinate of the current destination, or 0.0 if no target has been set.
315  * @param new_dest_y new dest_y value
316  */
317 void
318 NavigatorInterface::set_dest_y(const float new_dest_y)
319 {
320  data->dest_y = new_dest_y;
321  data_changed = true;
322 }
323 
324 /** Get dest_ori value.
325  * Orientation of the current destination, or 0.0 if no target has been set.
326  * @return dest_ori value
327  */
328 float
330 {
331  return data->dest_ori;
332 }
333 
334 /** Get maximum length of dest_ori value.
335  * @return length of dest_ori value, can be length of the array or number of
336  * maximum number of characters for a string
337  */
338 size_t
340 {
341  return 1;
342 }
343 
344 /** Set dest_ori value.
345  * Orientation of the current destination, or 0.0 if no target has been set.
346  * @param new_dest_ori new dest_ori value
347  */
348 void
349 NavigatorInterface::set_dest_ori(const float new_dest_ori)
350 {
351  data->dest_ori = new_dest_ori;
352  data_changed = true;
353 }
354 
355 /** Get dest_dist value.
356  * Distance to destination in m.
357  * @return dest_dist value
358  */
359 float
361 {
362  return data->dest_dist;
363 }
364 
365 /** Get maximum length of dest_dist value.
366  * @return length of dest_dist value, can be length of the array or number of
367  * maximum number of characters for a string
368  */
369 size_t
371 {
372  return 1;
373 }
374 
375 /** Set dest_dist value.
376  * Distance to destination in m.
377  * @param new_dest_dist new dest_dist value
378  */
379 void
380 NavigatorInterface::set_dest_dist(const float new_dest_dist)
381 {
382  data->dest_dist = new_dest_dist;
383  data_changed = true;
384 }
385 
386 /** Get msgid value.
387  * The ID of the message that is currently being
388  processed, or 0 if no message is being processed.
389  * @return msgid value
390  */
391 uint32_t
393 {
394  return data->msgid;
395 }
396 
397 /** Get maximum length of msgid value.
398  * @return length of msgid value, can be length of the array or number of
399  * maximum number of characters for a string
400  */
401 size_t
403 {
404  return 1;
405 }
406 
407 /** Set msgid value.
408  * The ID of the message that is currently being
409  processed, or 0 if no message is being processed.
410  * @param new_msgid new msgid value
411  */
412 void
413 NavigatorInterface::set_msgid(const uint32_t new_msgid)
414 {
415  data->msgid = new_msgid;
416  data_changed = true;
417 }
418 
419 /** Get final value.
420  * True, if the last goto command has been finished,
421  false if it is still running
422  * @return final value
423  */
424 bool
426 {
427  return data->final;
428 }
429 
430 /** Get maximum length of final value.
431  * @return length of final value, can be length of the array or number of
432  * maximum number of characters for a string
433  */
434 size_t
436 {
437  return 1;
438 }
439 
440 /** Set final value.
441  * True, if the last goto command has been finished,
442  false if it is still running
443  * @param new_final new final value
444  */
445 void
446 NavigatorInterface::set_final(const bool new_final)
447 {
448  data->final = new_final;
449  data_changed = true;
450 }
451 
452 /** Get error_code value.
453  * Failure code set if
454  final is true. 0 if no error occured, an error code from ERROR_*
455  constants otherwise (or a bit-wise combination).
456  * @return error_code value
457  */
458 uint32_t
460 {
461  return data->error_code;
462 }
463 
464 /** Get maximum length of error_code value.
465  * @return length of error_code value, can be length of the array or number of
466  * maximum number of characters for a string
467  */
468 size_t
470 {
471  return 1;
472 }
473 
474 /** Set error_code value.
475  * Failure code set if
476  final is true. 0 if no error occured, an error code from ERROR_*
477  constants otherwise (or a bit-wise combination).
478  * @param new_error_code new error_code value
479  */
480 void
481 NavigatorInterface::set_error_code(const uint32_t new_error_code)
482 {
483  data->error_code = new_error_code;
484  data_changed = true;
485 }
486 
487 /** Get max_velocity value.
488  * Maximum velocity
489  * @return max_velocity value
490  */
491 float
493 {
494  return data->max_velocity;
495 }
496 
497 /** Get maximum length of max_velocity value.
498  * @return length of max_velocity value, can be length of the array or number of
499  * maximum number of characters for a string
500  */
501 size_t
503 {
504  return 1;
505 }
506 
507 /** Set max_velocity value.
508  * Maximum velocity
509  * @param new_max_velocity new max_velocity value
510  */
511 void
512 NavigatorInterface::set_max_velocity(const float new_max_velocity)
513 {
514  data->max_velocity = new_max_velocity;
515  data_changed = true;
516 }
517 
518 /** Get max_rotation value.
519  * Maximum rotation velocity
520  * @return max_rotation value
521  */
522 float
524 {
525  return data->max_rotation;
526 }
527 
528 /** Get maximum length of max_rotation value.
529  * @return length of max_rotation value, can be length of the array or number of
530  * maximum number of characters for a string
531  */
532 size_t
534 {
535  return 1;
536 }
537 
538 /** Set max_rotation value.
539  * Maximum rotation velocity
540  * @param new_max_rotation new max_rotation value
541  */
542 void
543 NavigatorInterface::set_max_rotation(const float new_max_rotation)
544 {
545  data->max_rotation = new_max_rotation;
546  data_changed = true;
547 }
548 
549 /** Get security_distance value.
550  * Security distance to keep to obstacles
551  * @return security_distance value
552  */
553 float
555 {
556  return data->security_distance;
557 }
558 
559 /** Get maximum length of security_distance value.
560  * @return length of security_distance value, can be length of the array or number of
561  * maximum number of characters for a string
562  */
563 size_t
565 {
566  return 1;
567 }
568 
569 /** Set security_distance value.
570  * Security distance to keep to obstacles
571  * @param new_security_distance new security_distance value
572  */
573 void
574 NavigatorInterface::set_security_distance(const float new_security_distance)
575 {
576  data->security_distance = new_security_distance;
577  data_changed = true;
578 }
579 
580 /** Get escaping_enabled value.
581  * This is used for navigation components with integrated collision avoidance,
582  to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
583  * @return escaping_enabled value
584  */
585 bool
587 {
588  return data->escaping_enabled;
589 }
590 
591 /** Get maximum length of escaping_enabled value.
592  * @return length of escaping_enabled value, can be length of the array or number of
593  * maximum number of characters for a string
594  */
595 size_t
597 {
598  return 1;
599 }
600 
601 /** Set escaping_enabled value.
602  * This is used for navigation components with integrated collision avoidance,
603  to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
604  * @param new_escaping_enabled new escaping_enabled value
605  */
606 void
607 NavigatorInterface::set_escaping_enabled(const bool new_escaping_enabled)
608 {
609  data->escaping_enabled = new_escaping_enabled;
610  data_changed = true;
611 }
612 
613 /** Get drive_mode value.
614  * Current drive mode
615  * @return drive_mode value
616  */
619 {
620  return (NavigatorInterface::DriveMode)data->drive_mode;
621 }
622 
623 /** Get maximum length of drive_mode value.
624  * @return length of drive_mode value, can be length of the array or number of
625  * maximum number of characters for a string
626  */
627 size_t
629 {
630  return 1;
631 }
632 
633 /** Set drive_mode value.
634  * Current drive mode
635  * @param new_drive_mode new drive_mode value
636  */
637 void
639 {
640  data->drive_mode = new_drive_mode;
641  data_changed = true;
642 }
643 
644 /** Get auto_drive_mode value.
645  * True, if the drive mode should be automatically decided each time.
646  False, if the drive mode should not automatically change, which is the case when sending
647  a SetAutoDriveMode-message (otherwise the navigator might ignore that value).
648  * @return auto_drive_mode value
649  */
650 bool
652 {
653  return data->auto_drive_mode;
654 }
655 
656 /** Get maximum length of auto_drive_mode value.
657  * @return length of auto_drive_mode value, can be length of the array or number of
658  * maximum number of characters for a string
659  */
660 size_t
662 {
663  return 1;
664 }
665 
666 /** Set auto_drive_mode value.
667  * True, if the drive mode should be automatically decided each time.
668  False, if the drive mode should not automatically change, which is the case when sending
669  a SetAutoDriveMode-message (otherwise the navigator might ignore that value).
670  * @param new_auto_drive_mode new auto_drive_mode value
671  */
672 void
673 NavigatorInterface::set_auto_drive_mode(const bool new_auto_drive_mode)
674 {
675  data->auto_drive_mode = new_auto_drive_mode;
676  data_changed = true;
677 }
678 
679 /** Get stop_at_target value.
680  * Stop when target is reached?
681  * @return stop_at_target value
682  */
683 bool
685 {
686  return data->stop_at_target;
687 }
688 
689 /** Get maximum length of stop_at_target value.
690  * @return length of stop_at_target value, can be length of the array or number of
691  * maximum number of characters for a string
692  */
693 size_t
695 {
696  return 1;
697 }
698 
699 /** Set stop_at_target value.
700  * Stop when target is reached?
701  * @param new_stop_at_target new stop_at_target value
702  */
703 void
704 NavigatorInterface::set_stop_at_target(const bool new_stop_at_target)
705 {
706  data->stop_at_target = new_stop_at_target;
707  data_changed = true;
708 }
709 
710 /** Get orientation_mode value.
711  * Mode how/when to orientate if orientation is given
712  * @return orientation_mode value
713  */
716 {
717  return (NavigatorInterface::OrientationMode)data->orientation_mode;
718 }
719 
720 /** Get maximum length of orientation_mode value.
721  * @return length of orientation_mode value, can be length of the array or number of
722  * maximum number of characters for a string
723  */
724 size_t
726 {
727  return 1;
728 }
729 
730 /** Set orientation_mode value.
731  * Mode how/when to orientate if orientation is given
732  * @param new_orientation_mode new orientation_mode value
733  */
734 void
736 {
737  data->orientation_mode = new_orientation_mode;
738  data_changed = true;
739 }
740 
741 /* =========== message create =========== */
742 Message *
744 {
745  if ( strncmp("StopMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
746  return new StopMessage();
747  } else if ( strncmp("TurnMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
748  return new TurnMessage();
749  } else if ( strncmp("CartesianGotoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
750  return new CartesianGotoMessage();
751  } else if ( strncmp("PolarGotoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
752  return new PolarGotoMessage();
753  } else if ( strncmp("PlaceGotoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
754  return new PlaceGotoMessage();
755  } else if ( strncmp("PlaceWithOriGotoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
756  return new PlaceWithOriGotoMessage();
757  } else if ( strncmp("ObstacleMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
758  return new ObstacleMessage();
759  } else if ( strncmp("ResetOdometryMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
760  return new ResetOdometryMessage();
761  } else if ( strncmp("SetMaxVelocityMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
762  return new SetMaxVelocityMessage();
763  } else if ( strncmp("SetMaxRotationMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
764  return new SetMaxRotationMessage();
765  } else if ( strncmp("SetEscapingMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
766  return new SetEscapingMessage();
767  } else if ( strncmp("SetSecurityDistanceMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
768  return new SetSecurityDistanceMessage();
769  } else if ( strncmp("SetDriveModeMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
770  return new SetDriveModeMessage();
771  } else if ( strncmp("SetStopAtTargetMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
772  return new SetStopAtTargetMessage();
773  } else if ( strncmp("SetOrientationModeMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
774  return new SetOrientationModeMessage();
775  } else if ( strncmp("ResetParametersMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
776  return new ResetParametersMessage();
777  } else {
778  throw UnknownTypeException("The given type '%s' does not match any known "
779  "message type for this interface type.", type);
780  }
781 }
782 
783 
784 /** Copy values from other interface.
785  * @param other other interface to copy values from
786  */
787 void
789 {
790  const NavigatorInterface *oi = dynamic_cast<const NavigatorInterface *>(other);
791  if (oi == NULL) {
792  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
793  type(), other->type());
794  }
795  memcpy(data, oi->data, sizeof(NavigatorInterface_data_t));
796 }
797 
798 const char *
799 NavigatorInterface::enum_tostring(const char *enumtype, int val) const
800 {
801  if (strcmp(enumtype, "DriveMode") == 0) {
802  return tostring_DriveMode((DriveMode)val);
803  }
804  if (strcmp(enumtype, "OrientationMode") == 0) {
805  return tostring_OrientationMode((OrientationMode)val);
806  }
807  throw UnknownTypeException("Unknown enum type %s", enumtype);
808 }
809 
810 /* =========== messages =========== */
811 /** @class NavigatorInterface::StopMessage <interfaces/NavigatorInterface.h>
812  * StopMessage Fawkes BlackBoard Interface Message.
813  *
814 
815  */
816 
817 
818 /** Constructor */
820 {
821  data_size = sizeof(StopMessage_data_t);
822  data_ptr = malloc(data_size);
823  memset(data_ptr, 0, data_size);
824  data = (StopMessage_data_t *)data_ptr;
826  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
827  enum_map_DriveMode[(int)Forward] = "Forward";
828  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
829  enum_map_DriveMode[(int)Backward] = "Backward";
830  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
831  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
832  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
833 }
834 
835 /** Destructor */
837 {
838  free(data_ptr);
839 }
840 
841 /** Copy constructor.
842  * @param m message to copy from
843  */
845 {
846  data_size = m->data_size;
847  data_ptr = malloc(data_size);
848  memcpy(data_ptr, m->data_ptr, data_size);
849  data = (StopMessage_data_t *)data_ptr;
851 }
852 
853 /* Methods */
854 /** Clone this message.
855  * Produces a message of the same type as this message and copies the
856  * data to the new message.
857  * @return clone of this message
858  */
859 Message *
861 {
862  return new NavigatorInterface::StopMessage(this);
863 }
864 /** @class NavigatorInterface::TurnMessage <interfaces/NavigatorInterface.h>
865  * TurnMessage Fawkes BlackBoard Interface Message.
866  *
867 
868  */
869 
870 
871 /** Constructor with initial values.
872  * @param ini_angle initial value for angle
873  * @param ini_velocity initial value for velocity
874  */
875 NavigatorInterface::TurnMessage::TurnMessage(const float ini_angle, const float ini_velocity) : Message("TurnMessage")
876 {
877  data_size = sizeof(TurnMessage_data_t);
878  data_ptr = malloc(data_size);
879  memset(data_ptr, 0, data_size);
880  data = (TurnMessage_data_t *)data_ptr;
882  data->angle = ini_angle;
883  data->velocity = ini_velocity;
884  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
885  enum_map_DriveMode[(int)Forward] = "Forward";
886  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
887  enum_map_DriveMode[(int)Backward] = "Backward";
888  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
889  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
890  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
891  add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
892  add_fieldinfo(IFT_FLOAT, "velocity", 1, &data->velocity);
893 }
894 /** Constructor */
896 {
897  data_size = sizeof(TurnMessage_data_t);
898  data_ptr = malloc(data_size);
899  memset(data_ptr, 0, data_size);
900  data = (TurnMessage_data_t *)data_ptr;
902  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
903  enum_map_DriveMode[(int)Forward] = "Forward";
904  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
905  enum_map_DriveMode[(int)Backward] = "Backward";
906  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
907  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
908  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
909  add_fieldinfo(IFT_FLOAT, "angle", 1, &data->angle);
910  add_fieldinfo(IFT_FLOAT, "velocity", 1, &data->velocity);
911 }
912 
913 /** Destructor */
915 {
916  free(data_ptr);
917 }
918 
919 /** Copy constructor.
920  * @param m message to copy from
921  */
923 {
924  data_size = m->data_size;
925  data_ptr = malloc(data_size);
926  memcpy(data_ptr, m->data_ptr, data_size);
927  data = (TurnMessage_data_t *)data_ptr;
929 }
930 
931 /* Methods */
932 /** Get angle value.
933  * Angle of the turn.
934  * @return angle value
935  */
936 float
938 {
939  return data->angle;
940 }
941 
942 /** Get maximum length of angle value.
943  * @return length of angle value, can be length of the array or number of
944  * maximum number of characters for a string
945  */
946 size_t
948 {
949  return 1;
950 }
951 
952 /** Set angle value.
953  * Angle of the turn.
954  * @param new_angle new angle value
955  */
956 void
958 {
959  data->angle = new_angle;
960 }
961 
962 /** Get velocity value.
963  * The desired turning velocity in rad/s,
964  set to zero to use default value.
965  * @return velocity value
966  */
967 float
969 {
970  return data->velocity;
971 }
972 
973 /** Get maximum length of velocity value.
974  * @return length of velocity value, can be length of the array or number of
975  * maximum number of characters for a string
976  */
977 size_t
979 {
980  return 1;
981 }
982 
983 /** Set velocity value.
984  * The desired turning velocity in rad/s,
985  set to zero to use default value.
986  * @param new_velocity new velocity value
987  */
988 void
990 {
991  data->velocity = new_velocity;
992 }
993 
994 /** Clone this message.
995  * Produces a message of the same type as this message and copies the
996  * data to the new message.
997  * @return clone of this message
998  */
999 Message *
1001 {
1002  return new NavigatorInterface::TurnMessage(this);
1003 }
1004 /** @class NavigatorInterface::CartesianGotoMessage <interfaces/NavigatorInterface.h>
1005  * CartesianGotoMessage Fawkes BlackBoard Interface Message.
1006  *
1007 
1008  */
1009 
1010 
1011 /** Constructor with initial values.
1012  * @param ini_x initial value for x
1013  * @param ini_y initial value for y
1014  * @param ini_orientation initial value for orientation
1015  */
1016 NavigatorInterface::CartesianGotoMessage::CartesianGotoMessage(const float ini_x, const float ini_y, const float ini_orientation) : Message("CartesianGotoMessage")
1017 {
1018  data_size = sizeof(CartesianGotoMessage_data_t);
1019  data_ptr = malloc(data_size);
1020  memset(data_ptr, 0, data_size);
1021  data = (CartesianGotoMessage_data_t *)data_ptr;
1023  data->x = ini_x;
1024  data->y = ini_y;
1025  data->orientation = ini_orientation;
1026  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1027  enum_map_DriveMode[(int)Forward] = "Forward";
1028  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1029  enum_map_DriveMode[(int)Backward] = "Backward";
1030  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1031  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1032  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1033  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1034  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1035  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1036 }
1037 /** Constructor */
1039 {
1040  data_size = sizeof(CartesianGotoMessage_data_t);
1041  data_ptr = malloc(data_size);
1042  memset(data_ptr, 0, data_size);
1043  data = (CartesianGotoMessage_data_t *)data_ptr;
1045  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1046  enum_map_DriveMode[(int)Forward] = "Forward";
1047  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1048  enum_map_DriveMode[(int)Backward] = "Backward";
1049  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1050  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1051  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1052  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1053  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1054  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1055 }
1056 
1057 /** Destructor */
1059 {
1060  free(data_ptr);
1061 }
1062 
1063 /** Copy constructor.
1064  * @param m message to copy from
1065  */
1067 {
1068  data_size = m->data_size;
1069  data_ptr = malloc(data_size);
1070  memcpy(data_ptr, m->data_ptr, data_size);
1071  data = (CartesianGotoMessage_data_t *)data_ptr;
1073 }
1074 
1075 /* Methods */
1076 /** Get x value.
1077  * X-coordinate of the target, in the robot's coordinate system.
1078  * @return x value
1079  */
1080 float
1082 {
1083  return data->x;
1084 }
1085 
1086 /** Get maximum length of x value.
1087  * @return length of x value, can be length of the array or number of
1088  * maximum number of characters for a string
1089  */
1090 size_t
1092 {
1093  return 1;
1094 }
1095 
1096 /** Set x value.
1097  * X-coordinate of the target, in the robot's coordinate system.
1098  * @param new_x new x value
1099  */
1100 void
1102 {
1103  data->x = new_x;
1104 }
1105 
1106 /** Get y value.
1107  * Y-coordinate of the target, in the robot's coordinate system.
1108  * @return y value
1109  */
1110 float
1112 {
1113  return data->y;
1114 }
1115 
1116 /** Get maximum length of y value.
1117  * @return length of y value, can be length of the array or number of
1118  * maximum number of characters for a string
1119  */
1120 size_t
1122 {
1123  return 1;
1124 }
1125 
1126 /** Set y value.
1127  * Y-coordinate of the target, in the robot's coordinate system.
1128  * @param new_y new y value
1129  */
1130 void
1132 {
1133  data->y = new_y;
1134 }
1135 
1136 /** Get orientation value.
1137  * The desired orientation of the robot at the target.
1138  * @return orientation value
1139  */
1140 float
1142 {
1143  return data->orientation;
1144 }
1145 
1146 /** Get maximum length of orientation value.
1147  * @return length of orientation value, can be length of the array or number of
1148  * maximum number of characters for a string
1149  */
1150 size_t
1152 {
1153  return 1;
1154 }
1155 
1156 /** Set orientation value.
1157  * The desired orientation of the robot at the target.
1158  * @param new_orientation new orientation value
1159  */
1160 void
1162 {
1163  data->orientation = new_orientation;
1164 }
1165 
1166 /** Clone this message.
1167  * Produces a message of the same type as this message and copies the
1168  * data to the new message.
1169  * @return clone of this message
1170  */
1171 Message *
1173 {
1175 }
1176 /** @class NavigatorInterface::PolarGotoMessage <interfaces/NavigatorInterface.h>
1177  * PolarGotoMessage Fawkes BlackBoard Interface Message.
1178  *
1179 
1180  */
1181 
1182 
1183 /** Constructor with initial values.
1184  * @param ini_phi initial value for phi
1185  * @param ini_dist initial value for dist
1186  * @param ini_orientation initial value for orientation
1187  */
1188 NavigatorInterface::PolarGotoMessage::PolarGotoMessage(const float ini_phi, const float ini_dist, const float ini_orientation) : Message("PolarGotoMessage")
1189 {
1190  data_size = sizeof(PolarGotoMessage_data_t);
1191  data_ptr = malloc(data_size);
1192  memset(data_ptr, 0, data_size);
1193  data = (PolarGotoMessage_data_t *)data_ptr;
1195  data->phi = ini_phi;
1196  data->dist = ini_dist;
1197  data->orientation = ini_orientation;
1198  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1199  enum_map_DriveMode[(int)Forward] = "Forward";
1200  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1201  enum_map_DriveMode[(int)Backward] = "Backward";
1202  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1203  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1204  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1205  add_fieldinfo(IFT_FLOAT, "phi", 1, &data->phi);
1206  add_fieldinfo(IFT_FLOAT, "dist", 1, &data->dist);
1207  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1208 }
1209 /** Constructor */
1211 {
1212  data_size = sizeof(PolarGotoMessage_data_t);
1213  data_ptr = malloc(data_size);
1214  memset(data_ptr, 0, data_size);
1215  data = (PolarGotoMessage_data_t *)data_ptr;
1217  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1218  enum_map_DriveMode[(int)Forward] = "Forward";
1219  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1220  enum_map_DriveMode[(int)Backward] = "Backward";
1221  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1222  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1223  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1224  add_fieldinfo(IFT_FLOAT, "phi", 1, &data->phi);
1225  add_fieldinfo(IFT_FLOAT, "dist", 1, &data->dist);
1226  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1227 }
1228 
1229 /** Destructor */
1231 {
1232  free(data_ptr);
1233 }
1234 
1235 /** Copy constructor.
1236  * @param m message to copy from
1237  */
1239 {
1240  data_size = m->data_size;
1241  data_ptr = malloc(data_size);
1242  memcpy(data_ptr, m->data_ptr, data_size);
1243  data = (PolarGotoMessage_data_t *)data_ptr;
1245 }
1246 
1247 /* Methods */
1248 /** Get phi value.
1249  * Angle between the robot's front and the target.
1250  * @return phi value
1251  */
1252 float
1254 {
1255  return data->phi;
1256 }
1257 
1258 /** Get maximum length of phi value.
1259  * @return length of phi value, can be length of the array or number of
1260  * maximum number of characters for a string
1261  */
1262 size_t
1264 {
1265  return 1;
1266 }
1267 
1268 /** Set phi value.
1269  * Angle between the robot's front and the target.
1270  * @param new_phi new phi value
1271  */
1272 void
1274 {
1275  data->phi = new_phi;
1276 }
1277 
1278 /** Get dist value.
1279  * Distance to the target.
1280  * @return dist value
1281  */
1282 float
1284 {
1285  return data->dist;
1286 }
1287 
1288 /** Get maximum length of dist value.
1289  * @return length of dist value, can be length of the array or number of
1290  * maximum number of characters for a string
1291  */
1292 size_t
1294 {
1295  return 1;
1296 }
1297 
1298 /** Set dist value.
1299  * Distance to the target.
1300  * @param new_dist new dist value
1301  */
1302 void
1304 {
1305  data->dist = new_dist;
1306 }
1307 
1308 /** Get orientation value.
1309  * The desired orientation of the robot at the target.
1310  * @return orientation value
1311  */
1312 float
1314 {
1315  return data->orientation;
1316 }
1317 
1318 /** Get maximum length of orientation value.
1319  * @return length of orientation value, can be length of the array or number of
1320  * maximum number of characters for a string
1321  */
1322 size_t
1324 {
1325  return 1;
1326 }
1327 
1328 /** Set orientation value.
1329  * The desired orientation of the robot at the target.
1330  * @param new_orientation new orientation value
1331  */
1332 void
1334 {
1335  data->orientation = new_orientation;
1336 }
1337 
1338 /** Clone this message.
1339  * Produces a message of the same type as this message and copies the
1340  * data to the new message.
1341  * @return clone of this message
1342  */
1343 Message *
1345 {
1346  return new NavigatorInterface::PolarGotoMessage(this);
1347 }
1348 /** @class NavigatorInterface::PlaceGotoMessage <interfaces/NavigatorInterface.h>
1349  * PlaceGotoMessage Fawkes BlackBoard Interface Message.
1350  *
1351 
1352  */
1353 
1354 
1355 /** Constructor with initial values.
1356  * @param ini_place initial value for place
1357  */
1358 NavigatorInterface::PlaceGotoMessage::PlaceGotoMessage(const char * ini_place) : Message("PlaceGotoMessage")
1359 {
1360  data_size = sizeof(PlaceGotoMessage_data_t);
1361  data_ptr = malloc(data_size);
1362  memset(data_ptr, 0, data_size);
1363  data = (PlaceGotoMessage_data_t *)data_ptr;
1365  strncpy(data->place, ini_place, 64);
1366  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1367  enum_map_DriveMode[(int)Forward] = "Forward";
1368  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1369  enum_map_DriveMode[(int)Backward] = "Backward";
1370  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1371  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1372  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1373  add_fieldinfo(IFT_STRING, "place", 64, data->place);
1374 }
1375 /** Constructor */
1377 {
1378  data_size = sizeof(PlaceGotoMessage_data_t);
1379  data_ptr = malloc(data_size);
1380  memset(data_ptr, 0, data_size);
1381  data = (PlaceGotoMessage_data_t *)data_ptr;
1383  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1384  enum_map_DriveMode[(int)Forward] = "Forward";
1385  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1386  enum_map_DriveMode[(int)Backward] = "Backward";
1387  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1388  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1389  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1390  add_fieldinfo(IFT_STRING, "place", 64, data->place);
1391 }
1392 
1393 /** Destructor */
1395 {
1396  free(data_ptr);
1397 }
1398 
1399 /** Copy constructor.
1400  * @param m message to copy from
1401  */
1403 {
1404  data_size = m->data_size;
1405  data_ptr = malloc(data_size);
1406  memcpy(data_ptr, m->data_ptr, data_size);
1407  data = (PlaceGotoMessage_data_t *)data_ptr;
1409 }
1410 
1411 /* Methods */
1412 /** Get place value.
1413  * Place to go to.
1414  * @return place value
1415  */
1416 char *
1418 {
1419  return data->place;
1420 }
1421 
1422 /** Get maximum length of place value.
1423  * @return length of place value, can be length of the array or number of
1424  * maximum number of characters for a string
1425  */
1426 size_t
1428 {
1429  return 64;
1430 }
1431 
1432 /** Set place value.
1433  * Place to go to.
1434  * @param new_place new place value
1435  */
1436 void
1438 {
1439  strncpy(data->place, new_place, sizeof(data->place));
1440 }
1441 
1442 /** Clone this message.
1443  * Produces a message of the same type as this message and copies the
1444  * data to the new message.
1445  * @return clone of this message
1446  */
1447 Message *
1449 {
1450  return new NavigatorInterface::PlaceGotoMessage(this);
1451 }
1452 /** @class NavigatorInterface::PlaceWithOriGotoMessage <interfaces/NavigatorInterface.h>
1453  * PlaceWithOriGotoMessage Fawkes BlackBoard Interface Message.
1454  *
1455 
1456  */
1457 
1458 
1459 /** Constructor with initial values.
1460  * @param ini_place initial value for place
1461  * @param ini_orientation initial value for orientation
1462  */
1463 NavigatorInterface::PlaceWithOriGotoMessage::PlaceWithOriGotoMessage(const char * ini_place, const float ini_orientation) : Message("PlaceWithOriGotoMessage")
1464 {
1465  data_size = sizeof(PlaceWithOriGotoMessage_data_t);
1466  data_ptr = malloc(data_size);
1467  memset(data_ptr, 0, data_size);
1468  data = (PlaceWithOriGotoMessage_data_t *)data_ptr;
1470  strncpy(data->place, ini_place, 64);
1471  data->orientation = ini_orientation;
1472  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1473  enum_map_DriveMode[(int)Forward] = "Forward";
1474  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1475  enum_map_DriveMode[(int)Backward] = "Backward";
1476  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1477  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1478  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1479  add_fieldinfo(IFT_STRING, "place", 64, data->place);
1480  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1481 }
1482 /** Constructor */
1484 {
1485  data_size = sizeof(PlaceWithOriGotoMessage_data_t);
1486  data_ptr = malloc(data_size);
1487  memset(data_ptr, 0, data_size);
1488  data = (PlaceWithOriGotoMessage_data_t *)data_ptr;
1490  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1491  enum_map_DriveMode[(int)Forward] = "Forward";
1492  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1493  enum_map_DriveMode[(int)Backward] = "Backward";
1494  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1495  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1496  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1497  add_fieldinfo(IFT_STRING, "place", 64, data->place);
1498  add_fieldinfo(IFT_FLOAT, "orientation", 1, &data->orientation);
1499 }
1500 
1501 /** Destructor */
1503 {
1504  free(data_ptr);
1505 }
1506 
1507 /** Copy constructor.
1508  * @param m message to copy from
1509  */
1511 {
1512  data_size = m->data_size;
1513  data_ptr = malloc(data_size);
1514  memcpy(data_ptr, m->data_ptr, data_size);
1515  data = (PlaceWithOriGotoMessage_data_t *)data_ptr;
1517 }
1518 
1519 /* Methods */
1520 /** Get place value.
1521  * Place to go to.
1522  * @return place value
1523  */
1524 char *
1526 {
1527  return data->place;
1528 }
1529 
1530 /** Get maximum length of place value.
1531  * @return length of place value, can be length of the array or number of
1532  * maximum number of characters for a string
1533  */
1534 size_t
1536 {
1537  return 64;
1538 }
1539 
1540 /** Set place value.
1541  * Place to go to.
1542  * @param new_place new place value
1543  */
1544 void
1546 {
1547  strncpy(data->place, new_place, sizeof(data->place));
1548 }
1549 
1550 /** Get orientation value.
1551  * The desired orientation of the robot at the target.
1552  * @return orientation value
1553  */
1554 float
1556 {
1557  return data->orientation;
1558 }
1559 
1560 /** Get maximum length of orientation value.
1561  * @return length of orientation value, can be length of the array or number of
1562  * maximum number of characters for a string
1563  */
1564 size_t
1566 {
1567  return 1;
1568 }
1569 
1570 /** Set orientation value.
1571  * The desired orientation of the robot at the target.
1572  * @param new_orientation new orientation value
1573  */
1574 void
1576 {
1577  data->orientation = new_orientation;
1578 }
1579 
1580 /** Clone this message.
1581  * Produces a message of the same type as this message and copies the
1582  * data to the new message.
1583  * @return clone of this message
1584  */
1585 Message *
1587 {
1589 }
1590 /** @class NavigatorInterface::ObstacleMessage <interfaces/NavigatorInterface.h>
1591  * ObstacleMessage Fawkes BlackBoard Interface Message.
1592  *
1593 
1594  */
1595 
1596 
1597 /** Constructor with initial values.
1598  * @param ini_x initial value for x
1599  * @param ini_y initial value for y
1600  * @param ini_width initial value for width
1601  */
1602 NavigatorInterface::ObstacleMessage::ObstacleMessage(const float ini_x, const float ini_y, const float ini_width) : Message("ObstacleMessage")
1603 {
1604  data_size = sizeof(ObstacleMessage_data_t);
1605  data_ptr = malloc(data_size);
1606  memset(data_ptr, 0, data_size);
1607  data = (ObstacleMessage_data_t *)data_ptr;
1609  data->x = ini_x;
1610  data->y = ini_y;
1611  data->width = ini_width;
1612  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1613  enum_map_DriveMode[(int)Forward] = "Forward";
1614  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1615  enum_map_DriveMode[(int)Backward] = "Backward";
1616  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1617  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1618  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1619  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1620  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1621  add_fieldinfo(IFT_FLOAT, "width", 1, &data->width);
1622 }
1623 /** Constructor */
1625 {
1626  data_size = sizeof(ObstacleMessage_data_t);
1627  data_ptr = malloc(data_size);
1628  memset(data_ptr, 0, data_size);
1629  data = (ObstacleMessage_data_t *)data_ptr;
1631  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1632  enum_map_DriveMode[(int)Forward] = "Forward";
1633  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1634  enum_map_DriveMode[(int)Backward] = "Backward";
1635  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1636  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1637  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1638  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1639  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1640  add_fieldinfo(IFT_FLOAT, "width", 1, &data->width);
1641 }
1642 
1643 /** Destructor */
1645 {
1646  free(data_ptr);
1647 }
1648 
1649 /** Copy constructor.
1650  * @param m message to copy from
1651  */
1653 {
1654  data_size = m->data_size;
1655  data_ptr = malloc(data_size);
1656  memcpy(data_ptr, m->data_ptr, data_size);
1657  data = (ObstacleMessage_data_t *)data_ptr;
1659 }
1660 
1661 /* Methods */
1662 /** Get x value.
1663  * X-coordinate of the obstacle.
1664  * @return x value
1665  */
1666 float
1668 {
1669  return data->x;
1670 }
1671 
1672 /** Get maximum length of x value.
1673  * @return length of x value, can be length of the array or number of
1674  * maximum number of characters for a string
1675  */
1676 size_t
1678 {
1679  return 1;
1680 }
1681 
1682 /** Set x value.
1683  * X-coordinate of the obstacle.
1684  * @param new_x new x value
1685  */
1686 void
1688 {
1689  data->x = new_x;
1690 }
1691 
1692 /** Get y value.
1693  * Y-coordinate of the obstacle.
1694  * @return y value
1695  */
1696 float
1698 {
1699  return data->y;
1700 }
1701 
1702 /** Get maximum length of y value.
1703  * @return length of y value, can be length of the array or number of
1704  * maximum number of characters for a string
1705  */
1706 size_t
1708 {
1709  return 1;
1710 }
1711 
1712 /** Set y value.
1713  * Y-coordinate of the obstacle.
1714  * @param new_y new y value
1715  */
1716 void
1718 {
1719  data->y = new_y;
1720 }
1721 
1722 /** Get width value.
1723  * Width of the obstacle.
1724  * @return width value
1725  */
1726 float
1728 {
1729  return data->width;
1730 }
1731 
1732 /** Get maximum length of width value.
1733  * @return length of width value, can be length of the array or number of
1734  * maximum number of characters for a string
1735  */
1736 size_t
1738 {
1739  return 1;
1740 }
1741 
1742 /** Set width value.
1743  * Width of the obstacle.
1744  * @param new_width new width value
1745  */
1746 void
1748 {
1749  data->width = new_width;
1750 }
1751 
1752 /** Clone this message.
1753  * Produces a message of the same type as this message and copies the
1754  * data to the new message.
1755  * @return clone of this message
1756  */
1757 Message *
1759 {
1760  return new NavigatorInterface::ObstacleMessage(this);
1761 }
1762 /** @class NavigatorInterface::ResetOdometryMessage <interfaces/NavigatorInterface.h>
1763  * ResetOdometryMessage Fawkes BlackBoard Interface Message.
1764  *
1765 
1766  */
1767 
1768 
1769 /** Constructor */
1771 {
1772  data_size = sizeof(ResetOdometryMessage_data_t);
1773  data_ptr = malloc(data_size);
1774  memset(data_ptr, 0, data_size);
1775  data = (ResetOdometryMessage_data_t *)data_ptr;
1777  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1778  enum_map_DriveMode[(int)Forward] = "Forward";
1779  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1780  enum_map_DriveMode[(int)Backward] = "Backward";
1781  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1782  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1783  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1784 }
1785 
1786 /** Destructor */
1788 {
1789  free(data_ptr);
1790 }
1791 
1792 /** Copy constructor.
1793  * @param m message to copy from
1794  */
1796 {
1797  data_size = m->data_size;
1798  data_ptr = malloc(data_size);
1799  memcpy(data_ptr, m->data_ptr, data_size);
1800  data = (ResetOdometryMessage_data_t *)data_ptr;
1802 }
1803 
1804 /* Methods */
1805 /** Clone this message.
1806  * Produces a message of the same type as this message and copies the
1807  * data to the new message.
1808  * @return clone of this message
1809  */
1810 Message *
1812 {
1814 }
1815 /** @class NavigatorInterface::SetMaxVelocityMessage <interfaces/NavigatorInterface.h>
1816  * SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
1817  *
1818 
1819  */
1820 
1821 
1822 /** Constructor with initial values.
1823  * @param ini_max_velocity initial value for max_velocity
1824  */
1825 NavigatorInterface::SetMaxVelocityMessage::SetMaxVelocityMessage(const float ini_max_velocity) : Message("SetMaxVelocityMessage")
1826 {
1827  data_size = sizeof(SetMaxVelocityMessage_data_t);
1828  data_ptr = malloc(data_size);
1829  memset(data_ptr, 0, data_size);
1830  data = (SetMaxVelocityMessage_data_t *)data_ptr;
1832  data->max_velocity = ini_max_velocity;
1833  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1834  enum_map_DriveMode[(int)Forward] = "Forward";
1835  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1836  enum_map_DriveMode[(int)Backward] = "Backward";
1837  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1838  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1839  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1840  add_fieldinfo(IFT_FLOAT, "max_velocity", 1, &data->max_velocity);
1841 }
1842 /** Constructor */
1844 {
1845  data_size = sizeof(SetMaxVelocityMessage_data_t);
1846  data_ptr = malloc(data_size);
1847  memset(data_ptr, 0, data_size);
1848  data = (SetMaxVelocityMessage_data_t *)data_ptr;
1850  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1851  enum_map_DriveMode[(int)Forward] = "Forward";
1852  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1853  enum_map_DriveMode[(int)Backward] = "Backward";
1854  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1855  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1856  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1857  add_fieldinfo(IFT_FLOAT, "max_velocity", 1, &data->max_velocity);
1858 }
1859 
1860 /** Destructor */
1862 {
1863  free(data_ptr);
1864 }
1865 
1866 /** Copy constructor.
1867  * @param m message to copy from
1868  */
1870 {
1871  data_size = m->data_size;
1872  data_ptr = malloc(data_size);
1873  memcpy(data_ptr, m->data_ptr, data_size);
1874  data = (SetMaxVelocityMessage_data_t *)data_ptr;
1876 }
1877 
1878 /* Methods */
1879 /** Get max_velocity value.
1880  * Maximum velocity
1881  * @return max_velocity value
1882  */
1883 float
1885 {
1886  return data->max_velocity;
1887 }
1888 
1889 /** Get maximum length of max_velocity value.
1890  * @return length of max_velocity value, can be length of the array or number of
1891  * maximum number of characters for a string
1892  */
1893 size_t
1895 {
1896  return 1;
1897 }
1898 
1899 /** Set max_velocity value.
1900  * Maximum velocity
1901  * @param new_max_velocity new max_velocity value
1902  */
1903 void
1905 {
1906  data->max_velocity = new_max_velocity;
1907 }
1908 
1909 /** Clone this message.
1910  * Produces a message of the same type as this message and copies the
1911  * data to the new message.
1912  * @return clone of this message
1913  */
1914 Message *
1916 {
1918 }
1919 /** @class NavigatorInterface::SetMaxRotationMessage <interfaces/NavigatorInterface.h>
1920  * SetMaxRotationMessage Fawkes BlackBoard Interface Message.
1921  *
1922 
1923  */
1924 
1925 
1926 /** Constructor with initial values.
1927  * @param ini_max_rotation initial value for max_rotation
1928  */
1929 NavigatorInterface::SetMaxRotationMessage::SetMaxRotationMessage(const float ini_max_rotation) : Message("SetMaxRotationMessage")
1930 {
1931  data_size = sizeof(SetMaxRotationMessage_data_t);
1932  data_ptr = malloc(data_size);
1933  memset(data_ptr, 0, data_size);
1934  data = (SetMaxRotationMessage_data_t *)data_ptr;
1936  data->max_rotation = ini_max_rotation;
1937  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1938  enum_map_DriveMode[(int)Forward] = "Forward";
1939  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1940  enum_map_DriveMode[(int)Backward] = "Backward";
1941  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1942  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1943  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1944  add_fieldinfo(IFT_FLOAT, "max_rotation", 1, &data->max_rotation);
1945 }
1946 /** Constructor */
1948 {
1949  data_size = sizeof(SetMaxRotationMessage_data_t);
1950  data_ptr = malloc(data_size);
1951  memset(data_ptr, 0, data_size);
1952  data = (SetMaxRotationMessage_data_t *)data_ptr;
1954  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
1955  enum_map_DriveMode[(int)Forward] = "Forward";
1956  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
1957  enum_map_DriveMode[(int)Backward] = "Backward";
1958  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
1959  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
1960  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
1961  add_fieldinfo(IFT_FLOAT, "max_rotation", 1, &data->max_rotation);
1962 }
1963 
1964 /** Destructor */
1966 {
1967  free(data_ptr);
1968 }
1969 
1970 /** Copy constructor.
1971  * @param m message to copy from
1972  */
1974 {
1975  data_size = m->data_size;
1976  data_ptr = malloc(data_size);
1977  memcpy(data_ptr, m->data_ptr, data_size);
1978  data = (SetMaxRotationMessage_data_t *)data_ptr;
1980 }
1981 
1982 /* Methods */
1983 /** Get max_rotation value.
1984  * Maximum rotation velocity
1985  * @return max_rotation value
1986  */
1987 float
1989 {
1990  return data->max_rotation;
1991 }
1992 
1993 /** Get maximum length of max_rotation value.
1994  * @return length of max_rotation value, can be length of the array or number of
1995  * maximum number of characters for a string
1996  */
1997 size_t
1999 {
2000  return 1;
2001 }
2002 
2003 /** Set max_rotation value.
2004  * Maximum rotation velocity
2005  * @param new_max_rotation new max_rotation value
2006  */
2007 void
2009 {
2010  data->max_rotation = new_max_rotation;
2011 }
2012 
2013 /** Clone this message.
2014  * Produces a message of the same type as this message and copies the
2015  * data to the new message.
2016  * @return clone of this message
2017  */
2018 Message *
2020 {
2022 }
2023 /** @class NavigatorInterface::SetEscapingMessage <interfaces/NavigatorInterface.h>
2024  * SetEscapingMessage Fawkes BlackBoard Interface Message.
2025  *
2026 
2027  */
2028 
2029 
2030 /** Constructor with initial values.
2031  * @param ini_escaping_enabled initial value for escaping_enabled
2032  */
2033 NavigatorInterface::SetEscapingMessage::SetEscapingMessage(const bool ini_escaping_enabled) : Message("SetEscapingMessage")
2034 {
2035  data_size = sizeof(SetEscapingMessage_data_t);
2036  data_ptr = malloc(data_size);
2037  memset(data_ptr, 0, data_size);
2038  data = (SetEscapingMessage_data_t *)data_ptr;
2040  data->escaping_enabled = ini_escaping_enabled;
2041  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2042  enum_map_DriveMode[(int)Forward] = "Forward";
2043  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2044  enum_map_DriveMode[(int)Backward] = "Backward";
2045  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2046  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2047  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2048  add_fieldinfo(IFT_BOOL, "escaping_enabled", 1, &data->escaping_enabled);
2049 }
2050 /** Constructor */
2052 {
2053  data_size = sizeof(SetEscapingMessage_data_t);
2054  data_ptr = malloc(data_size);
2055  memset(data_ptr, 0, data_size);
2056  data = (SetEscapingMessage_data_t *)data_ptr;
2058  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2059  enum_map_DriveMode[(int)Forward] = "Forward";
2060  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2061  enum_map_DriveMode[(int)Backward] = "Backward";
2062  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2063  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2064  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2065  add_fieldinfo(IFT_BOOL, "escaping_enabled", 1, &data->escaping_enabled);
2066 }
2067 
2068 /** Destructor */
2070 {
2071  free(data_ptr);
2072 }
2073 
2074 /** Copy constructor.
2075  * @param m message to copy from
2076  */
2078 {
2079  data_size = m->data_size;
2080  data_ptr = malloc(data_size);
2081  memcpy(data_ptr, m->data_ptr, data_size);
2082  data = (SetEscapingMessage_data_t *)data_ptr;
2084 }
2085 
2086 /* Methods */
2087 /** Get escaping_enabled value.
2088  * This is used for navigation components with integrated collision avoidance,
2089  to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
2090  * @return escaping_enabled value
2091  */
2092 bool
2094 {
2095  return data->escaping_enabled;
2096 }
2097 
2098 /** Get maximum length of escaping_enabled value.
2099  * @return length of escaping_enabled value, can be length of the array or number of
2100  * maximum number of characters for a string
2101  */
2102 size_t
2104 {
2105  return 1;
2106 }
2107 
2108 /** Set escaping_enabled value.
2109  * This is used for navigation components with integrated collision avoidance,
2110  to check whether the navigator should stop when an obstacle obstructs the path, or if it should escape.
2111  * @param new_escaping_enabled new escaping_enabled value
2112  */
2113 void
2115 {
2116  data->escaping_enabled = new_escaping_enabled;
2117 }
2118 
2119 /** Clone this message.
2120  * Produces a message of the same type as this message and copies the
2121  * data to the new message.
2122  * @return clone of this message
2123  */
2124 Message *
2126 {
2127  return new NavigatorInterface::SetEscapingMessage(this);
2128 }
2129 /** @class NavigatorInterface::SetSecurityDistanceMessage <interfaces/NavigatorInterface.h>
2130  * SetSecurityDistanceMessage Fawkes BlackBoard Interface Message.
2131  *
2132 
2133  */
2134 
2135 
2136 /** Constructor with initial values.
2137  * @param ini_security_distance initial value for security_distance
2138  */
2139 NavigatorInterface::SetSecurityDistanceMessage::SetSecurityDistanceMessage(const float ini_security_distance) : Message("SetSecurityDistanceMessage")
2140 {
2141  data_size = sizeof(SetSecurityDistanceMessage_data_t);
2142  data_ptr = malloc(data_size);
2143  memset(data_ptr, 0, data_size);
2144  data = (SetSecurityDistanceMessage_data_t *)data_ptr;
2146  data->security_distance = ini_security_distance;
2147  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2148  enum_map_DriveMode[(int)Forward] = "Forward";
2149  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2150  enum_map_DriveMode[(int)Backward] = "Backward";
2151  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2152  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2153  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2154  add_fieldinfo(IFT_FLOAT, "security_distance", 1, &data->security_distance);
2155 }
2156 /** Constructor */
2158 {
2159  data_size = sizeof(SetSecurityDistanceMessage_data_t);
2160  data_ptr = malloc(data_size);
2161  memset(data_ptr, 0, data_size);
2162  data = (SetSecurityDistanceMessage_data_t *)data_ptr;
2164  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2165  enum_map_DriveMode[(int)Forward] = "Forward";
2166  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2167  enum_map_DriveMode[(int)Backward] = "Backward";
2168  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2169  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2170  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2171  add_fieldinfo(IFT_FLOAT, "security_distance", 1, &data->security_distance);
2172 }
2173 
2174 /** Destructor */
2176 {
2177  free(data_ptr);
2178 }
2179 
2180 /** Copy constructor.
2181  * @param m message to copy from
2182  */
2184 {
2185  data_size = m->data_size;
2186  data_ptr = malloc(data_size);
2187  memcpy(data_ptr, m->data_ptr, data_size);
2188  data = (SetSecurityDistanceMessage_data_t *)data_ptr;
2190 }
2191 
2192 /* Methods */
2193 /** Get security_distance value.
2194  * Security distance to keep to obstacles
2195  * @return security_distance value
2196  */
2197 float
2199 {
2200  return data->security_distance;
2201 }
2202 
2203 /** Get maximum length of security_distance value.
2204  * @return length of security_distance value, can be length of the array or number of
2205  * maximum number of characters for a string
2206  */
2207 size_t
2209 {
2210  return 1;
2211 }
2212 
2213 /** Set security_distance value.
2214  * Security distance to keep to obstacles
2215  * @param new_security_distance new security_distance value
2216  */
2217 void
2219 {
2220  data->security_distance = new_security_distance;
2221 }
2222 
2223 /** Clone this message.
2224  * Produces a message of the same type as this message and copies the
2225  * data to the new message.
2226  * @return clone of this message
2227  */
2228 Message *
2230 {
2232 }
2233 /** @class NavigatorInterface::SetDriveModeMessage <interfaces/NavigatorInterface.h>
2234  * SetDriveModeMessage Fawkes BlackBoard Interface Message.
2235  *
2236 
2237  */
2238 
2239 
2240 /** Constructor with initial values.
2241  * @param ini_drive_mode initial value for drive_mode
2242  */
2244 {
2245  data_size = sizeof(SetDriveModeMessage_data_t);
2246  data_ptr = malloc(data_size);
2247  memset(data_ptr, 0, data_size);
2248  data = (SetDriveModeMessage_data_t *)data_ptr;
2250  data->drive_mode = ini_drive_mode;
2251  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2252  enum_map_DriveMode[(int)Forward] = "Forward";
2253  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2254  enum_map_DriveMode[(int)Backward] = "Backward";
2255  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2256  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2257  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2258  add_fieldinfo(IFT_ENUM, "drive_mode", 1, &data->drive_mode, "DriveMode", &enum_map_DriveMode);
2259 }
2260 /** Constructor */
2262 {
2263  data_size = sizeof(SetDriveModeMessage_data_t);
2264  data_ptr = malloc(data_size);
2265  memset(data_ptr, 0, data_size);
2266  data = (SetDriveModeMessage_data_t *)data_ptr;
2268  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2269  enum_map_DriveMode[(int)Forward] = "Forward";
2270  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2271  enum_map_DriveMode[(int)Backward] = "Backward";
2272  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2273  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2274  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2275  add_fieldinfo(IFT_ENUM, "drive_mode", 1, &data->drive_mode, "DriveMode", &enum_map_DriveMode);
2276 }
2277 
2278 /** Destructor */
2280 {
2281  free(data_ptr);
2282 }
2283 
2284 /** Copy constructor.
2285  * @param m message to copy from
2286  */
2288 {
2289  data_size = m->data_size;
2290  data_ptr = malloc(data_size);
2291  memcpy(data_ptr, m->data_ptr, data_size);
2292  data = (SetDriveModeMessage_data_t *)data_ptr;
2294 }
2295 
2296 /* Methods */
2297 /** Get drive_mode value.
2298  * Current drive mode
2299  * @return drive_mode value
2300  */
2303 {
2304  return (NavigatorInterface::DriveMode)data->drive_mode;
2305 }
2306 
2307 /** Get maximum length of drive_mode value.
2308  * @return length of drive_mode value, can be length of the array or number of
2309  * maximum number of characters for a string
2310  */
2311 size_t
2313 {
2314  return 1;
2315 }
2316 
2317 /** Set drive_mode value.
2318  * Current drive mode
2319  * @param new_drive_mode new drive_mode value
2320  */
2321 void
2323 {
2324  data->drive_mode = new_drive_mode;
2325 }
2326 
2327 /** Clone this message.
2328  * Produces a message of the same type as this message and copies the
2329  * data to the new message.
2330  * @return clone of this message
2331  */
2332 Message *
2334 {
2335  return new NavigatorInterface::SetDriveModeMessage(this);
2336 }
2337 /** @class NavigatorInterface::SetStopAtTargetMessage <interfaces/NavigatorInterface.h>
2338  * SetStopAtTargetMessage Fawkes BlackBoard Interface Message.
2339  *
2340 
2341  */
2342 
2343 
2344 /** Constructor with initial values.
2345  * @param ini_stop_at_target initial value for stop_at_target
2346  */
2347 NavigatorInterface::SetStopAtTargetMessage::SetStopAtTargetMessage(const bool ini_stop_at_target) : Message("SetStopAtTargetMessage")
2348 {
2349  data_size = sizeof(SetStopAtTargetMessage_data_t);
2350  data_ptr = malloc(data_size);
2351  memset(data_ptr, 0, data_size);
2352  data = (SetStopAtTargetMessage_data_t *)data_ptr;
2354  data->stop_at_target = ini_stop_at_target;
2355  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2356  enum_map_DriveMode[(int)Forward] = "Forward";
2357  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2358  enum_map_DriveMode[(int)Backward] = "Backward";
2359  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2360  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2361  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2362  add_fieldinfo(IFT_BOOL, "stop_at_target", 1, &data->stop_at_target);
2363 }
2364 /** Constructor */
2366 {
2367  data_size = sizeof(SetStopAtTargetMessage_data_t);
2368  data_ptr = malloc(data_size);
2369  memset(data_ptr, 0, data_size);
2370  data = (SetStopAtTargetMessage_data_t *)data_ptr;
2372  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2373  enum_map_DriveMode[(int)Forward] = "Forward";
2374  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2375  enum_map_DriveMode[(int)Backward] = "Backward";
2376  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2377  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2378  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2379  add_fieldinfo(IFT_BOOL, "stop_at_target", 1, &data->stop_at_target);
2380 }
2381 
2382 /** Destructor */
2384 {
2385  free(data_ptr);
2386 }
2387 
2388 /** Copy constructor.
2389  * @param m message to copy from
2390  */
2392 {
2393  data_size = m->data_size;
2394  data_ptr = malloc(data_size);
2395  memcpy(data_ptr, m->data_ptr, data_size);
2396  data = (SetStopAtTargetMessage_data_t *)data_ptr;
2398 }
2399 
2400 /* Methods */
2401 /** Get stop_at_target value.
2402  * Stop when target is reached?
2403  * @return stop_at_target value
2404  */
2405 bool
2407 {
2408  return data->stop_at_target;
2409 }
2410 
2411 /** Get maximum length of stop_at_target value.
2412  * @return length of stop_at_target value, can be length of the array or number of
2413  * maximum number of characters for a string
2414  */
2415 size_t
2417 {
2418  return 1;
2419 }
2420 
2421 /** Set stop_at_target value.
2422  * Stop when target is reached?
2423  * @param new_stop_at_target new stop_at_target value
2424  */
2425 void
2427 {
2428  data->stop_at_target = new_stop_at_target;
2429 }
2430 
2431 /** Clone this message.
2432  * Produces a message of the same type as this message and copies the
2433  * data to the new message.
2434  * @return clone of this message
2435  */
2436 Message *
2438 {
2440 }
2441 /** @class NavigatorInterface::SetOrientationModeMessage <interfaces/NavigatorInterface.h>
2442  * SetOrientationModeMessage Fawkes BlackBoard Interface Message.
2443  *
2444 
2445  */
2446 
2447 
2448 /** Constructor with initial values.
2449  * @param ini_orientation_mode initial value for orientation_mode
2450  */
2452 {
2453  data_size = sizeof(SetOrientationModeMessage_data_t);
2454  data_ptr = malloc(data_size);
2455  memset(data_ptr, 0, data_size);
2456  data = (SetOrientationModeMessage_data_t *)data_ptr;
2458  data->orientation_mode = ini_orientation_mode;
2459  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2460  enum_map_DriveMode[(int)Forward] = "Forward";
2461  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2462  enum_map_DriveMode[(int)Backward] = "Backward";
2463  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2464  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2465  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2466  add_fieldinfo(IFT_ENUM, "orientation_mode", 1, &data->orientation_mode, "OrientationMode", &enum_map_OrientationMode);
2467 }
2468 /** Constructor */
2470 {
2471  data_size = sizeof(SetOrientationModeMessage_data_t);
2472  data_ptr = malloc(data_size);
2473  memset(data_ptr, 0, data_size);
2474  data = (SetOrientationModeMessage_data_t *)data_ptr;
2476  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2477  enum_map_DriveMode[(int)Forward] = "Forward";
2478  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2479  enum_map_DriveMode[(int)Backward] = "Backward";
2480  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2481  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2482  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2483  add_fieldinfo(IFT_ENUM, "orientation_mode", 1, &data->orientation_mode, "OrientationMode", &enum_map_OrientationMode);
2484 }
2485 
2486 /** Destructor */
2488 {
2489  free(data_ptr);
2490 }
2491 
2492 /** Copy constructor.
2493  * @param m message to copy from
2494  */
2496 {
2497  data_size = m->data_size;
2498  data_ptr = malloc(data_size);
2499  memcpy(data_ptr, m->data_ptr, data_size);
2500  data = (SetOrientationModeMessage_data_t *)data_ptr;
2502 }
2503 
2504 /* Methods */
2505 /** Get orientation_mode value.
2506  * Mode how/when to orientate if orientation is given
2507  * @return orientation_mode value
2508  */
2511 {
2512  return (NavigatorInterface::OrientationMode)data->orientation_mode;
2513 }
2514 
2515 /** Get maximum length of orientation_mode value.
2516  * @return length of orientation_mode value, can be length of the array or number of
2517  * maximum number of characters for a string
2518  */
2519 size_t
2521 {
2522  return 1;
2523 }
2524 
2525 /** Set orientation_mode value.
2526  * Mode how/when to orientate if orientation is given
2527  * @param new_orientation_mode new orientation_mode value
2528  */
2529 void
2531 {
2532  data->orientation_mode = new_orientation_mode;
2533 }
2534 
2535 /** Clone this message.
2536  * Produces a message of the same type as this message and copies the
2537  * data to the new message.
2538  * @return clone of this message
2539  */
2540 Message *
2542 {
2544 }
2545 /** @class NavigatorInterface::ResetParametersMessage <interfaces/NavigatorInterface.h>
2546  * ResetParametersMessage Fawkes BlackBoard Interface Message.
2547  *
2548 
2549  */
2550 
2551 
2552 /** Constructor */
2554 {
2555  data_size = sizeof(ResetParametersMessage_data_t);
2556  data_ptr = malloc(data_size);
2557  memset(data_ptr, 0, data_size);
2558  data = (ResetParametersMessage_data_t *)data_ptr;
2560  enum_map_DriveMode[(int)MovingNotAllowed] = "MovingNotAllowed";
2561  enum_map_DriveMode[(int)Forward] = "Forward";
2562  enum_map_DriveMode[(int)AllowBackward] = "AllowBackward";
2563  enum_map_DriveMode[(int)Backward] = "Backward";
2564  enum_map_DriveMode[(int)ESCAPE] = "ESCAPE";
2565  enum_map_OrientationMode[(int)OrientAtTarget] = "OrientAtTarget";
2566  enum_map_OrientationMode[(int)OrientDuringTravel] = "OrientDuringTravel";
2567 }
2568 
2569 /** Destructor */
2571 {
2572  free(data_ptr);
2573 }
2574 
2575 /** Copy constructor.
2576  * @param m message to copy from
2577  */
2579 {
2580  data_size = m->data_size;
2581  data_ptr = malloc(data_size);
2582  memcpy(data_ptr, m->data_ptr, data_size);
2583  data = (ResetParametersMessage_data_t *)data_ptr;
2585 }
2586 
2587 /* Methods */
2588 /** Clone this message.
2589  * Produces a message of the same type as this message and copies the
2590  * data to the new message.
2591  * @return clone of this message
2592  */
2593 Message *
2595 {
2597 }
2598 /** Check if message is valid and can be enqueued.
2599  * @param message Message to check
2600  * @return true if the message is valid, false otherwise.
2601  */
2602 bool
2604 {
2605  const StopMessage *m0 = dynamic_cast<const StopMessage *>(message);
2606  if ( m0 != NULL ) {
2607  return true;
2608  }
2609  const TurnMessage *m1 = dynamic_cast<const TurnMessage *>(message);
2610  if ( m1 != NULL ) {
2611  return true;
2612  }
2613  const CartesianGotoMessage *m2 = dynamic_cast<const CartesianGotoMessage *>(message);
2614  if ( m2 != NULL ) {
2615  return true;
2616  }
2617  const PolarGotoMessage *m3 = dynamic_cast<const PolarGotoMessage *>(message);
2618  if ( m3 != NULL ) {
2619  return true;
2620  }
2621  const PlaceGotoMessage *m4 = dynamic_cast<const PlaceGotoMessage *>(message);
2622  if ( m4 != NULL ) {
2623  return true;
2624  }
2625  const PlaceWithOriGotoMessage *m5 = dynamic_cast<const PlaceWithOriGotoMessage *>(message);
2626  if ( m5 != NULL ) {
2627  return true;
2628  }
2629  const ObstacleMessage *m6 = dynamic_cast<const ObstacleMessage *>(message);
2630  if ( m6 != NULL ) {
2631  return true;
2632  }
2633  const ResetOdometryMessage *m7 = dynamic_cast<const ResetOdometryMessage *>(message);
2634  if ( m7 != NULL ) {
2635  return true;
2636  }
2637  const SetMaxVelocityMessage *m8 = dynamic_cast<const SetMaxVelocityMessage *>(message);
2638  if ( m8 != NULL ) {
2639  return true;
2640  }
2641  const SetMaxRotationMessage *m9 = dynamic_cast<const SetMaxRotationMessage *>(message);
2642  if ( m9 != NULL ) {
2643  return true;
2644  }
2645  const SetEscapingMessage *m10 = dynamic_cast<const SetEscapingMessage *>(message);
2646  if ( m10 != NULL ) {
2647  return true;
2648  }
2649  const SetSecurityDistanceMessage *m11 = dynamic_cast<const SetSecurityDistanceMessage *>(message);
2650  if ( m11 != NULL ) {
2651  return true;
2652  }
2653  const SetDriveModeMessage *m12 = dynamic_cast<const SetDriveModeMessage *>(message);
2654  if ( m12 != NULL ) {
2655  return true;
2656  }
2657  const SetStopAtTargetMessage *m13 = dynamic_cast<const SetStopAtTargetMessage *>(message);
2658  if ( m13 != NULL ) {
2659  return true;
2660  }
2661  const SetOrientationModeMessage *m14 = dynamic_cast<const SetOrientationModeMessage *>(message);
2662  if ( m14 != NULL ) {
2663  return true;
2664  }
2665  const ResetParametersMessage *m15 = dynamic_cast<const ResetParametersMessage *>(message);
2666  if ( m15 != NULL ) {
2667  return true;
2668  }
2669  return false;
2670 }
2671 
2672 /// @cond INTERNALS
2673 EXPORT_INTERFACE(NavigatorInterface)
2674 /// @endcond
2675 
2676 
2677 } // end namespace fawkes
bool is_auto_drive_mode() const
Get auto_drive_mode value.
size_t maxlenof_max_rotation() const
Get maximum length of max_rotation value.
size_t maxlenof_phi() const
Get maximum length of phi value.
float max_velocity() const
Get max_velocity value.
size_t maxlenof_drive_mode() const
Get maximum length of drive_mode value.
size_t maxlenof_y() const
Get maximum length of y value.
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:124
void set_stop_at_target(const bool new_stop_at_target)
Set stop_at_target value.
static const uint32_t ERROR_PATH_GEN_FAIL
ERROR_PATH_GEN_FAIL constant.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
void set_dist(const float new_dist)
Set dist value.
void set_angle(const float new_angle)
Set angle value.
void set_escaping_enabled(const bool new_escaping_enabled)
Set escaping_enabled value.
size_t maxlenof_dist() const
Get maximum length of dist value.
virtual Message * clone() const
Clone this message.
float orientation() const
Get orientation value.
float velocity() const
Get velocity value.
virtual Message * clone() const
Clone this message.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
void set_hash(unsigned char *ihash)
Set hash.
Definition: interface.cpp:314
size_t maxlenof_orientation_mode() const
Get maximum length of orientation_mode value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_max_velocity(const float new_max_velocity)
Set max_velocity value.
Fawkes library namespace.
void set_place(const char *new_place)
Set place value.
virtual Message * clone() const
Clone this message.
ObstacleMessage Fawkes BlackBoard Interface Message.
void set_final(const bool new_final)
Set final value.
bool is_stop_at_target() const
Get stop_at_target value.
Timestamp data, must be present and first entries for each interface data structs! This leans on time...
Definition: message.h:129
size_t maxlenof_max_rotation() const
Get maximum length of max_rotation value.
virtual Message * clone() const
Clone this message.
virtual Message * clone() const
Clone this message.
void set_orientation_mode(const OrientationMode new_orientation_mode)
Set orientation_mode value.
OrientationMode
Orientation mode enum.
static const uint32_t ERROR_MOTOR
ERROR_MOTOR constant.
SetSecurityDistanceMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
bool is_escaping_enabled() const
Get escaping_enabled value.
virtual Message * clone() const
Clone this message.
void set_place(const char *new_place)
Set place value.
static const uint32_t FLAG_CART_GOTO
FLAG_CART_GOTO constant.
float max_rotation() const
Get max_rotation value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_escaping_enabled(const bool new_escaping_enabled)
Set escaping_enabled value.
string field
Definition: types.h:47
virtual Message * create_message(const char *type) const
Create message based on type name.
PolarGotoMessage Fawkes BlackBoard Interface Message.
float max_velocity() const
Get max_velocity value.
size_t maxlenof_auto_drive_mode() const
Get maximum length of auto_drive_mode value.
static const uint32_t ERROR_UNKNOWN_PLACE
ERROR_UNKNOWN_PLACE constant.
uint32_t error_code() const
Get error_code value.
virtual Message * clone() const
Clone this message.
void set_orientation(const float new_orientation)
Set orientation value.
virtual Message * clone() const
Clone this message.
SetOrientationModeMessage Fawkes BlackBoard Interface Message.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:79
size_t maxlenof_dest_dist() const
Get maximum length of dest_dist value.
bool is_stop_at_target() const
Get stop_at_target value.
float dest_ori() const
Get dest_ori value.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
void set_phi(const float new_phi)
Set phi value.
const char * tostring_DriveMode(DriveMode value) const
Convert DriveMode constant to string.
float orientation() const
Get orientation value.
size_t maxlenof_velocity() const
Get maximum length of velocity value.
static const uint32_t FLAG_POLAR_GOTO
FLAG_POLAR_GOTO constant.
size_t maxlenof_x() const
Get maximum length of x value.
void set_security_distance(const float new_security_distance)
Set security_distance value.
message_data_ts_t * data_ts
data timestamp aliasing pointer
Definition: message.h:133
unsigned int data_size
Size of memory needed to hold all data.
Definition: message.h:125
SetStopAtTargetMessage Fawkes BlackBoard Interface Message.
SetEscapingMessage Fawkes BlackBoard Interface Message.
OrientationMode orientation_mode() const
Get orientation_mode value.
virtual Message * clone() const
Clone this message.
Orient when at target, if orientation is given.
size_t maxlenof_stop_at_target() const
Get maximum length of stop_at_target value.
size_t maxlenof_orientation_mode() const
Get maximum length of orientation_mode value.
void add_messageinfo(const char *name)
Add an entry to the message info list.
Definition: interface.cpp:373
void set_orientation(const float new_orientation)
Set orientation value.
float dest_y() const
Get dest_y value.
size_t maxlenof_security_distance() const
Get maximum length of security_distance value.
SetDriveModeMessage Fawkes BlackBoard Interface Message.
bool data_changed
Indicator if data has changed.
Definition: interface.h:222
DriveMode drive_mode() const
Get drive_mode value.
PlaceGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_final() const
Get maximum length of final value.
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.
size_t maxlenof_stop_at_target() const
Get maximum length of stop_at_target value.
bool is_final() const
Get final value.
SetMaxRotationMessage Fawkes BlackBoard Interface Message.
CartesianGotoMessage Fawkes BlackBoard Interface Message.
void set_flags(const uint32_t new_flags)
Set flags value.
size_t maxlenof_dest_ori() const
Get maximum length of dest_ori value.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
DriveMode drive_mode() const
Get drive_mode value.
void set_auto_drive_mode(const bool new_auto_drive_mode)
Set auto_drive_mode value.
uint32_t flags() const
Get flags value.
size_t maxlenof_error_code() const
Get maximum length of error_code value.
size_t maxlenof_x() const
Get maximum length of x value.
Moving allow backward constant.
size_t maxlenof_escaping_enabled() const
Get maximum length of escaping_enabled value.
size_t maxlenof_dest_y() const
Get maximum length of dest_y value.
float angle() const
Get angle value.
size_t maxlenof_orientation() const
Get maximum length of orientation value.
void set_y(const float new_y)
Set y value.
void set_drive_mode(const DriveMode new_drive_mode)
Set drive_mode value.
void set_max_velocity(const float new_max_velocity)
Set max_velocity value.
size_t maxlenof_dest_x() const
Get maximum length of dest_x value.
void set_width(const float new_width)
Set width value.
float security_distance() const
Get security_distance value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
size_t maxlenof_x() const
Get maximum length of x value.
void set_error_code(const uint32_t new_error_code)
Set error_code value.
float field
Definition: types.h:45
virtual Message * clone() const
Clone this message.
float security_distance() const
Get security_distance value.
static const uint32_t FLAG_ESCAPING
FLAG_ESCAPING constant.
static const uint32_t ERROR_OBSTRUCTION
ERROR_OBSTRUCTION constant.
virtual Message * clone() const
Clone this message.
void set_dest_ori(const float new_dest_ori)
Set dest_ori value.
void set_y(const float new_y)
Set y value.
void set_stop_at_target(const bool new_stop_at_target)
Set stop_at_target value.
size_t maxlenof_max_velocity() const
Get maximum length of max_velocity value.
TurnMessage Fawkes BlackBoard Interface Message.
void set_velocity(const float new_velocity)
Set velocity value.
float x() const
Get x value.
static const uint32_t FLAG_SECURITY_DISTANCE
FLAG_SECURITY_DISTANCE constant.
void set_security_distance(const float new_security_distance)
Set security_distance value.
void set_dest_dist(const float new_dest_dist)
Set dest_dist value.
void set_orientation(const float new_orientation)
Set orientation value.
void set_max_rotation(const float new_max_rotation)
Set max_rotation value.
void set_max_rotation(const float new_max_rotation)
Set max_rotation value.
void set_dest_x(const float new_dest_x)
Set dest_x value.
size_t maxlenof_y() const
Get maximum length of y value.
const char * tostring_OrientationMode(OrientationMode value) const
Convert OrientationMode constant to string.
Indicating that the robot is at target and has to orient.
Definition: types.h:38
virtual Message * clone() const
Clone this message.
float dest_x() const
Get dest_x value.
size_t maxlenof_escaping_enabled() const
Get maximum length of escaping_enabled value.
PlaceWithOriGotoMessage Fawkes BlackBoard Interface Message.
OrientationMode orientation_mode() const
Get orientation_mode value.
void set_orientation_mode(const OrientationMode new_orientation_mode)
Set orientation_mode value.
static const uint32_t ERROR_NONE
ERROR_NONE constant.
virtual Message * clone() const
Clone this message.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
size_t maxlenof_place() const
Get maximum length of place value.
float dest_dist() const
Get dest_dist value.
ResetParametersMessage Fawkes BlackBoard Interface Message.
static const uint32_t FLAG_UPDATES_DEST_DIST
FLAG_UPDATES_DEST_DIST constant.
bool is_escaping_enabled() const
Get escaping_enabled value.
Orient during travel BUT NOT at target, if omnidirectional platform and orientation is given...
float y() const
Get y 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
void set_x(const float new_x)
Set x value.
void set_dest_y(const float new_dest_y)
Set dest_y value.
boolean field
Definition: types.h:36
static const uint32_t FLAG_NONE
FLAG_NONE constant.
size_t maxlenof_y() const
Get maximum length of y value.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
size_t maxlenof_security_distance() const
Get maximum length of security_distance value.
uint32_t msgid() const
Get msgid value.
const char * type() const
Get message type.
Definition: message.cpp:378
size_t maxlenof_width() const
Get maximum length of width value.
void set_x(const float new_x)
Set x value.
size_t maxlenof_flags() const
Get maximum length of flags value.
32 bit unsigned integer field
Definition: types.h:42
field with interface specific enum type
Definition: types.h:49
void set_drive_mode(const DriveMode new_drive_mode)
Set drive_mode value.
size_t maxlenof_drive_mode() const
Get maximum length of drive_mode value.
SetMaxVelocityMessage Fawkes BlackBoard Interface Message.
ResetOdometryMessage Fawkes BlackBoard Interface Message.
static const uint32_t FLAG_PLACE_GOTO
FLAG_PLACE_GOTO constant.
size_t maxlenof_place() const
Get maximum length of place value.
StopMessage Fawkes BlackBoard Interface Message.
NavigatorInterface Fawkes BlackBoard Interface.
float max_rotation() const
Get max_rotation value.
size_t maxlenof_angle() const
Get maximum length of angle value.