Fawkes API  Fawkes Development Version
PanTiltInterface.cpp
1 
2 /***************************************************************************
3  * PanTiltInterface.cpp - Fawkes BlackBoard Interface - PanTiltInterface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2009 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/PanTiltInterface.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 PanTiltInterface <interfaces/PanTiltInterface.h>
36  * PanTiltInterface Fawkes BlackBoard Interface.
37  *
38  Interface to access pan/tilt units.
39 
40  * @ingroup FawkesInterfaces
41  */
42 
43 
44 /** FLAG_SUPPORTS_PAN constant */
45 const uint32_t PanTiltInterface::FLAG_SUPPORTS_PAN = 1u;
46 /** FLAG_SUPPORTS_TILT constant */
47 const uint32_t PanTiltInterface::FLAG_SUPPORTS_TILT = 2u;
48 /** ERROR_NONE constant */
49 const uint32_t PanTiltInterface::ERROR_NONE = 0u;
50 /** ERROR_UNSPECIFIC constant */
51 const uint32_t PanTiltInterface::ERROR_UNSPECIFIC = 1u;
52 /** ERROR_COMMUNICATION constant */
53 const uint32_t PanTiltInterface::ERROR_COMMUNICATION = 2u;
54 /** ERROR_PAN_OUTOFRANGE constant */
55 const uint32_t PanTiltInterface::ERROR_PAN_OUTOFRANGE = 4u;
56 /** ERROR_TILT_OUTOFRANGE constant */
57 const uint32_t PanTiltInterface::ERROR_TILT_OUTOFRANGE = 8u;
58 
59 /** Constructor */
60 PanTiltInterface::PanTiltInterface() : Interface()
61 {
62  data_size = sizeof(PanTiltInterface_data_t);
63  data_ptr = malloc(data_size);
64  data = (PanTiltInterface_data_t *)data_ptr;
65  data_ts = (interface_data_ts_t *)data_ptr;
66  memset(data_ptr, 0, data_size);
67  add_fieldinfo(IFT_UINT32, "flags", 1, &data->flags);
68  add_fieldinfo(IFT_FLOAT, "pan", 1, &data->pan);
69  add_fieldinfo(IFT_FLOAT, "tilt", 1, &data->tilt);
70  add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
71  add_fieldinfo(IFT_BOOL, "final", 1, &data->final);
72  add_fieldinfo(IFT_UINT32, "error_code", 1, &data->error_code);
73  add_fieldinfo(IFT_BOOL, "enabled", 1, &data->enabled);
74  add_fieldinfo(IFT_BOOL, "calibrated", 1, &data->calibrated);
75  add_fieldinfo(IFT_FLOAT, "min_pan", 1, &data->min_pan);
76  add_fieldinfo(IFT_FLOAT, "max_pan", 1, &data->max_pan);
77  add_fieldinfo(IFT_FLOAT, "min_tilt", 1, &data->min_tilt);
78  add_fieldinfo(IFT_FLOAT, "max_tilt", 1, &data->max_tilt);
79  add_fieldinfo(IFT_FLOAT, "max_pan_velocity", 1, &data->max_pan_velocity);
80  add_fieldinfo(IFT_FLOAT, "max_tilt_velocity", 1, &data->max_tilt_velocity);
81  add_fieldinfo(IFT_FLOAT, "pan_velocity", 1, &data->pan_velocity);
82  add_fieldinfo(IFT_FLOAT, "tilt_velocity", 1, &data->tilt_velocity);
83  add_fieldinfo(IFT_FLOAT, "pan_margin", 1, &data->pan_margin);
84  add_fieldinfo(IFT_FLOAT, "tilt_margin", 1, &data->tilt_margin);
85  add_messageinfo("StopMessage");
86  add_messageinfo("FlushMessage");
87  add_messageinfo("CalibrateMessage");
88  add_messageinfo("ParkMessage");
89  add_messageinfo("GotoMessage");
90  add_messageinfo("TimedGotoMessage");
91  add_messageinfo("SetEnabledMessage");
92  add_messageinfo("SetVelocityMessage");
93  add_messageinfo("SetMarginMessage");
94  unsigned char tmp_hash[] = {0x3, 0xd7, 0x3b, 0xa8, 0x9f, 0x6d, 00, 0xb9, 0xf5, 0xf2, 0x2f, 0x92, 0x25, 0x1b, 0x87, 0x8e};
95  set_hash(tmp_hash);
96 }
97 
98 /** Destructor */
99 PanTiltInterface::~PanTiltInterface()
100 {
101  free(data_ptr);
102 }
103 /* Methods */
104 /** Get flags value.
105  * Flags.
106  * @return flags value
107  */
108 uint32_t
109 PanTiltInterface::flags() const
110 {
111  return data->flags;
112 }
113 
114 /** Get maximum length of flags value.
115  * @return length of flags value, can be length of the array or number of
116  * maximum number of characters for a string
117  */
118 size_t
119 PanTiltInterface::maxlenof_flags() const
120 {
121  return 1;
122 }
123 
124 /** Set flags value.
125  * Flags.
126  * @param new_flags new flags value
127  */
128 void
129 PanTiltInterface::set_flags(const uint32_t new_flags)
130 {
131  data->flags = new_flags;
132  data_changed = true;
133 }
134 
135 /** Get pan value.
136  * Current pan.
137  * @return pan value
138  */
139 float
140 PanTiltInterface::pan() const
141 {
142  return data->pan;
143 }
144 
145 /** Get maximum length of pan value.
146  * @return length of pan value, can be length of the array or number of
147  * maximum number of characters for a string
148  */
149 size_t
150 PanTiltInterface::maxlenof_pan() const
151 {
152  return 1;
153 }
154 
155 /** Set pan value.
156  * Current pan.
157  * @param new_pan new pan value
158  */
159 void
160 PanTiltInterface::set_pan(const float new_pan)
161 {
162  data->pan = new_pan;
163  data_changed = true;
164 }
165 
166 /** Get tilt value.
167  * Current tilt.
168  * @return tilt value
169  */
170 float
171 PanTiltInterface::tilt() const
172 {
173  return data->tilt;
174 }
175 
176 /** Get maximum length of tilt value.
177  * @return length of tilt value, can be length of the array or number of
178  * maximum number of characters for a string
179  */
180 size_t
181 PanTiltInterface::maxlenof_tilt() const
182 {
183  return 1;
184 }
185 
186 /** Set tilt value.
187  * Current tilt.
188  * @param new_tilt new tilt value
189  */
190 void
191 PanTiltInterface::set_tilt(const float new_tilt)
192 {
193  data->tilt = new_tilt;
194  data_changed = true;
195 }
196 
197 /** Get msgid value.
198  * The ID of the message that is currently being
199  processed, or 0 if no message is being processed.
200  * @return msgid value
201  */
202 uint32_t
203 PanTiltInterface::msgid() const
204 {
205  return data->msgid;
206 }
207 
208 /** Get maximum length of msgid value.
209  * @return length of msgid value, can be length of the array or number of
210  * maximum number of characters for a string
211  */
212 size_t
213 PanTiltInterface::maxlenof_msgid() const
214 {
215  return 1;
216 }
217 
218 /** Set msgid value.
219  * The ID of the message that is currently being
220  processed, or 0 if no message is being processed.
221  * @param new_msgid new msgid value
222  */
223 void
224 PanTiltInterface::set_msgid(const uint32_t new_msgid)
225 {
226  data->msgid = new_msgid;
227  data_changed = true;
228 }
229 
230 /** Get final value.
231  * True, if the last goto command has been finished,
232  false if it is still running
233  * @return final value
234  */
235 bool
236 PanTiltInterface::is_final() const
237 {
238  return data->final;
239 }
240 
241 /** Get maximum length of final value.
242  * @return length of final value, can be length of the array or number of
243  * maximum number of characters for a string
244  */
245 size_t
246 PanTiltInterface::maxlenof_final() const
247 {
248  return 1;
249 }
250 
251 /** Set final value.
252  * True, if the last goto command has been finished,
253  false if it is still running
254  * @param new_final new final value
255  */
256 void
257 PanTiltInterface::set_final(const bool new_final)
258 {
259  data->final = new_final;
260  data_changed = true;
261 }
262 
263 /** Get error_code value.
264  * Failure code set if
265  final is true. 0 if no error occured, an error code from ERROR_*
266  constants otherwise (or a bit-wise combination).
267  * @return error_code value
268  */
269 uint32_t
270 PanTiltInterface::error_code() const
271 {
272  return data->error_code;
273 }
274 
275 /** Get maximum length of error_code value.
276  * @return length of error_code value, can be length of the array or number of
277  * maximum number of characters for a string
278  */
279 size_t
280 PanTiltInterface::maxlenof_error_code() const
281 {
282  return 1;
283 }
284 
285 /** Set error_code value.
286  * Failure code set if
287  final is true. 0 if no error occured, an error code from ERROR_*
288  constants otherwise (or a bit-wise combination).
289  * @param new_error_code new error_code value
290  */
291 void
292 PanTiltInterface::set_error_code(const uint32_t new_error_code)
293 {
294  data->error_code = new_error_code;
295  data_changed = true;
296 }
297 
298 /** Get enabled value.
299  * Is the pan/tilt unit enabled?
300  * @return enabled value
301  */
302 bool
303 PanTiltInterface::is_enabled() const
304 {
305  return data->enabled;
306 }
307 
308 /** Get maximum length of enabled value.
309  * @return length of enabled value, can be length of the array or number of
310  * maximum number of characters for a string
311  */
312 size_t
313 PanTiltInterface::maxlenof_enabled() const
314 {
315  return 1;
316 }
317 
318 /** Set enabled value.
319  * Is the pan/tilt unit enabled?
320  * @param new_enabled new enabled value
321  */
322 void
323 PanTiltInterface::set_enabled(const bool new_enabled)
324 {
325  data->enabled = new_enabled;
326  data_changed = true;
327 }
328 
329 /** Get calibrated value.
330  * Is the pan/tilt unit calibrated?
331  * @return calibrated value
332  */
333 bool
334 PanTiltInterface::is_calibrated() const
335 {
336  return data->calibrated;
337 }
338 
339 /** Get maximum length of calibrated value.
340  * @return length of calibrated value, can be length of the array or number of
341  * maximum number of characters for a string
342  */
343 size_t
344 PanTiltInterface::maxlenof_calibrated() const
345 {
346  return 1;
347 }
348 
349 /** Set calibrated value.
350  * Is the pan/tilt unit calibrated?
351  * @param new_calibrated new calibrated value
352  */
353 void
354 PanTiltInterface::set_calibrated(const bool new_calibrated)
355 {
356  data->calibrated = new_calibrated;
357  data_changed = true;
358 }
359 
360 /** Get min_pan value.
361  * Minimum pan possible.
362  * @return min_pan value
363  */
364 float
365 PanTiltInterface::min_pan() const
366 {
367  return data->min_pan;
368 }
369 
370 /** Get maximum length of min_pan value.
371  * @return length of min_pan value, can be length of the array or number of
372  * maximum number of characters for a string
373  */
374 size_t
375 PanTiltInterface::maxlenof_min_pan() const
376 {
377  return 1;
378 }
379 
380 /** Set min_pan value.
381  * Minimum pan possible.
382  * @param new_min_pan new min_pan value
383  */
384 void
385 PanTiltInterface::set_min_pan(const float new_min_pan)
386 {
387  data->min_pan = new_min_pan;
388  data_changed = true;
389 }
390 
391 /** Get max_pan value.
392  * Maximum pan possible.
393  * @return max_pan value
394  */
395 float
396 PanTiltInterface::max_pan() const
397 {
398  return data->max_pan;
399 }
400 
401 /** Get maximum length of max_pan value.
402  * @return length of max_pan value, can be length of the array or number of
403  * maximum number of characters for a string
404  */
405 size_t
406 PanTiltInterface::maxlenof_max_pan() const
407 {
408  return 1;
409 }
410 
411 /** Set max_pan value.
412  * Maximum pan possible.
413  * @param new_max_pan new max_pan value
414  */
415 void
416 PanTiltInterface::set_max_pan(const float new_max_pan)
417 {
418  data->max_pan = new_max_pan;
419  data_changed = true;
420 }
421 
422 /** Get min_tilt value.
423  * Minimum tilt possible.
424  * @return min_tilt value
425  */
426 float
427 PanTiltInterface::min_tilt() const
428 {
429  return data->min_tilt;
430 }
431 
432 /** Get maximum length of min_tilt value.
433  * @return length of min_tilt value, can be length of the array or number of
434  * maximum number of characters for a string
435  */
436 size_t
437 PanTiltInterface::maxlenof_min_tilt() const
438 {
439  return 1;
440 }
441 
442 /** Set min_tilt value.
443  * Minimum tilt possible.
444  * @param new_min_tilt new min_tilt value
445  */
446 void
447 PanTiltInterface::set_min_tilt(const float new_min_tilt)
448 {
449  data->min_tilt = new_min_tilt;
450  data_changed = true;
451 }
452 
453 /** Get max_tilt value.
454  * Maximum tilt possible.
455  * @return max_tilt value
456  */
457 float
458 PanTiltInterface::max_tilt() const
459 {
460  return data->max_tilt;
461 }
462 
463 /** Get maximum length of max_tilt value.
464  * @return length of max_tilt value, can be length of the array or number of
465  * maximum number of characters for a string
466  */
467 size_t
468 PanTiltInterface::maxlenof_max_tilt() const
469 {
470  return 1;
471 }
472 
473 /** Set max_tilt value.
474  * Maximum tilt possible.
475  * @param new_max_tilt new max_tilt value
476  */
477 void
478 PanTiltInterface::set_max_tilt(const float new_max_tilt)
479 {
480  data->max_tilt = new_max_tilt;
481  data_changed = true;
482 }
483 
484 /** Get max_pan_velocity value.
485  * Maximum supported pan velocity.
486  * @return max_pan_velocity value
487  */
488 float
489 PanTiltInterface::max_pan_velocity() const
490 {
491  return data->max_pan_velocity;
492 }
493 
494 /** Get maximum length of max_pan_velocity value.
495  * @return length of max_pan_velocity value, can be length of the array or number of
496  * maximum number of characters for a string
497  */
498 size_t
499 PanTiltInterface::maxlenof_max_pan_velocity() const
500 {
501  return 1;
502 }
503 
504 /** Set max_pan_velocity value.
505  * Maximum supported pan velocity.
506  * @param new_max_pan_velocity new max_pan_velocity value
507  */
508 void
509 PanTiltInterface::set_max_pan_velocity(const float new_max_pan_velocity)
510 {
511  data->max_pan_velocity = new_max_pan_velocity;
512  data_changed = true;
513 }
514 
515 /** Get max_tilt_velocity value.
516  * Maximum supported tilt velocity.
517  * @return max_tilt_velocity value
518  */
519 float
520 PanTiltInterface::max_tilt_velocity() const
521 {
522  return data->max_tilt_velocity;
523 }
524 
525 /** Get maximum length of max_tilt_velocity value.
526  * @return length of max_tilt_velocity value, can be length of the array or number of
527  * maximum number of characters for a string
528  */
529 size_t
530 PanTiltInterface::maxlenof_max_tilt_velocity() const
531 {
532  return 1;
533 }
534 
535 /** Set max_tilt_velocity value.
536  * Maximum supported tilt velocity.
537  * @param new_max_tilt_velocity new max_tilt_velocity value
538  */
539 void
540 PanTiltInterface::set_max_tilt_velocity(const float new_max_tilt_velocity)
541 {
542  data->max_tilt_velocity = new_max_tilt_velocity;
543  data_changed = true;
544 }
545 
546 /** Get pan_velocity value.
547  * Maximum pan velocity currently reached.
548  * @return pan_velocity value
549  */
550 float
551 PanTiltInterface::pan_velocity() const
552 {
553  return data->pan_velocity;
554 }
555 
556 /** Get maximum length of pan_velocity value.
557  * @return length of pan_velocity value, can be length of the array or number of
558  * maximum number of characters for a string
559  */
560 size_t
561 PanTiltInterface::maxlenof_pan_velocity() const
562 {
563  return 1;
564 }
565 
566 /** Set pan_velocity value.
567  * Maximum pan velocity currently reached.
568  * @param new_pan_velocity new pan_velocity value
569  */
570 void
571 PanTiltInterface::set_pan_velocity(const float new_pan_velocity)
572 {
573  data->pan_velocity = new_pan_velocity;
574  data_changed = true;
575 }
576 
577 /** Get tilt_velocity value.
578  * Maximum tilt velocity currently reached.
579  * @return tilt_velocity value
580  */
581 float
582 PanTiltInterface::tilt_velocity() const
583 {
584  return data->tilt_velocity;
585 }
586 
587 /** Get maximum length of tilt_velocity value.
588  * @return length of tilt_velocity value, can be length of the array or number of
589  * maximum number of characters for a string
590  */
591 size_t
592 PanTiltInterface::maxlenof_tilt_velocity() const
593 {
594  return 1;
595 }
596 
597 /** Set tilt_velocity value.
598  * Maximum tilt velocity currently reached.
599  * @param new_tilt_velocity new tilt_velocity value
600  */
601 void
602 PanTiltInterface::set_tilt_velocity(const float new_tilt_velocity)
603 {
604  data->tilt_velocity = new_tilt_velocity;
605  data_changed = true;
606 }
607 
608 /** Get pan_margin value.
609  * Margin in radians around a
610  target pan value to consider the motion as final.
611  * @return pan_margin value
612  */
613 float
614 PanTiltInterface::pan_margin() const
615 {
616  return data->pan_margin;
617 }
618 
619 /** Get maximum length of pan_margin value.
620  * @return length of pan_margin value, can be length of the array or number of
621  * maximum number of characters for a string
622  */
623 size_t
624 PanTiltInterface::maxlenof_pan_margin() const
625 {
626  return 1;
627 }
628 
629 /** Set pan_margin value.
630  * Margin in radians around a
631  target pan value to consider the motion as final.
632  * @param new_pan_margin new pan_margin value
633  */
634 void
635 PanTiltInterface::set_pan_margin(const float new_pan_margin)
636 {
637  data->pan_margin = new_pan_margin;
638  data_changed = true;
639 }
640 
641 /** Get tilt_margin value.
642  * Margin in radians around a
643  target tilt value to consider the motion as final.
644  * @return tilt_margin value
645  */
646 float
647 PanTiltInterface::tilt_margin() const
648 {
649  return data->tilt_margin;
650 }
651 
652 /** Get maximum length of tilt_margin value.
653  * @return length of tilt_margin value, can be length of the array or number of
654  * maximum number of characters for a string
655  */
656 size_t
657 PanTiltInterface::maxlenof_tilt_margin() const
658 {
659  return 1;
660 }
661 
662 /** Set tilt_margin value.
663  * Margin in radians around a
664  target tilt value to consider the motion as final.
665  * @param new_tilt_margin new tilt_margin value
666  */
667 void
668 PanTiltInterface::set_tilt_margin(const float new_tilt_margin)
669 {
670  data->tilt_margin = new_tilt_margin;
671  data_changed = true;
672 }
673 
674 /* =========== message create =========== */
675 Message *
676 PanTiltInterface::create_message(const char *type) const
677 {
678  if ( strncmp("StopMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
679  return new StopMessage();
680  } else if ( strncmp("FlushMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
681  return new FlushMessage();
682  } else if ( strncmp("CalibrateMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
683  return new CalibrateMessage();
684  } else if ( strncmp("ParkMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
685  return new ParkMessage();
686  } else if ( strncmp("GotoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
687  return new GotoMessage();
688  } else if ( strncmp("TimedGotoMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
689  return new TimedGotoMessage();
690  } else if ( strncmp("SetEnabledMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
691  return new SetEnabledMessage();
692  } else if ( strncmp("SetVelocityMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
693  return new SetVelocityMessage();
694  } else if ( strncmp("SetMarginMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
695  return new SetMarginMessage();
696  } else {
697  throw UnknownTypeException("The given type '%s' does not match any known "
698  "message type for this interface type.", type);
699  }
700 }
701 
702 
703 /** Copy values from other interface.
704  * @param other other interface to copy values from
705  */
706 void
707 PanTiltInterface::copy_values(const Interface *other)
708 {
709  const PanTiltInterface *oi = dynamic_cast<const PanTiltInterface *>(other);
710  if (oi == NULL) {
711  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
712  type(), other->type());
713  }
714  memcpy(data, oi->data, sizeof(PanTiltInterface_data_t));
715 }
716 
717 const char *
718 PanTiltInterface::enum_tostring(const char *enumtype, int val) const
719 {
720  throw UnknownTypeException("Unknown enum type %s", enumtype);
721 }
722 
723 /* =========== messages =========== */
724 /** @class PanTiltInterface::StopMessage <interfaces/PanTiltInterface.h>
725  * StopMessage Fawkes BlackBoard Interface Message.
726  *
727 
728  */
729 
730 
731 /** Constructor */
732 PanTiltInterface::StopMessage::StopMessage() : Message("StopMessage")
733 {
734  data_size = sizeof(StopMessage_data_t);
735  data_ptr = malloc(data_size);
736  memset(data_ptr, 0, data_size);
737  data = (StopMessage_data_t *)data_ptr;
739 }
740 
741 /** Destructor */
743 {
744  free(data_ptr);
745 }
746 
747 /** Copy constructor.
748  * @param m message to copy from
749  */
751 {
752  data_size = m->data_size;
753  data_ptr = malloc(data_size);
754  memcpy(data_ptr, m->data_ptr, data_size);
755  data = (StopMessage_data_t *)data_ptr;
757 }
758 
759 /* Methods */
760 /** Clone this message.
761  * Produces a message of the same type as this message and copies the
762  * data to the new message.
763  * @return clone of this message
764  */
765 Message *
767 {
768  return new PanTiltInterface::StopMessage(this);
769 }
770 /** @class PanTiltInterface::FlushMessage <interfaces/PanTiltInterface.h>
771  * FlushMessage Fawkes BlackBoard Interface Message.
772  *
773 
774  */
775 
776 
777 /** Constructor */
779 {
780  data_size = sizeof(FlushMessage_data_t);
781  data_ptr = malloc(data_size);
782  memset(data_ptr, 0, data_size);
783  data = (FlushMessage_data_t *)data_ptr;
785 }
786 
787 /** Destructor */
789 {
790  free(data_ptr);
791 }
792 
793 /** Copy constructor.
794  * @param m message to copy from
795  */
797 {
798  data_size = m->data_size;
799  data_ptr = malloc(data_size);
800  memcpy(data_ptr, m->data_ptr, data_size);
801  data = (FlushMessage_data_t *)data_ptr;
803 }
804 
805 /* Methods */
806 /** Clone this message.
807  * Produces a message of the same type as this message and copies the
808  * data to the new message.
809  * @return clone of this message
810  */
811 Message *
813 {
814  return new PanTiltInterface::FlushMessage(this);
815 }
816 /** @class PanTiltInterface::CalibrateMessage <interfaces/PanTiltInterface.h>
817  * CalibrateMessage Fawkes BlackBoard Interface Message.
818  *
819 
820  */
821 
822 
823 /** Constructor */
825 {
826  data_size = sizeof(CalibrateMessage_data_t);
827  data_ptr = malloc(data_size);
828  memset(data_ptr, 0, data_size);
829  data = (CalibrateMessage_data_t *)data_ptr;
831 }
832 
833 /** Destructor */
835 {
836  free(data_ptr);
837 }
838 
839 /** Copy constructor.
840  * @param m message to copy from
841  */
843 {
844  data_size = m->data_size;
845  data_ptr = malloc(data_size);
846  memcpy(data_ptr, m->data_ptr, data_size);
847  data = (CalibrateMessage_data_t *)data_ptr;
849 }
850 
851 /* Methods */
852 /** Clone this message.
853  * Produces a message of the same type as this message and copies the
854  * data to the new message.
855  * @return clone of this message
856  */
857 Message *
859 {
860  return new PanTiltInterface::CalibrateMessage(this);
861 }
862 /** @class PanTiltInterface::ParkMessage <interfaces/PanTiltInterface.h>
863  * ParkMessage Fawkes BlackBoard Interface Message.
864  *
865 
866  */
867 
868 
869 /** Constructor */
871 {
872  data_size = sizeof(ParkMessage_data_t);
873  data_ptr = malloc(data_size);
874  memset(data_ptr, 0, data_size);
875  data = (ParkMessage_data_t *)data_ptr;
877 }
878 
879 /** Destructor */
881 {
882  free(data_ptr);
883 }
884 
885 /** Copy constructor.
886  * @param m message to copy from
887  */
889 {
890  data_size = m->data_size;
891  data_ptr = malloc(data_size);
892  memcpy(data_ptr, m->data_ptr, data_size);
893  data = (ParkMessage_data_t *)data_ptr;
895 }
896 
897 /* Methods */
898 /** Clone this message.
899  * Produces a message of the same type as this message and copies the
900  * data to the new message.
901  * @return clone of this message
902  */
903 Message *
905 {
906  return new PanTiltInterface::ParkMessage(this);
907 }
908 /** @class PanTiltInterface::GotoMessage <interfaces/PanTiltInterface.h>
909  * GotoMessage Fawkes BlackBoard Interface Message.
910  *
911 
912  */
913 
914 
915 /** Constructor with initial values.
916  * @param ini_pan initial value for pan
917  * @param ini_tilt initial value for tilt
918  */
919 PanTiltInterface::GotoMessage::GotoMessage(const float ini_pan, const float ini_tilt) : Message("GotoMessage")
920 {
921  data_size = sizeof(GotoMessage_data_t);
922  data_ptr = malloc(data_size);
923  memset(data_ptr, 0, data_size);
924  data = (GotoMessage_data_t *)data_ptr;
926  data->pan = ini_pan;
927  data->tilt = ini_tilt;
928  add_fieldinfo(IFT_FLOAT, "pan", 1, &data->pan);
929  add_fieldinfo(IFT_FLOAT, "tilt", 1, &data->tilt);
930 }
931 /** Constructor */
933 {
934  data_size = sizeof(GotoMessage_data_t);
935  data_ptr = malloc(data_size);
936  memset(data_ptr, 0, data_size);
937  data = (GotoMessage_data_t *)data_ptr;
939  add_fieldinfo(IFT_FLOAT, "pan", 1, &data->pan);
940  add_fieldinfo(IFT_FLOAT, "tilt", 1, &data->tilt);
941 }
942 
943 /** Destructor */
945 {
946  free(data_ptr);
947 }
948 
949 /** Copy constructor.
950  * @param m message to copy from
951  */
953 {
954  data_size = m->data_size;
955  data_ptr = malloc(data_size);
956  memcpy(data_ptr, m->data_ptr, data_size);
957  data = (GotoMessage_data_t *)data_ptr;
959 }
960 
961 /* Methods */
962 /** Get pan value.
963  * Current pan.
964  * @return pan value
965  */
966 float
968 {
969  return data->pan;
970 }
971 
972 /** Get maximum length of pan value.
973  * @return length of pan value, can be length of the array or number of
974  * maximum number of characters for a string
975  */
976 size_t
978 {
979  return 1;
980 }
981 
982 /** Set pan value.
983  * Current pan.
984  * @param new_pan new pan value
985  */
986 void
988 {
989  data->pan = new_pan;
990 }
991 
992 /** Get tilt value.
993  * Current tilt.
994  * @return tilt value
995  */
996 float
998 {
999  return data->tilt;
1000 }
1001 
1002 /** Get maximum length of tilt value.
1003  * @return length of tilt value, can be length of the array or number of
1004  * maximum number of characters for a string
1005  */
1006 size_t
1008 {
1009  return 1;
1010 }
1011 
1012 /** Set tilt value.
1013  * Current tilt.
1014  * @param new_tilt new tilt value
1015  */
1016 void
1018 {
1019  data->tilt = new_tilt;
1020 }
1021 
1022 /** Clone this message.
1023  * Produces a message of the same type as this message and copies the
1024  * data to the new message.
1025  * @return clone of this message
1026  */
1027 Message *
1029 {
1030  return new PanTiltInterface::GotoMessage(this);
1031 }
1032 /** @class PanTiltInterface::TimedGotoMessage <interfaces/PanTiltInterface.h>
1033  * TimedGotoMessage Fawkes BlackBoard Interface Message.
1034  *
1035 
1036  */
1037 
1038 
1039 /** Constructor with initial values.
1040  * @param ini_time_sec initial value for time_sec
1041  * @param ini_pan initial value for pan
1042  * @param ini_tilt initial value for tilt
1043  */
1044 PanTiltInterface::TimedGotoMessage::TimedGotoMessage(const float ini_time_sec, const float ini_pan, const float ini_tilt) : Message("TimedGotoMessage")
1045 {
1046  data_size = sizeof(TimedGotoMessage_data_t);
1047  data_ptr = malloc(data_size);
1048  memset(data_ptr, 0, data_size);
1049  data = (TimedGotoMessage_data_t *)data_ptr;
1051  data->time_sec = ini_time_sec;
1052  data->pan = ini_pan;
1053  data->tilt = ini_tilt;
1054  add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
1055  add_fieldinfo(IFT_FLOAT, "pan", 1, &data->pan);
1056  add_fieldinfo(IFT_FLOAT, "tilt", 1, &data->tilt);
1057 }
1058 /** Constructor */
1060 {
1061  data_size = sizeof(TimedGotoMessage_data_t);
1062  data_ptr = malloc(data_size);
1063  memset(data_ptr, 0, data_size);
1064  data = (TimedGotoMessage_data_t *)data_ptr;
1066  add_fieldinfo(IFT_FLOAT, "time_sec", 1, &data->time_sec);
1067  add_fieldinfo(IFT_FLOAT, "pan", 1, &data->pan);
1068  add_fieldinfo(IFT_FLOAT, "tilt", 1, &data->tilt);
1069 }
1070 
1071 /** Destructor */
1073 {
1074  free(data_ptr);
1075 }
1076 
1077 /** Copy constructor.
1078  * @param m message to copy from
1079  */
1081 {
1082  data_size = m->data_size;
1083  data_ptr = malloc(data_size);
1084  memcpy(data_ptr, m->data_ptr, data_size);
1085  data = (TimedGotoMessage_data_t *)data_ptr;
1087 }
1088 
1089 /* Methods */
1090 /** Get time_sec value.
1091  * Time in seconds when to reach
1092  the final position.
1093  * @return time_sec value
1094  */
1095 float
1097 {
1098  return data->time_sec;
1099 }
1100 
1101 /** Get maximum length of time_sec value.
1102  * @return length of time_sec value, can be length of the array or number of
1103  * maximum number of characters for a string
1104  */
1105 size_t
1107 {
1108  return 1;
1109 }
1110 
1111 /** Set time_sec value.
1112  * Time in seconds when to reach
1113  the final position.
1114  * @param new_time_sec new time_sec value
1115  */
1116 void
1118 {
1119  data->time_sec = new_time_sec;
1120 }
1121 
1122 /** Get pan value.
1123  * Current pan.
1124  * @return pan value
1125  */
1126 float
1128 {
1129  return data->pan;
1130 }
1131 
1132 /** Get maximum length of pan value.
1133  * @return length of pan value, can be length of the array or number of
1134  * maximum number of characters for a string
1135  */
1136 size_t
1138 {
1139  return 1;
1140 }
1141 
1142 /** Set pan value.
1143  * Current pan.
1144  * @param new_pan new pan value
1145  */
1146 void
1148 {
1149  data->pan = new_pan;
1150 }
1151 
1152 /** Get tilt value.
1153  * Current tilt.
1154  * @return tilt value
1155  */
1156 float
1158 {
1159  return data->tilt;
1160 }
1161 
1162 /** Get maximum length of tilt value.
1163  * @return length of tilt value, can be length of the array or number of
1164  * maximum number of characters for a string
1165  */
1166 size_t
1168 {
1169  return 1;
1170 }
1171 
1172 /** Set tilt value.
1173  * Current tilt.
1174  * @param new_tilt new tilt value
1175  */
1176 void
1178 {
1179  data->tilt = new_tilt;
1180 }
1181 
1182 /** Clone this message.
1183  * Produces a message of the same type as this message and copies the
1184  * data to the new message.
1185  * @return clone of this message
1186  */
1187 Message *
1189 {
1190  return new PanTiltInterface::TimedGotoMessage(this);
1191 }
1192 /** @class PanTiltInterface::SetEnabledMessage <interfaces/PanTiltInterface.h>
1193  * SetEnabledMessage Fawkes BlackBoard Interface Message.
1194  *
1195 
1196  */
1197 
1198 
1199 /** Constructor with initial values.
1200  * @param ini_enabled initial value for enabled
1201  */
1202 PanTiltInterface::SetEnabledMessage::SetEnabledMessage(const bool ini_enabled) : Message("SetEnabledMessage")
1203 {
1204  data_size = sizeof(SetEnabledMessage_data_t);
1205  data_ptr = malloc(data_size);
1206  memset(data_ptr, 0, data_size);
1207  data = (SetEnabledMessage_data_t *)data_ptr;
1209  data->enabled = ini_enabled;
1210  add_fieldinfo(IFT_BOOL, "enabled", 1, &data->enabled);
1211 }
1212 /** Constructor */
1214 {
1215  data_size = sizeof(SetEnabledMessage_data_t);
1216  data_ptr = malloc(data_size);
1217  memset(data_ptr, 0, data_size);
1218  data = (SetEnabledMessage_data_t *)data_ptr;
1220  add_fieldinfo(IFT_BOOL, "enabled", 1, &data->enabled);
1221 }
1222 
1223 /** Destructor */
1225 {
1226  free(data_ptr);
1227 }
1228 
1229 /** Copy constructor.
1230  * @param m message to copy from
1231  */
1233 {
1234  data_size = m->data_size;
1235  data_ptr = malloc(data_size);
1236  memcpy(data_ptr, m->data_ptr, data_size);
1237  data = (SetEnabledMessage_data_t *)data_ptr;
1239 }
1240 
1241 /* Methods */
1242 /** Get enabled value.
1243  * Is the pan/tilt unit enabled?
1244  * @return enabled value
1245  */
1246 bool
1248 {
1249  return data->enabled;
1250 }
1251 
1252 /** Get maximum length of enabled value.
1253  * @return length of enabled value, can be length of the array or number of
1254  * maximum number of characters for a string
1255  */
1256 size_t
1258 {
1259  return 1;
1260 }
1261 
1262 /** Set enabled value.
1263  * Is the pan/tilt unit enabled?
1264  * @param new_enabled new enabled value
1265  */
1266 void
1268 {
1269  data->enabled = new_enabled;
1270 }
1271 
1272 /** Clone this message.
1273  * Produces a message of the same type as this message and copies the
1274  * data to the new message.
1275  * @return clone of this message
1276  */
1277 Message *
1279 {
1280  return new PanTiltInterface::SetEnabledMessage(this);
1281 }
1282 /** @class PanTiltInterface::SetVelocityMessage <interfaces/PanTiltInterface.h>
1283  * SetVelocityMessage Fawkes BlackBoard Interface Message.
1284  *
1285 
1286  */
1287 
1288 
1289 /** Constructor with initial values.
1290  * @param ini_pan_velocity initial value for pan_velocity
1291  * @param ini_tilt_velocity initial value for tilt_velocity
1292  */
1293 PanTiltInterface::SetVelocityMessage::SetVelocityMessage(const float ini_pan_velocity, const float ini_tilt_velocity) : Message("SetVelocityMessage")
1294 {
1295  data_size = sizeof(SetVelocityMessage_data_t);
1296  data_ptr = malloc(data_size);
1297  memset(data_ptr, 0, data_size);
1298  data = (SetVelocityMessage_data_t *)data_ptr;
1300  data->pan_velocity = ini_pan_velocity;
1301  data->tilt_velocity = ini_tilt_velocity;
1302  add_fieldinfo(IFT_FLOAT, "pan_velocity", 1, &data->pan_velocity);
1303  add_fieldinfo(IFT_FLOAT, "tilt_velocity", 1, &data->tilt_velocity);
1304 }
1305 /** Constructor */
1307 {
1308  data_size = sizeof(SetVelocityMessage_data_t);
1309  data_ptr = malloc(data_size);
1310  memset(data_ptr, 0, data_size);
1311  data = (SetVelocityMessage_data_t *)data_ptr;
1313  add_fieldinfo(IFT_FLOAT, "pan_velocity", 1, &data->pan_velocity);
1314  add_fieldinfo(IFT_FLOAT, "tilt_velocity", 1, &data->tilt_velocity);
1315 }
1316 
1317 /** Destructor */
1319 {
1320  free(data_ptr);
1321 }
1322 
1323 /** Copy constructor.
1324  * @param m message to copy from
1325  */
1327 {
1328  data_size = m->data_size;
1329  data_ptr = malloc(data_size);
1330  memcpy(data_ptr, m->data_ptr, data_size);
1331  data = (SetVelocityMessage_data_t *)data_ptr;
1333 }
1334 
1335 /* Methods */
1336 /** Get pan_velocity value.
1337  * Maximum pan velocity currently reached.
1338  * @return pan_velocity value
1339  */
1340 float
1342 {
1343  return data->pan_velocity;
1344 }
1345 
1346 /** Get maximum length of pan_velocity value.
1347  * @return length of pan_velocity value, can be length of the array or number of
1348  * maximum number of characters for a string
1349  */
1350 size_t
1352 {
1353  return 1;
1354 }
1355 
1356 /** Set pan_velocity value.
1357  * Maximum pan velocity currently reached.
1358  * @param new_pan_velocity new pan_velocity value
1359  */
1360 void
1362 {
1363  data->pan_velocity = new_pan_velocity;
1364 }
1365 
1366 /** Get tilt_velocity value.
1367  * Maximum tilt velocity currently reached.
1368  * @return tilt_velocity value
1369  */
1370 float
1372 {
1373  return data->tilt_velocity;
1374 }
1375 
1376 /** Get maximum length of tilt_velocity value.
1377  * @return length of tilt_velocity value, can be length of the array or number of
1378  * maximum number of characters for a string
1379  */
1380 size_t
1382 {
1383  return 1;
1384 }
1385 
1386 /** Set tilt_velocity value.
1387  * Maximum tilt velocity currently reached.
1388  * @param new_tilt_velocity new tilt_velocity value
1389  */
1390 void
1392 {
1393  data->tilt_velocity = new_tilt_velocity;
1394 }
1395 
1396 /** Clone this message.
1397  * Produces a message of the same type as this message and copies the
1398  * data to the new message.
1399  * @return clone of this message
1400  */
1401 Message *
1403 {
1404  return new PanTiltInterface::SetVelocityMessage(this);
1405 }
1406 /** @class PanTiltInterface::SetMarginMessage <interfaces/PanTiltInterface.h>
1407  * SetMarginMessage Fawkes BlackBoard Interface Message.
1408  *
1409 
1410  */
1411 
1412 
1413 /** Constructor with initial values.
1414  * @param ini_pan_margin initial value for pan_margin
1415  * @param ini_tilt_margin initial value for tilt_margin
1416  */
1417 PanTiltInterface::SetMarginMessage::SetMarginMessage(const float ini_pan_margin, const float ini_tilt_margin) : Message("SetMarginMessage")
1418 {
1419  data_size = sizeof(SetMarginMessage_data_t);
1420  data_ptr = malloc(data_size);
1421  memset(data_ptr, 0, data_size);
1422  data = (SetMarginMessage_data_t *)data_ptr;
1424  data->pan_margin = ini_pan_margin;
1425  data->tilt_margin = ini_tilt_margin;
1426  add_fieldinfo(IFT_FLOAT, "pan_margin", 1, &data->pan_margin);
1427  add_fieldinfo(IFT_FLOAT, "tilt_margin", 1, &data->tilt_margin);
1428 }
1429 /** Constructor */
1431 {
1432  data_size = sizeof(SetMarginMessage_data_t);
1433  data_ptr = malloc(data_size);
1434  memset(data_ptr, 0, data_size);
1435  data = (SetMarginMessage_data_t *)data_ptr;
1437  add_fieldinfo(IFT_FLOAT, "pan_margin", 1, &data->pan_margin);
1438  add_fieldinfo(IFT_FLOAT, "tilt_margin", 1, &data->tilt_margin);
1439 }
1440 
1441 /** Destructor */
1443 {
1444  free(data_ptr);
1445 }
1446 
1447 /** Copy constructor.
1448  * @param m message to copy from
1449  */
1451 {
1452  data_size = m->data_size;
1453  data_ptr = malloc(data_size);
1454  memcpy(data_ptr, m->data_ptr, data_size);
1455  data = (SetMarginMessage_data_t *)data_ptr;
1457 }
1458 
1459 /* Methods */
1460 /** Get pan_margin value.
1461  * Margin in radians around a
1462  target pan value to consider the motion as final.
1463  * @return pan_margin value
1464  */
1465 float
1467 {
1468  return data->pan_margin;
1469 }
1470 
1471 /** Get maximum length of pan_margin value.
1472  * @return length of pan_margin value, can be length of the array or number of
1473  * maximum number of characters for a string
1474  */
1475 size_t
1477 {
1478  return 1;
1479 }
1480 
1481 /** Set pan_margin value.
1482  * Margin in radians around a
1483  target pan value to consider the motion as final.
1484  * @param new_pan_margin new pan_margin value
1485  */
1486 void
1488 {
1489  data->pan_margin = new_pan_margin;
1490 }
1491 
1492 /** Get tilt_margin value.
1493  * Margin in radians around a
1494  target tilt value to consider the motion as final.
1495  * @return tilt_margin value
1496  */
1497 float
1499 {
1500  return data->tilt_margin;
1501 }
1502 
1503 /** Get maximum length of tilt_margin value.
1504  * @return length of tilt_margin value, can be length of the array or number of
1505  * maximum number of characters for a string
1506  */
1507 size_t
1509 {
1510  return 1;
1511 }
1512 
1513 /** Set tilt_margin value.
1514  * Margin in radians around a
1515  target tilt value to consider the motion as final.
1516  * @param new_tilt_margin new tilt_margin value
1517  */
1518 void
1520 {
1521  data->tilt_margin = new_tilt_margin;
1522 }
1523 
1524 /** Clone this message.
1525  * Produces a message of the same type as this message and copies the
1526  * data to the new message.
1527  * @return clone of this message
1528  */
1529 Message *
1531 {
1532  return new PanTiltInterface::SetMarginMessage(this);
1533 }
1534 /** Check if message is valid and can be enqueued.
1535  * @param message Message to check
1536  * @return true if the message is valid, false otherwise.
1537  */
1538 bool
1540 {
1541  const StopMessage *m0 = dynamic_cast<const StopMessage *>(message);
1542  if ( m0 != NULL ) {
1543  return true;
1544  }
1545  const FlushMessage *m1 = dynamic_cast<const FlushMessage *>(message);
1546  if ( m1 != NULL ) {
1547  return true;
1548  }
1549  const CalibrateMessage *m2 = dynamic_cast<const CalibrateMessage *>(message);
1550  if ( m2 != NULL ) {
1551  return true;
1552  }
1553  const ParkMessage *m3 = dynamic_cast<const ParkMessage *>(message);
1554  if ( m3 != NULL ) {
1555  return true;
1556  }
1557  const GotoMessage *m4 = dynamic_cast<const GotoMessage *>(message);
1558  if ( m4 != NULL ) {
1559  return true;
1560  }
1561  const TimedGotoMessage *m5 = dynamic_cast<const TimedGotoMessage *>(message);
1562  if ( m5 != NULL ) {
1563  return true;
1564  }
1565  const SetEnabledMessage *m6 = dynamic_cast<const SetEnabledMessage *>(message);
1566  if ( m6 != NULL ) {
1567  return true;
1568  }
1569  const SetVelocityMessage *m7 = dynamic_cast<const SetVelocityMessage *>(message);
1570  if ( m7 != NULL ) {
1571  return true;
1572  }
1573  const SetMarginMessage *m8 = dynamic_cast<const SetMarginMessage *>(message);
1574  if ( m8 != NULL ) {
1575  return true;
1576  }
1577  return false;
1578 }
1579 
1580 /// @cond INTERNALS
1581 EXPORT_INTERFACE(PanTiltInterface)
1582 /// @endcond
1583 
1584 
1585 } // end namespace fawkes
size_t maxlenof_pan() const
Get maximum length of pan value.
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:124
TimedGotoMessage Fawkes BlackBoard Interface Message.
void set_time_sec(const float new_time_sec)
Set time_sec value.
void set_tilt_velocity(const float new_tilt_velocity)
Set tilt_velocity value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
size_t maxlenof_pan_velocity() const
Get maximum length of pan_velocity value.
static const uint32_t ERROR_PAN_OUTOFRANGE
ERROR_PAN_OUTOFRANGE constant.
static const uint32_t ERROR_COMMUNICATION
ERROR_COMMUNICATION constant.
static const uint32_t ERROR_UNSPECIFIC
ERROR_UNSPECIFIC constant.
virtual Message * clone() const
Clone this message.
virtual Message * clone() const
Clone this message.
void set_pan_margin(const float new_pan_margin)
Set pan_margin value.
Fawkes library namespace.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
float tilt_velocity() const
Get tilt_velocity value.
Timestamp data, must be present and first entries for each interface data structs! This leans on time...
Definition: message.h:129
SetEnabledMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_tilt_margin() const
Get maximum length of tilt_margin value.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:79
float tilt_margin() const
Get tilt_margin value.
SetVelocityMessage Fawkes BlackBoard Interface Message.
float pan_velocity() const
Get pan_velocity value.
static const uint32_t ERROR_NONE
ERROR_NONE constant.
void set_pan(const float new_pan)
Set pan 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
void set_tilt_margin(const float new_tilt_margin)
Set tilt_margin value.
size_t maxlenof_tilt_velocity() const
Get maximum length of tilt_velocity value.
virtual Message * clone() const
Clone this message.
const char * type() const
Get type of interface.
Definition: interface.cpp:651
ParkMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
void set_tilt(const float new_tilt)
Set tilt value.
static const uint32_t FLAG_SUPPORTS_PAN
FLAG_SUPPORTS_PAN constant.
FlushMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_time_sec() const
Get maximum length of time_sec value.
virtual Message * clone() const
Clone this message.
void set_pan_velocity(const float new_pan_velocity)
Set pan_velocity value.
size_t maxlenof_pan_margin() const
Get maximum length of pan_margin value.
bool is_enabled() const
Get enabled value.
static const uint32_t ERROR_TILT_OUTOFRANGE
ERROR_TILT_OUTOFRANGE constant.
GotoMessage Fawkes BlackBoard Interface Message.
float field
Definition: types.h:45
virtual Message * clone() const
Clone this message.
void set_pan(const float new_pan)
Set pan value.
size_t maxlenof_pan() const
Get maximum length of pan value.
SetMarginMessage Fawkes BlackBoard Interface Message.
CalibrateMessage Fawkes BlackBoard Interface Message.
static const uint32_t FLAG_SUPPORTS_TILT
FLAG_SUPPORTS_TILT constant.
PanTiltInterface Fawkes BlackBoard Interface.
float tilt() const
Get tilt value.
size_t maxlenof_enabled() const
Get maximum length of enabled value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_tilt() const
Get maximum length of tilt 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_tilt() const
Get maximum length of tilt value.
float pan_margin() const
Get pan_margin value.
void set_tilt(const float new_tilt)
Set tilt value.
virtual Message * clone() const
Clone this message.
float time_sec() const
Get time_sec value.
float pan() const
Get pan value.
StopMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
void set_enabled(const bool new_enabled)
Set enabled value.