Fawkes API Fawkes Development Version
JacoInterface.cpp
1
2/***************************************************************************
3 * JacoInterface.cpp - Fawkes BlackBoard Interface - JacoInterface
4 *
5 * Templated created: Thu Oct 12 10:49:19 2006
6 * Copyright 2013 Bahram Maleki-Fard
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/JacoInterface.h>
25
26#include <core/exceptions/software.h>
27
28#include <map>
29#include <string>
30#include <cstring>
31#include <cstdlib>
32
33namespace fawkes {
34
35/** @class JacoInterface <interfaces/JacoInterface.h>
36 * JacoInterface Fawkes BlackBoard Interface.
37 *
38 Interface providing access to a Kinova Jaco arm.
39
40 * @ingroup FawkesInterfaces
41 */
42
43
44/** ERROR_NONE constant */
45const uint32_t JacoInterface::ERROR_NONE = 0u;
46/** ERROR_UNSPECIFIC constant */
47const uint32_t JacoInterface::ERROR_UNSPECIFIC = 1u;
48/** ERROR_NO_IK constant */
49const uint32_t JacoInterface::ERROR_NO_IK = 2u;
50/** ERROR_PLANNING constant */
51const uint32_t JacoInterface::ERROR_PLANNING = 4u;
52
53/** Constructor */
54JacoInterface::JacoInterface() : Interface()
55{
56 data_size = sizeof(JacoInterface_data_t);
57 data_ptr = malloc(data_size);
58 data = (JacoInterface_data_t *)data_ptr;
59 data_ts = (interface_data_ts_t *)data_ptr;
60 memset(data_ptr, 0, data_size);
61 add_fieldinfo(IFT_BOOL, "connected", 1, &data->connected);
62 add_fieldinfo(IFT_BOOL, "initialized", 1, &data->initialized);
63 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
64 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
65 add_fieldinfo(IFT_FLOAT, "z", 1, &data->z);
66 add_fieldinfo(IFT_FLOAT, "euler1", 1, &data->euler1);
67 add_fieldinfo(IFT_FLOAT, "euler2", 1, &data->euler2);
68 add_fieldinfo(IFT_FLOAT, "euler3", 1, &data->euler3);
69 add_fieldinfo(IFT_FLOAT, "joints", 6, &data->joints);
70 add_fieldinfo(IFT_FLOAT, "finger1", 1, &data->finger1);
71 add_fieldinfo(IFT_FLOAT, "finger2", 1, &data->finger2);
72 add_fieldinfo(IFT_FLOAT, "finger3", 1, &data->finger3);
73 add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
74 add_fieldinfo(IFT_BOOL, "final", 1, &data->final);
75 add_fieldinfo(IFT_UINT32, "error_code", 1, &data->error_code);
76 add_messageinfo("CalibrateMessage");
77 add_messageinfo("RetractMessage");
78 add_messageinfo("StopMessage");
79 add_messageinfo("CartesianGotoMessage");
80 add_messageinfo("AngularGotoMessage");
81 add_messageinfo("MoveGripperMessage");
82 add_messageinfo("SetPlannerParamsMessage");
83 add_messageinfo("JoystickPushMessage");
84 add_messageinfo("JoystickReleaseMessage");
85 unsigned char tmp_hash[] = {0xff, 0x31, 0x58, 0x1c, 0x31, 0x7a, 0xc5, 0xb4, 0x2a, 0x56, 0x87, 0x5, 0x34, 0xfe, 0x6, 0x93};
86 set_hash(tmp_hash);
87}
88
89/** Destructor */
90JacoInterface::~JacoInterface()
91{
92 free(data_ptr);
93}
94/* Methods */
95/** Get connected value.
96 * Is JacoArm connected/ready?
97 * @return connected value
98 */
99bool
100JacoInterface::is_connected() const
101{
102 return data->connected;
103}
104
105/** Get maximum length of connected value.
106 * @return length of connected value, can be length of the array or number of
107 * maximum number of characters for a string
108 */
109size_t
110JacoInterface::maxlenof_connected() const
111{
112 return 1;
113}
114
115/** Set connected value.
116 * Is JacoArm connected/ready?
117 * @param new_connected new connected value
118 */
119void
120JacoInterface::set_connected(const bool new_connected)
121{
122 set_field(data->connected, new_connected);
123}
124
125/** Get initialized value.
126 * Checks if Jaco arm has been initialized once after switched on.
127 * @return initialized value
128 */
129bool
130JacoInterface::is_initialized() const
131{
132 return data->initialized;
133}
134
135/** Get maximum length of initialized value.
136 * @return length of initialized value, can be length of the array or number of
137 * maximum number of characters for a string
138 */
139size_t
140JacoInterface::maxlenof_initialized() const
141{
142 return 1;
143}
144
145/** Set initialized value.
146 * Checks if Jaco arm has been initialized once after switched on.
147 * @param new_initialized new initialized value
148 */
149void
150JacoInterface::set_initialized(const bool new_initialized)
151{
152 set_field(data->initialized, new_initialized);
153}
154
155/** Get x value.
156 * X-Coordinate of tool translation.
157 * @return x value
158 */
159float
160JacoInterface::x() const
161{
162 return data->x;
163}
164
165/** Get maximum length of x value.
166 * @return length of x value, can be length of the array or number of
167 * maximum number of characters for a string
168 */
169size_t
170JacoInterface::maxlenof_x() const
171{
172 return 1;
173}
174
175/** Set x value.
176 * X-Coordinate of tool translation.
177 * @param new_x new x value
178 */
179void
180JacoInterface::set_x(const float new_x)
181{
182 set_field(data->x, new_x);
183}
184
185/** Get y value.
186 * Y-Coordinate op tool translation.
187 * @return y value
188 */
189float
190JacoInterface::y() const
191{
192 return data->y;
193}
194
195/** Get maximum length of y value.
196 * @return length of y value, can be length of the array or number of
197 * maximum number of characters for a string
198 */
199size_t
200JacoInterface::maxlenof_y() const
201{
202 return 1;
203}
204
205/** Set y value.
206 * Y-Coordinate op tool translation.
207 * @param new_y new y value
208 */
209void
210JacoInterface::set_y(const float new_y)
211{
212 set_field(data->y, new_y);
213}
214
215/** Get z value.
216 * Z-Coordinate of tool translation.
217 * @return z value
218 */
219float
220JacoInterface::z() const
221{
222 return data->z;
223}
224
225/** Get maximum length of z value.
226 * @return length of z value, can be length of the array or number of
227 * maximum number of characters for a string
228 */
229size_t
230JacoInterface::maxlenof_z() const
231{
232 return 1;
233}
234
235/** Set z value.
236 * Z-Coordinate of tool translation.
237 * @param new_z new z value
238 */
239void
240JacoInterface::set_z(const float new_z)
241{
242 set_field(data->z, new_z);
243}
244
245/** Get euler1 value.
246 * 1st Euler angle of tool rotation.
247 * @return euler1 value
248 */
249float
250JacoInterface::euler1() const
251{
252 return data->euler1;
253}
254
255/** Get maximum length of euler1 value.
256 * @return length of euler1 value, can be length of the array or number of
257 * maximum number of characters for a string
258 */
259size_t
260JacoInterface::maxlenof_euler1() const
261{
262 return 1;
263}
264
265/** Set euler1 value.
266 * 1st Euler angle of tool rotation.
267 * @param new_euler1 new euler1 value
268 */
269void
270JacoInterface::set_euler1(const float new_euler1)
271{
272 set_field(data->euler1, new_euler1);
273}
274
275/** Get euler2 value.
276 * 2nd Euler angle of tool rotation.
277 * @return euler2 value
278 */
279float
280JacoInterface::euler2() const
281{
282 return data->euler2;
283}
284
285/** Get maximum length of euler2 value.
286 * @return length of euler2 value, can be length of the array or number of
287 * maximum number of characters for a string
288 */
289size_t
290JacoInterface::maxlenof_euler2() const
291{
292 return 1;
293}
294
295/** Set euler2 value.
296 * 2nd Euler angle of tool rotation.
297 * @param new_euler2 new euler2 value
298 */
299void
300JacoInterface::set_euler2(const float new_euler2)
301{
302 set_field(data->euler2, new_euler2);
303}
304
305/** Get euler3 value.
306 * 3rd Euler angle of tool rotation.
307 * @return euler3 value
308 */
309float
310JacoInterface::euler3() const
311{
312 return data->euler3;
313}
314
315/** Get maximum length of euler3 value.
316 * @return length of euler3 value, can be length of the array or number of
317 * maximum number of characters for a string
318 */
319size_t
320JacoInterface::maxlenof_euler3() const
321{
322 return 1;
323}
324
325/** Set euler3 value.
326 * 3rd Euler angle of tool rotation.
327 * @param new_euler3 new euler3 value
328 */
329void
330JacoInterface::set_euler3(const float new_euler3)
331{
332 set_field(data->euler3, new_euler3);
333}
334
335/** Get joints value.
336 * Angle values of joints
337 * @return joints value
338 */
339float *
340JacoInterface::joints() const
341{
342 return data->joints;
343}
344
345/** Get joints value at given index.
346 * Angle values of joints
347 * @param index index of value
348 * @return joints value
349 * @exception Exception thrown if index is out of bounds
350 */
351float
352JacoInterface::joints(unsigned int index) const
353{
354 if (index > 5) {
355 throw Exception("Index value %u out of bounds (0..5)", index);
356 }
357 return data->joints[index];
358}
359
360/** Get maximum length of joints value.
361 * @return length of joints value, can be length of the array or number of
362 * maximum number of characters for a string
363 */
364size_t
365JacoInterface::maxlenof_joints() const
366{
367 return 6;
368}
369
370/** Set joints value.
371 * Angle values of joints
372 * @param new_joints new joints value
373 */
374void
375JacoInterface::set_joints(const float * new_joints)
376{
377 set_field(data->joints, new_joints);
378}
379
380/** Set joints value at given index.
381 * Angle values of joints
382 * @param new_joints new joints value
383 * @param index index for of the value
384 */
385void
386JacoInterface::set_joints(unsigned int index, const float new_joints)
387{
388 set_field(data->joints, index, new_joints);
389}
390/** Get finger1 value.
391 * Angular value of finger 1.
392 * @return finger1 value
393 */
394float
395JacoInterface::finger1() const
396{
397 return data->finger1;
398}
399
400/** Get maximum length of finger1 value.
401 * @return length of finger1 value, can be length of the array or number of
402 * maximum number of characters for a string
403 */
404size_t
405JacoInterface::maxlenof_finger1() const
406{
407 return 1;
408}
409
410/** Set finger1 value.
411 * Angular value of finger 1.
412 * @param new_finger1 new finger1 value
413 */
414void
415JacoInterface::set_finger1(const float new_finger1)
416{
417 set_field(data->finger1, new_finger1);
418}
419
420/** Get finger2 value.
421 * Angular value of finger 2.
422 * @return finger2 value
423 */
424float
425JacoInterface::finger2() const
426{
427 return data->finger2;
428}
429
430/** Get maximum length of finger2 value.
431 * @return length of finger2 value, can be length of the array or number of
432 * maximum number of characters for a string
433 */
434size_t
435JacoInterface::maxlenof_finger2() const
436{
437 return 1;
438}
439
440/** Set finger2 value.
441 * Angular value of finger 2.
442 * @param new_finger2 new finger2 value
443 */
444void
445JacoInterface::set_finger2(const float new_finger2)
446{
447 set_field(data->finger2, new_finger2);
448}
449
450/** Get finger3 value.
451 * Angular value of finger 3.
452 * @return finger3 value
453 */
454float
455JacoInterface::finger3() const
456{
457 return data->finger3;
458}
459
460/** Get maximum length of finger3 value.
461 * @return length of finger3 value, can be length of the array or number of
462 * maximum number of characters for a string
463 */
464size_t
465JacoInterface::maxlenof_finger3() const
466{
467 return 1;
468}
469
470/** Set finger3 value.
471 * Angular value of finger 3.
472 * @param new_finger3 new finger3 value
473 */
474void
475JacoInterface::set_finger3(const float new_finger3)
476{
477 set_field(data->finger3, new_finger3);
478}
479
480/** Get msgid value.
481 * The ID of the message that is currently being
482 processed, or 0 if no message is being processed.
483 * @return msgid value
484 */
485uint32_t
486JacoInterface::msgid() const
487{
488 return data->msgid;
489}
490
491/** Get maximum length of msgid value.
492 * @return length of msgid value, can be length of the array or number of
493 * maximum number of characters for a string
494 */
495size_t
496JacoInterface::maxlenof_msgid() const
497{
498 return 1;
499}
500
501/** Set msgid value.
502 * The ID of the message that is currently being
503 processed, or 0 if no message is being processed.
504 * @param new_msgid new msgid value
505 */
506void
507JacoInterface::set_msgid(const uint32_t new_msgid)
508{
509 set_field(data->msgid, new_msgid);
510}
511
512/** Get final value.
513 * True, if the last goto command has been finished,
514 false if it is still running
515 * @return final value
516 */
517bool
518JacoInterface::is_final() const
519{
520 return data->final;
521}
522
523/** Get maximum length of final value.
524 * @return length of final value, can be length of the array or number of
525 * maximum number of characters for a string
526 */
527size_t
528JacoInterface::maxlenof_final() const
529{
530 return 1;
531}
532
533/** Set final value.
534 * True, if the last goto command has been finished,
535 false if it is still running
536 * @param new_final new final value
537 */
538void
539JacoInterface::set_final(const bool new_final)
540{
541 set_field(data->final, new_final);
542}
543
544/** Get error_code value.
545 * Error code, set if
546 final is true. 0 if no error occured, an error code from ERROR_*
547 constants otherwise.
548 * @return error_code value
549 */
550uint32_t
551JacoInterface::error_code() const
552{
553 return data->error_code;
554}
555
556/** Get maximum length of error_code value.
557 * @return length of error_code value, can be length of the array or number of
558 * maximum number of characters for a string
559 */
560size_t
561JacoInterface::maxlenof_error_code() const
562{
563 return 1;
564}
565
566/** Set error_code value.
567 * Error code, set if
568 final is true. 0 if no error occured, an error code from ERROR_*
569 constants otherwise.
570 * @param new_error_code new error_code value
571 */
572void
573JacoInterface::set_error_code(const uint32_t new_error_code)
574{
575 set_field(data->error_code, new_error_code);
576}
577
578/* =========== message create =========== */
579Message *
580JacoInterface::create_message(const char *type) const
581{
582 if ( strncmp("CalibrateMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
583 return new CalibrateMessage();
584 } else if ( strncmp("RetractMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
585 return new RetractMessage();
586 } else if ( strncmp("StopMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
587 return new StopMessage();
588 } else if ( strncmp("CartesianGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
589 return new CartesianGotoMessage();
590 } else if ( strncmp("AngularGotoMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
591 return new AngularGotoMessage();
592 } else if ( strncmp("MoveGripperMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
593 return new MoveGripperMessage();
594 } else if ( strncmp("SetPlannerParamsMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
595 return new SetPlannerParamsMessage();
596 } else if ( strncmp("JoystickPushMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
597 return new JoystickPushMessage();
598 } else if ( strncmp("JoystickReleaseMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
599 return new JoystickReleaseMessage();
600 } else {
601 throw UnknownTypeException("The given type '%s' does not match any known "
602 "message type for this interface type.", type);
603 }
604}
605
606
607/** Copy values from other interface.
608 * @param other other interface to copy values from
609 */
610void
611JacoInterface::copy_values(const Interface *other)
612{
613 const JacoInterface *oi = dynamic_cast<const JacoInterface *>(other);
614 if (oi == NULL) {
615 throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
616 type(), other->type());
617 }
618 memcpy(data, oi->data, sizeof(JacoInterface_data_t));
619}
620
621const char *
622JacoInterface::enum_tostring(const char *enumtype, int val) const
623{
624 throw UnknownTypeException("Unknown enum type %s", enumtype);
625}
626
627/* =========== messages =========== */
628/** @class JacoInterface::CalibrateMessage <interfaces/JacoInterface.h>
629 * CalibrateMessage Fawkes BlackBoard Interface Message.
630 *
631
632 */
633
634
635/** Constructor */
636JacoInterface::CalibrateMessage::CalibrateMessage() : Message("CalibrateMessage")
637{
638 data_size = sizeof(CalibrateMessage_data_t);
639 data_ptr = malloc(data_size);
640 memset(data_ptr, 0, data_size);
641 data = (CalibrateMessage_data_t *)data_ptr;
643}
644
645/** Destructor */
647{
648 free(data_ptr);
649}
650
651/** Copy constructor.
652 * @param m message to copy from
653 */
655{
656 data_size = m->data_size;
657 data_ptr = malloc(data_size);
658 memcpy(data_ptr, m->data_ptr, data_size);
659 data = (CalibrateMessage_data_t *)data_ptr;
661}
662
663/* Methods */
664/** Clone this message.
665 * Produces a message of the same type as this message and copies the
666 * data to the new message.
667 * @return clone of this message
668 */
669Message *
671{
672 return new JacoInterface::CalibrateMessage(this);
673}
674/** @class JacoInterface::RetractMessage <interfaces/JacoInterface.h>
675 * RetractMessage Fawkes BlackBoard Interface Message.
676 *
677
678 */
679
680
681/** Constructor */
683{
684 data_size = sizeof(RetractMessage_data_t);
685 data_ptr = malloc(data_size);
686 memset(data_ptr, 0, data_size);
687 data = (RetractMessage_data_t *)data_ptr;
689}
690
691/** Destructor */
693{
694 free(data_ptr);
695}
696
697/** Copy constructor.
698 * @param m message to copy from
699 */
701{
702 data_size = m->data_size;
703 data_ptr = malloc(data_size);
704 memcpy(data_ptr, m->data_ptr, data_size);
705 data = (RetractMessage_data_t *)data_ptr;
707}
708
709/* Methods */
710/** Clone this message.
711 * Produces a message of the same type as this message and copies the
712 * data to the new message.
713 * @return clone of this message
714 */
715Message *
717{
718 return new JacoInterface::RetractMessage(this);
719}
720/** @class JacoInterface::StopMessage <interfaces/JacoInterface.h>
721 * StopMessage Fawkes BlackBoard Interface Message.
722 *
723
724 */
725
726
727/** Constructor */
729{
730 data_size = sizeof(StopMessage_data_t);
731 data_ptr = malloc(data_size);
732 memset(data_ptr, 0, data_size);
733 data = (StopMessage_data_t *)data_ptr;
735}
736
737/** Destructor */
739{
740 free(data_ptr);
741}
742
743/** Copy constructor.
744 * @param m message to copy from
745 */
747{
748 data_size = m->data_size;
749 data_ptr = malloc(data_size);
750 memcpy(data_ptr, m->data_ptr, data_size);
751 data = (StopMessage_data_t *)data_ptr;
753}
754
755/* Methods */
756/** Clone this message.
757 * Produces a message of the same type as this message and copies the
758 * data to the new message.
759 * @return clone of this message
760 */
761Message *
763{
764 return new JacoInterface::StopMessage(this);
765}
766/** @class JacoInterface::CartesianGotoMessage <interfaces/JacoInterface.h>
767 * CartesianGotoMessage Fawkes BlackBoard Interface Message.
768 *
769
770 */
771
772
773/** Constructor with initial values.
774 * @param ini_x initial value for x
775 * @param ini_y initial value for y
776 * @param ini_z initial value for z
777 * @param ini_e1 initial value for e1
778 * @param ini_e2 initial value for e2
779 * @param ini_e3 initial value for e3
780 */
781JacoInterface::CartesianGotoMessage::CartesianGotoMessage(const float ini_x, const float ini_y, const float ini_z, const float ini_e1, const float ini_e2, const float ini_e3) : Message("CartesianGotoMessage")
782{
783 data_size = sizeof(CartesianGotoMessage_data_t);
784 data_ptr = malloc(data_size);
785 memset(data_ptr, 0, data_size);
786 data = (CartesianGotoMessage_data_t *)data_ptr;
788 data->x = ini_x;
789 data->y = ini_y;
790 data->z = ini_z;
791 data->e1 = ini_e1;
792 data->e2 = ini_e2;
793 data->e3 = ini_e3;
794 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
795 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
796 add_fieldinfo(IFT_FLOAT, "z", 1, &data->z);
797 add_fieldinfo(IFT_FLOAT, "e1", 1, &data->e1);
798 add_fieldinfo(IFT_FLOAT, "e2", 1, &data->e2);
799 add_fieldinfo(IFT_FLOAT, "e3", 1, &data->e3);
800}
801/** Constructor */
803{
804 data_size = sizeof(CartesianGotoMessage_data_t);
805 data_ptr = malloc(data_size);
806 memset(data_ptr, 0, data_size);
807 data = (CartesianGotoMessage_data_t *)data_ptr;
809 add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
810 add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
811 add_fieldinfo(IFT_FLOAT, "z", 1, &data->z);
812 add_fieldinfo(IFT_FLOAT, "e1", 1, &data->e1);
813 add_fieldinfo(IFT_FLOAT, "e2", 1, &data->e2);
814 add_fieldinfo(IFT_FLOAT, "e3", 1, &data->e3);
815}
816
817/** Destructor */
819{
820 free(data_ptr);
821}
822
823/** Copy constructor.
824 * @param m message to copy from
825 */
827{
828 data_size = m->data_size;
829 data_ptr = malloc(data_size);
830 memcpy(data_ptr, m->data_ptr, data_size);
831 data = (CartesianGotoMessage_data_t *)data_ptr;
833}
834
835/* Methods */
836/** Get x value.
837 * X-coordinate of target
838 * @return x value
839 */
840float
842{
843 return data->x;
844}
845
846/** Get maximum length of x value.
847 * @return length of x value, can be length of the array or number of
848 * maximum number of characters for a string
849 */
850size_t
852{
853 return 1;
854}
855
856/** Set x value.
857 * X-coordinate of target
858 * @param new_x new x value
859 */
860void
862{
863 set_field(data->x, new_x);
864}
865
866/** Get y value.
867 * Y-coordinate of target
868 * @return y value
869 */
870float
872{
873 return data->y;
874}
875
876/** Get maximum length of y value.
877 * @return length of y value, can be length of the array or number of
878 * maximum number of characters for a string
879 */
880size_t
882{
883 return 1;
884}
885
886/** Set y value.
887 * Y-coordinate of target
888 * @param new_y new y value
889 */
890void
892{
893 set_field(data->y, new_y);
894}
895
896/** Get z value.
897 * Z-coordinate of target
898 * @return z value
899 */
900float
902{
903 return data->z;
904}
905
906/** Get maximum length of z value.
907 * @return length of z value, can be length of the array or number of
908 * maximum number of characters for a string
909 */
910size_t
912{
913 return 1;
914}
915
916/** Set z value.
917 * Z-coordinate of target
918 * @param new_z new z value
919 */
920void
922{
923 set_field(data->z, new_z);
924}
925
926/** Get e1 value.
927 * 1st Euler angle of target rotation
928 * @return e1 value
929 */
930float
932{
933 return data->e1;
934}
935
936/** Get maximum length of e1 value.
937 * @return length of e1 value, can be length of the array or number of
938 * maximum number of characters for a string
939 */
940size_t
942{
943 return 1;
944}
945
946/** Set e1 value.
947 * 1st Euler angle of target rotation
948 * @param new_e1 new e1 value
949 */
950void
952{
953 set_field(data->e1, new_e1);
954}
955
956/** Get e2 value.
957 * 2nd Euler angle of target rotation
958 * @return e2 value
959 */
960float
962{
963 return data->e2;
964}
965
966/** Get maximum length of e2 value.
967 * @return length of e2 value, can be length of the array or number of
968 * maximum number of characters for a string
969 */
970size_t
972{
973 return 1;
974}
975
976/** Set e2 value.
977 * 2nd Euler angle of target rotation
978 * @param new_e2 new e2 value
979 */
980void
982{
983 set_field(data->e2, new_e2);
984}
985
986/** Get e3 value.
987 * 3rd Euler angle of target rotation
988 * @return e3 value
989 */
990float
992{
993 return data->e3;
994}
995
996/** Get maximum length of e3 value.
997 * @return length of e3 value, can be length of the array or number of
998 * maximum number of characters for a string
999 */
1000size_t
1002{
1003 return 1;
1004}
1005
1006/** Set e3 value.
1007 * 3rd Euler angle of target rotation
1008 * @param new_e3 new e3 value
1009 */
1010void
1012{
1013 set_field(data->e3, new_e3);
1014}
1015
1016/** Clone this message.
1017 * Produces a message of the same type as this message and copies the
1018 * data to the new message.
1019 * @return clone of this message
1020 */
1021Message *
1023{
1024 return new JacoInterface::CartesianGotoMessage(this);
1025}
1026/** @class JacoInterface::AngularGotoMessage <interfaces/JacoInterface.h>
1027 * AngularGotoMessage Fawkes BlackBoard Interface Message.
1028 *
1029
1030 */
1031
1032
1033/** Constructor with initial values.
1034 * @param ini_j1 initial value for j1
1035 * @param ini_j2 initial value for j2
1036 * @param ini_j3 initial value for j3
1037 * @param ini_j4 initial value for j4
1038 * @param ini_j5 initial value for j5
1039 * @param ini_j6 initial value for j6
1040 */
1041JacoInterface::AngularGotoMessage::AngularGotoMessage(const float ini_j1, const float ini_j2, const float ini_j3, const float ini_j4, const float ini_j5, const float ini_j6) : Message("AngularGotoMessage")
1042{
1043 data_size = sizeof(AngularGotoMessage_data_t);
1044 data_ptr = malloc(data_size);
1045 memset(data_ptr, 0, data_size);
1046 data = (AngularGotoMessage_data_t *)data_ptr;
1048 data->j1 = ini_j1;
1049 data->j2 = ini_j2;
1050 data->j3 = ini_j3;
1051 data->j4 = ini_j4;
1052 data->j5 = ini_j5;
1053 data->j6 = ini_j6;
1054 add_fieldinfo(IFT_FLOAT, "j1", 1, &data->j1);
1055 add_fieldinfo(IFT_FLOAT, "j2", 1, &data->j2);
1056 add_fieldinfo(IFT_FLOAT, "j3", 1, &data->j3);
1057 add_fieldinfo(IFT_FLOAT, "j4", 1, &data->j4);
1058 add_fieldinfo(IFT_FLOAT, "j5", 1, &data->j5);
1059 add_fieldinfo(IFT_FLOAT, "j6", 1, &data->j6);
1060}
1061/** Constructor */
1063{
1064 data_size = sizeof(AngularGotoMessage_data_t);
1065 data_ptr = malloc(data_size);
1066 memset(data_ptr, 0, data_size);
1067 data = (AngularGotoMessage_data_t *)data_ptr;
1069 add_fieldinfo(IFT_FLOAT, "j1", 1, &data->j1);
1070 add_fieldinfo(IFT_FLOAT, "j2", 1, &data->j2);
1071 add_fieldinfo(IFT_FLOAT, "j3", 1, &data->j3);
1072 add_fieldinfo(IFT_FLOAT, "j4", 1, &data->j4);
1073 add_fieldinfo(IFT_FLOAT, "j5", 1, &data->j5);
1074 add_fieldinfo(IFT_FLOAT, "j6", 1, &data->j6);
1075}
1076
1077/** Destructor */
1079{
1080 free(data_ptr);
1081}
1082
1083/** Copy constructor.
1084 * @param m message to copy from
1085 */
1087{
1088 data_size = m->data_size;
1089 data_ptr = malloc(data_size);
1090 memcpy(data_ptr, m->data_ptr, data_size);
1091 data = (AngularGotoMessage_data_t *)data_ptr;
1093}
1094
1095/* Methods */
1096/** Get j1 value.
1097 * Angular value of 1st joint
1098 * @return j1 value
1099 */
1100float
1102{
1103 return data->j1;
1104}
1105
1106/** Get maximum length of j1 value.
1107 * @return length of j1 value, can be length of the array or number of
1108 * maximum number of characters for a string
1109 */
1110size_t
1112{
1113 return 1;
1114}
1115
1116/** Set j1 value.
1117 * Angular value of 1st joint
1118 * @param new_j1 new j1 value
1119 */
1120void
1122{
1123 set_field(data->j1, new_j1);
1124}
1125
1126/** Get j2 value.
1127 * Angular value of 2nd joint
1128 * @return j2 value
1129 */
1130float
1132{
1133 return data->j2;
1134}
1135
1136/** Get maximum length of j2 value.
1137 * @return length of j2 value, can be length of the array or number of
1138 * maximum number of characters for a string
1139 */
1140size_t
1142{
1143 return 1;
1144}
1145
1146/** Set j2 value.
1147 * Angular value of 2nd joint
1148 * @param new_j2 new j2 value
1149 */
1150void
1152{
1153 set_field(data->j2, new_j2);
1154}
1155
1156/** Get j3 value.
1157 * Angular value of 3rd joint
1158 * @return j3 value
1159 */
1160float
1162{
1163 return data->j3;
1164}
1165
1166/** Get maximum length of j3 value.
1167 * @return length of j3 value, can be length of the array or number of
1168 * maximum number of characters for a string
1169 */
1170size_t
1172{
1173 return 1;
1174}
1175
1176/** Set j3 value.
1177 * Angular value of 3rd joint
1178 * @param new_j3 new j3 value
1179 */
1180void
1182{
1183 set_field(data->j3, new_j3);
1184}
1185
1186/** Get j4 value.
1187 * Angular value of 4th joint
1188 * @return j4 value
1189 */
1190float
1192{
1193 return data->j4;
1194}
1195
1196/** Get maximum length of j4 value.
1197 * @return length of j4 value, can be length of the array or number of
1198 * maximum number of characters for a string
1199 */
1200size_t
1202{
1203 return 1;
1204}
1205
1206/** Set j4 value.
1207 * Angular value of 4th joint
1208 * @param new_j4 new j4 value
1209 */
1210void
1212{
1213 set_field(data->j4, new_j4);
1214}
1215
1216/** Get j5 value.
1217 * Angular value of 5th joint
1218 * @return j5 value
1219 */
1220float
1222{
1223 return data->j5;
1224}
1225
1226/** Get maximum length of j5 value.
1227 * @return length of j5 value, can be length of the array or number of
1228 * maximum number of characters for a string
1229 */
1230size_t
1232{
1233 return 1;
1234}
1235
1236/** Set j5 value.
1237 * Angular value of 5th joint
1238 * @param new_j5 new j5 value
1239 */
1240void
1242{
1243 set_field(data->j5, new_j5);
1244}
1245
1246/** Get j6 value.
1247 * Angular value of 6th joint
1248 * @return j6 value
1249 */
1250float
1252{
1253 return data->j6;
1254}
1255
1256/** Get maximum length of j6 value.
1257 * @return length of j6 value, can be length of the array or number of
1258 * maximum number of characters for a string
1259 */
1260size_t
1262{
1263 return 1;
1264}
1265
1266/** Set j6 value.
1267 * Angular value of 6th joint
1268 * @param new_j6 new j6 value
1269 */
1270void
1272{
1273 set_field(data->j6, new_j6);
1274}
1275
1276/** Clone this message.
1277 * Produces a message of the same type as this message and copies the
1278 * data to the new message.
1279 * @return clone of this message
1280 */
1281Message *
1283{
1284 return new JacoInterface::AngularGotoMessage(this);
1285}
1286/** @class JacoInterface::MoveGripperMessage <interfaces/JacoInterface.h>
1287 * MoveGripperMessage Fawkes BlackBoard Interface Message.
1288 *
1289
1290 */
1291
1292
1293/** Constructor with initial values.
1294 * @param ini_finger1 initial value for finger1
1295 * @param ini_finger2 initial value for finger2
1296 * @param ini_finger3 initial value for finger3
1297 */
1298JacoInterface::MoveGripperMessage::MoveGripperMessage(const float ini_finger1, const float ini_finger2, const float ini_finger3) : Message("MoveGripperMessage")
1299{
1300 data_size = sizeof(MoveGripperMessage_data_t);
1301 data_ptr = malloc(data_size);
1302 memset(data_ptr, 0, data_size);
1303 data = (MoveGripperMessage_data_t *)data_ptr;
1305 data->finger1 = ini_finger1;
1306 data->finger2 = ini_finger2;
1307 data->finger3 = ini_finger3;
1308 add_fieldinfo(IFT_FLOAT, "finger1", 1, &data->finger1);
1309 add_fieldinfo(IFT_FLOAT, "finger2", 1, &data->finger2);
1310 add_fieldinfo(IFT_FLOAT, "finger3", 1, &data->finger3);
1311}
1312/** Constructor */
1314{
1315 data_size = sizeof(MoveGripperMessage_data_t);
1316 data_ptr = malloc(data_size);
1317 memset(data_ptr, 0, data_size);
1318 data = (MoveGripperMessage_data_t *)data_ptr;
1320 add_fieldinfo(IFT_FLOAT, "finger1", 1, &data->finger1);
1321 add_fieldinfo(IFT_FLOAT, "finger2", 1, &data->finger2);
1322 add_fieldinfo(IFT_FLOAT, "finger3", 1, &data->finger3);
1323}
1324
1325/** Destructor */
1327{
1328 free(data_ptr);
1329}
1330
1331/** Copy constructor.
1332 * @param m message to copy from
1333 */
1335{
1336 data_size = m->data_size;
1337 data_ptr = malloc(data_size);
1338 memcpy(data_ptr, m->data_ptr, data_size);
1339 data = (MoveGripperMessage_data_t *)data_ptr;
1341}
1342
1343/* Methods */
1344/** Get finger1 value.
1345 * Value of finger 1. Range [0,60]
1346 * @return finger1 value
1347 */
1348float
1350{
1351 return data->finger1;
1352}
1353
1354/** Get maximum length of finger1 value.
1355 * @return length of finger1 value, can be length of the array or number of
1356 * maximum number of characters for a string
1357 */
1358size_t
1360{
1361 return 1;
1362}
1363
1364/** Set finger1 value.
1365 * Value of finger 1. Range [0,60]
1366 * @param new_finger1 new finger1 value
1367 */
1368void
1370{
1371 set_field(data->finger1, new_finger1);
1372}
1373
1374/** Get finger2 value.
1375 * Value of finger 2. Range [0,60]
1376 * @return finger2 value
1377 */
1378float
1380{
1381 return data->finger2;
1382}
1383
1384/** Get maximum length of finger2 value.
1385 * @return length of finger2 value, can be length of the array or number of
1386 * maximum number of characters for a string
1387 */
1388size_t
1390{
1391 return 1;
1392}
1393
1394/** Set finger2 value.
1395 * Value of finger 2. Range [0,60]
1396 * @param new_finger2 new finger2 value
1397 */
1398void
1400{
1401 set_field(data->finger2, new_finger2);
1402}
1403
1404/** Get finger3 value.
1405 * Value of finger 3. Range [0,60]
1406 * @return finger3 value
1407 */
1408float
1410{
1411 return data->finger3;
1412}
1413
1414/** Get maximum length of finger3 value.
1415 * @return length of finger3 value, can be length of the array or number of
1416 * maximum number of characters for a string
1417 */
1418size_t
1420{
1421 return 1;
1422}
1423
1424/** Set finger3 value.
1425 * Value of finger 3. Range [0,60]
1426 * @param new_finger3 new finger3 value
1427 */
1428void
1430{
1431 set_field(data->finger3, new_finger3);
1432}
1433
1434/** Clone this message.
1435 * Produces a message of the same type as this message and copies the
1436 * data to the new message.
1437 * @return clone of this message
1438 */
1439Message *
1441{
1442 return new JacoInterface::MoveGripperMessage(this);
1443}
1444/** @class JacoInterface::SetPlannerParamsMessage <interfaces/JacoInterface.h>
1445 * SetPlannerParamsMessage Fawkes BlackBoard Interface Message.
1446 *
1447
1448 */
1449
1450
1451/** Constructor with initial values.
1452 * @param ini_params initial value for params
1453 */
1454JacoInterface::SetPlannerParamsMessage::SetPlannerParamsMessage(const char * ini_params) : Message("SetPlannerParamsMessage")
1455{
1456 data_size = sizeof(SetPlannerParamsMessage_data_t);
1457 data_ptr = malloc(data_size);
1458 memset(data_ptr, 0, data_size);
1459 data = (SetPlannerParamsMessage_data_t *)data_ptr;
1461 strncpy(data->params, ini_params, 1024-1);
1462 data->params[1024-1] = 0;
1463 add_fieldinfo(IFT_STRING, "params", 1024, data->params);
1464}
1465/** Constructor */
1467{
1468 data_size = sizeof(SetPlannerParamsMessage_data_t);
1469 data_ptr = malloc(data_size);
1470 memset(data_ptr, 0, data_size);
1471 data = (SetPlannerParamsMessage_data_t *)data_ptr;
1473 add_fieldinfo(IFT_STRING, "params", 1024, data->params);
1474}
1475
1476/** Destructor */
1478{
1479 free(data_ptr);
1480}
1481
1482/** Copy constructor.
1483 * @param m message to copy from
1484 */
1486{
1487 data_size = m->data_size;
1488 data_ptr = malloc(data_size);
1489 memcpy(data_ptr, m->data_ptr, data_size);
1490 data = (SetPlannerParamsMessage_data_t *)data_ptr;
1492}
1493
1494/* Methods */
1495/** Get params value.
1496 * Planner parameters
1497 * @return params value
1498 */
1499char *
1501{
1502 return data->params;
1503}
1504
1505/** Get maximum length of params value.
1506 * @return length of params value, can be length of the array or number of
1507 * maximum number of characters for a string
1508 */
1509size_t
1511{
1512 return 1024;
1513}
1514
1515/** Set params value.
1516 * Planner parameters
1517 * @param new_params new params value
1518 */
1519void
1521{
1522 set_field(data->params, new_params);
1523}
1524
1525/** Clone this message.
1526 * Produces a message of the same type as this message and copies the
1527 * data to the new message.
1528 * @return clone of this message
1529 */
1530Message *
1532{
1534}
1535/** @class JacoInterface::JoystickPushMessage <interfaces/JacoInterface.h>
1536 * JoystickPushMessage Fawkes BlackBoard Interface Message.
1537 *
1538
1539 */
1540
1541
1542/** Constructor with initial values.
1543 * @param ini_button initial value for button
1544 */
1545JacoInterface::JoystickPushMessage::JoystickPushMessage(const uint32_t ini_button) : Message("JoystickPushMessage")
1546{
1547 data_size = sizeof(JoystickPushMessage_data_t);
1548 data_ptr = malloc(data_size);
1549 memset(data_ptr, 0, data_size);
1550 data = (JoystickPushMessage_data_t *)data_ptr;
1552 data->button = ini_button;
1553 add_fieldinfo(IFT_UINT32, "button", 1, &data->button);
1554}
1555/** Constructor */
1557{
1558 data_size = sizeof(JoystickPushMessage_data_t);
1559 data_ptr = malloc(data_size);
1560 memset(data_ptr, 0, data_size);
1561 data = (JoystickPushMessage_data_t *)data_ptr;
1563 add_fieldinfo(IFT_UINT32, "button", 1, &data->button);
1564}
1565
1566/** Destructor */
1568{
1569 free(data_ptr);
1570}
1571
1572/** Copy constructor.
1573 * @param m message to copy from
1574 */
1576{
1577 data_size = m->data_size;
1578 data_ptr = malloc(data_size);
1579 memcpy(data_ptr, m->data_ptr, data_size);
1580 data = (JoystickPushMessage_data_t *)data_ptr;
1582}
1583
1584/* Methods */
1585/** Get button value.
1586 * Button ID to push.
1587 * @return button value
1588 */
1589uint32_t
1591{
1592 return data->button;
1593}
1594
1595/** Get maximum length of button value.
1596 * @return length of button value, can be length of the array or number of
1597 * maximum number of characters for a string
1598 */
1599size_t
1601{
1602 return 1;
1603}
1604
1605/** Set button value.
1606 * Button ID to push.
1607 * @param new_button new button value
1608 */
1609void
1611{
1612 set_field(data->button, new_button);
1613}
1614
1615/** Clone this message.
1616 * Produces a message of the same type as this message and copies the
1617 * data to the new message.
1618 * @return clone of this message
1619 */
1620Message *
1622{
1623 return new JacoInterface::JoystickPushMessage(this);
1624}
1625/** @class JacoInterface::JoystickReleaseMessage <interfaces/JacoInterface.h>
1626 * JoystickReleaseMessage Fawkes BlackBoard Interface Message.
1627 *
1628
1629 */
1630
1631
1632/** Constructor */
1634{
1635 data_size = sizeof(JoystickReleaseMessage_data_t);
1636 data_ptr = malloc(data_size);
1637 memset(data_ptr, 0, data_size);
1638 data = (JoystickReleaseMessage_data_t *)data_ptr;
1640}
1641
1642/** Destructor */
1644{
1645 free(data_ptr);
1646}
1647
1648/** Copy constructor.
1649 * @param m message to copy from
1650 */
1652{
1653 data_size = m->data_size;
1654 data_ptr = malloc(data_size);
1655 memcpy(data_ptr, m->data_ptr, data_size);
1656 data = (JoystickReleaseMessage_data_t *)data_ptr;
1658}
1659
1660/* Methods */
1661/** Clone this message.
1662 * Produces a message of the same type as this message and copies the
1663 * data to the new message.
1664 * @return clone of this message
1665 */
1666Message *
1668{
1670}
1671/** Check if message is valid and can be enqueued.
1672 * @param message Message to check
1673 * @return true if the message is valid, false otherwise.
1674 */
1675bool
1677{
1678 const CalibrateMessage *m0 = dynamic_cast<const CalibrateMessage *>(message);
1679 if ( m0 != NULL ) {
1680 return true;
1681 }
1682 const RetractMessage *m1 = dynamic_cast<const RetractMessage *>(message);
1683 if ( m1 != NULL ) {
1684 return true;
1685 }
1686 const StopMessage *m2 = dynamic_cast<const StopMessage *>(message);
1687 if ( m2 != NULL ) {
1688 return true;
1689 }
1690 const CartesianGotoMessage *m3 = dynamic_cast<const CartesianGotoMessage *>(message);
1691 if ( m3 != NULL ) {
1692 return true;
1693 }
1694 const AngularGotoMessage *m4 = dynamic_cast<const AngularGotoMessage *>(message);
1695 if ( m4 != NULL ) {
1696 return true;
1697 }
1698 const MoveGripperMessage *m5 = dynamic_cast<const MoveGripperMessage *>(message);
1699 if ( m5 != NULL ) {
1700 return true;
1701 }
1702 const SetPlannerParamsMessage *m6 = dynamic_cast<const SetPlannerParamsMessage *>(message);
1703 if ( m6 != NULL ) {
1704 return true;
1705 }
1706 const JoystickPushMessage *m7 = dynamic_cast<const JoystickPushMessage *>(message);
1707 if ( m7 != NULL ) {
1708 return true;
1709 }
1710 const JoystickReleaseMessage *m8 = dynamic_cast<const JoystickReleaseMessage *>(message);
1711 if ( m8 != NULL ) {
1712 return true;
1713 }
1714 return false;
1715}
1716
1717/// @cond INTERNALS
1718EXPORT_INTERFACE(JacoInterface)
1719/// @endcond
1720
1721
1722} // end namespace fawkes
Base class for exceptions in Fawkes.
Definition: exception.h:36
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:80
const char * type() const
Get type of interface.
Definition: interface.cpp:652
void * data_ptr
Pointer to local memory storage.
Definition: interface.h:244
void set_field(FieldT &field, DataT &data)
Set a field, set data_changed to true and update data_changed accordingly.
Definition: interface.h:304
AngularGotoMessage Fawkes BlackBoard Interface Message.
void set_j3(const float new_j3)
Set j3 value.
size_t maxlenof_j6() const
Get maximum length of j6 value.
void set_j5(const float new_j5)
Set j5 value.
void set_j1(const float new_j1)
Set j1 value.
void set_j6(const float new_j6)
Set j6 value.
size_t maxlenof_j2() const
Get maximum length of j2 value.
void set_j2(const float new_j2)
Set j2 value.
size_t maxlenof_j3() const
Get maximum length of j3 value.
size_t maxlenof_j1() const
Get maximum length of j1 value.
virtual Message * clone() const
Clone this message.
void set_j4(const float new_j4)
Set j4 value.
size_t maxlenof_j4() const
Get maximum length of j4 value.
size_t maxlenof_j5() const
Get maximum length of j5 value.
CalibrateMessage Fawkes BlackBoard Interface Message.
Definition: JacoInterface.h:76
virtual Message * clone() const
Clone this message.
CartesianGotoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_e2() const
Get maximum length of e2 value.
size_t maxlenof_z() const
Get maximum length of z value.
size_t maxlenof_x() const
Get maximum length of x value.
size_t maxlenof_e1() const
Get maximum length of e1 value.
void set_e1(const float new_e1)
Set e1 value.
void set_x(const float new_x)
Set x value.
void set_e2(const float new_e2)
Set e2 value.
virtual Message * clone() const
Clone this message.
void set_e3(const float new_e3)
Set e3 value.
void set_y(const float new_y)
Set y value.
size_t maxlenof_e3() const
Get maximum length of e3 value.
void set_z(const float new_z)
Set z value.
JoystickPushMessage Fawkes BlackBoard Interface Message.
void set_button(const uint32_t new_button)
Set button value.
uint32_t button() const
Get button value.
size_t maxlenof_button() const
Get maximum length of button value.
virtual Message * clone() const
Clone this message.
JoystickReleaseMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
MoveGripperMessage Fawkes BlackBoard Interface Message.
float finger1() const
Get finger1 value.
size_t maxlenof_finger1() const
Get maximum length of finger1 value.
virtual Message * clone() const
Clone this message.
void set_finger3(const float new_finger3)
Set finger3 value.
size_t maxlenof_finger2() const
Get maximum length of finger2 value.
void set_finger2(const float new_finger2)
Set finger2 value.
float finger3() const
Get finger3 value.
size_t maxlenof_finger3() const
Get maximum length of finger3 value.
void set_finger1(const float new_finger1)
Set finger1 value.
float finger2() const
Get finger2 value.
RetractMessage Fawkes BlackBoard Interface Message.
Definition: JacoInterface.h:96
virtual Message * clone() const
Clone this message.
SetPlannerParamsMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_params() const
Get maximum length of params value.
void set_params(const char *new_params)
Set params value.
virtual Message * clone() const
Clone this message.
StopMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
JacoInterface Fawkes BlackBoard Interface.
Definition: JacoInterface.h:34
static const uint32_t ERROR_NONE
ERROR_NONE constant.
Definition: JacoInterface.h:40
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
static const uint32_t ERROR_NO_IK
ERROR_NO_IK constant.
Definition: JacoInterface.h:42
static const uint32_t ERROR_UNSPECIFIC
ERROR_UNSPECIFIC constant.
Definition: JacoInterface.h:41
static const uint32_t ERROR_PLANNING
ERROR_PLANNING constant.
Definition: JacoInterface.h:43
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
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:435
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:146
message_data_ts_t * data_ts
data timestamp aliasing pointer
Definition: message.h:156
unsigned int data_size
Size of memory needed to hold all data.
Definition: message.h:147
Fawkes library namespace.
@ IFT_UINT32
32 bit unsigned integer field
Definition: types.h:43
@ IFT_FLOAT
float field
Definition: types.h:46
@ IFT_STRING
string field
Definition: types.h:48
Timestamp data, must be present and first entries for each interface data structs!...
Definition: message.h:152