Fawkes API  Fawkes Development Version
NavGraphGeneratorInterface.cpp
1 
2 /***************************************************************************
3  * NavGraphGeneratorInterface.cpp - Fawkes BlackBoard Interface - NavGraphGeneratorInterface
4  *
5  * Templated created: Thu Oct 12 10:49:19 2006
6  * Copyright 2015 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/NavGraphGeneratorInterface.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 NavGraphGeneratorInterface <interfaces/NavGraphGeneratorInterface.h>
36  * NavGraphGeneratorInterface Fawkes BlackBoard Interface.
37  *
38  This interfaces is used to instruct the navgraph-generator.
39  It allows to add obstacles and points of interest and perform
40  a computation run of the graph generation.
41 
42  Operations to modify the parameters (clearing, adding/removing
43  obstacles or points of interest etc.) take effect only once a
44  ComputeMessage is sent. This can be used, for example, to first
45  clear the graph, update it with the latest information, and
46  finally generate the graph.
47 
48  As soon as any instruction has been received, the generato shall
49  only listen to messages from the same sender. Only after a
50  computation has been performed can another node send messages
51  again.
52 
53  * @ingroup FawkesInterfaces
54  */
55 
56 
57 
58 /** Constructor */
59 NavGraphGeneratorInterface::NavGraphGeneratorInterface() : Interface()
60 {
61  data_size = sizeof(NavGraphGeneratorInterface_data_t);
62  data_ptr = malloc(data_size);
63  data = (NavGraphGeneratorInterface_data_t *)data_ptr;
64  data_ts = (interface_data_ts_t *)data_ptr;
65  memset(data_ptr, 0, data_size);
66  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
67  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
68  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
69  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
70  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
71  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
72  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
73  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
74  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
75  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
76  enum_map_EdgeMode[(int)FORCE] = "FORCE";
77  add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
78  add_fieldinfo(IFT_BOOL, "final", 1, &data->final);
79  add_messageinfo("ClearMessage");
80  add_messageinfo("SetBoundingBoxMessage");
81  add_messageinfo("SetFilterMessage");
82  add_messageinfo("SetFilterParamFloatMessage");
83  add_messageinfo("AddMapObstaclesMessage");
84  add_messageinfo("AddObstacleMessage");
85  add_messageinfo("RemoveObstacleMessage");
86  add_messageinfo("AddPointOfInterestMessage");
87  add_messageinfo("AddPointOfInterestWithOriMessage");
88  add_messageinfo("SetPointOfInterestPropertyMessage");
89  add_messageinfo("AddEdgeMessage");
90  add_messageinfo("SetGraphDefaultPropertyMessage");
91  add_messageinfo("SetCopyGraphDefaultPropertiesMessage");
92  add_messageinfo("RemovePointOfInterestMessage");
93  add_messageinfo("ComputeMessage");
94  unsigned char tmp_hash[] = {0x5e, 0xdf, 0x82, 0xa5, 0x9f, 0x36, 0xc2, 0xb5, 0x43, 0xba, 0xb6, 0x5, 0x12, 0xf4, 0x9c, 0xd};
95  set_hash(tmp_hash);
96 }
97 
98 /** Destructor */
99 NavGraphGeneratorInterface::~NavGraphGeneratorInterface()
100 {
101  free(data_ptr);
102 }
103 /** Convert ConnectionMode constant to string.
104  * @param value value to convert to string
105  * @return constant value as string.
106  */
107 const char *
108 NavGraphGeneratorInterface::tostring_ConnectionMode(ConnectionMode value) const
109 {
110  switch (value) {
111  case NOT_CONNECTED: return "NOT_CONNECTED";
112  case UNCONNECTED: return "UNCONNECTED";
113  case CLOSEST_NODE: return "CLOSEST_NODE";
114  case CLOSEST_EDGE: return "CLOSEST_EDGE";
115  case CLOSEST_EDGE_OR_NODE: return "CLOSEST_EDGE_OR_NODE";
116  default: return "UNKNOWN";
117  }
118 }
119 /** Convert FilterType constant to string.
120  * @param value value to convert to string
121  * @return constant value as string.
122  */
123 const char *
124 NavGraphGeneratorInterface::tostring_FilterType(FilterType value) const
125 {
126  switch (value) {
127  case FILTER_EDGES_BY_MAP: return "FILTER_EDGES_BY_MAP";
128  case FILTER_ORPHAN_NODES: return "FILTER_ORPHAN_NODES";
129  case FILTER_MULTI_GRAPH: return "FILTER_MULTI_GRAPH";
130  default: return "UNKNOWN";
131  }
132 }
133 /** Convert EdgeMode constant to string.
134  * @param value value to convert to string
135  * @return constant value as string.
136  */
137 const char *
138 NavGraphGeneratorInterface::tostring_EdgeMode(EdgeMode value) const
139 {
140  switch (value) {
141  case NO_INTERSECTION: return "NO_INTERSECTION";
142  case SPLIT_INTERSECTION: return "SPLIT_INTERSECTION";
143  case FORCE: return "FORCE";
144  default: return "UNKNOWN";
145  }
146 }
147 /* Methods */
148 /** Get msgid value.
149  *
150  The ID of the message that is currently being processed or
151  was processed last.
152 
153  * @return msgid value
154  */
155 uint32_t
156 NavGraphGeneratorInterface::msgid() const
157 {
158  return data->msgid;
159 }
160 
161 /** Get maximum length of msgid value.
162  * @return length of msgid value, can be length of the array or number of
163  * maximum number of characters for a string
164  */
165 size_t
166 NavGraphGeneratorInterface::maxlenof_msgid() const
167 {
168  return 1;
169 }
170 
171 /** Set msgid value.
172  *
173  The ID of the message that is currently being processed or
174  was processed last.
175 
176  * @param new_msgid new msgid value
177  */
178 void
179 NavGraphGeneratorInterface::set_msgid(const uint32_t new_msgid)
180 {
181  data->msgid = new_msgid;
182  data_changed = true;
183 }
184 
185 /** Get final value.
186  *
187  True, if the last generation triggered by a ComputeMessage has
188  been completed, false if it is still running. Also check the
189  msgid field if this field applies to the correct message.
190 
191  * @return final value
192  */
193 bool
194 NavGraphGeneratorInterface::is_final() const
195 {
196  return data->final;
197 }
198 
199 /** Get maximum length of final value.
200  * @return length of final value, can be length of the array or number of
201  * maximum number of characters for a string
202  */
203 size_t
204 NavGraphGeneratorInterface::maxlenof_final() const
205 {
206  return 1;
207 }
208 
209 /** Set final value.
210  *
211  True, if the last generation triggered by a ComputeMessage has
212  been completed, false if it is still running. Also check the
213  msgid field if this field applies to the correct message.
214 
215  * @param new_final new final value
216  */
217 void
218 NavGraphGeneratorInterface::set_final(const bool new_final)
219 {
220  data->final = new_final;
221  data_changed = true;
222 }
223 
224 /* =========== message create =========== */
225 Message *
226 NavGraphGeneratorInterface::create_message(const char *type) const
227 {
228  if ( strncmp("ClearMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
229  return new ClearMessage();
230  } else if ( strncmp("SetBoundingBoxMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
231  return new SetBoundingBoxMessage();
232  } else if ( strncmp("SetFilterMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
233  return new SetFilterMessage();
234  } else if ( strncmp("SetFilterParamFloatMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
235  return new SetFilterParamFloatMessage();
236  } else if ( strncmp("AddMapObstaclesMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
237  return new AddMapObstaclesMessage();
238  } else if ( strncmp("AddObstacleMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
239  return new AddObstacleMessage();
240  } else if ( strncmp("RemoveObstacleMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
241  return new RemoveObstacleMessage();
242  } else if ( strncmp("AddPointOfInterestMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
243  return new AddPointOfInterestMessage();
244  } else if ( strncmp("AddPointOfInterestWithOriMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
246  } else if ( strncmp("SetPointOfInterestPropertyMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
248  } else if ( strncmp("AddEdgeMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
249  return new AddEdgeMessage();
250  } else if ( strncmp("SetGraphDefaultPropertyMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
251  return new SetGraphDefaultPropertyMessage();
252  } else if ( strncmp("SetCopyGraphDefaultPropertiesMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
254  } else if ( strncmp("RemovePointOfInterestMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
255  return new RemovePointOfInterestMessage();
256  } else if ( strncmp("ComputeMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
257  return new ComputeMessage();
258  } else {
259  throw UnknownTypeException("The given type '%s' does not match any known "
260  "message type for this interface type.", type);
261  }
262 }
263 
264 
265 /** Copy values from other interface.
266  * @param other other interface to copy values from
267  */
268 void
269 NavGraphGeneratorInterface::copy_values(const Interface *other)
270 {
271  const NavGraphGeneratorInterface *oi = dynamic_cast<const NavGraphGeneratorInterface *>(other);
272  if (oi == NULL) {
273  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
274  type(), other->type());
275  }
276  memcpy(data, oi->data, sizeof(NavGraphGeneratorInterface_data_t));
277 }
278 
279 const char *
280 NavGraphGeneratorInterface::enum_tostring(const char *enumtype, int val) const
281 {
282  if (strcmp(enumtype, "ConnectionMode") == 0) {
283  return tostring_ConnectionMode((ConnectionMode)val);
284  }
285  if (strcmp(enumtype, "FilterType") == 0) {
286  return tostring_FilterType((FilterType)val);
287  }
288  if (strcmp(enumtype, "EdgeMode") == 0) {
289  return tostring_EdgeMode((EdgeMode)val);
290  }
291  throw UnknownTypeException("Unknown enum type %s", enumtype);
292 }
293 
294 /* =========== messages =========== */
295 /** @class NavGraphGeneratorInterface::ClearMessage <interfaces/NavGraphGeneratorInterface.h>
296  * ClearMessage Fawkes BlackBoard Interface Message.
297  *
298 
299  */
300 
301 
302 /** Constructor */
303 NavGraphGeneratorInterface::ClearMessage::ClearMessage() : Message("ClearMessage")
304 {
305  data_size = sizeof(ClearMessage_data_t);
306  data_ptr = malloc(data_size);
307  memset(data_ptr, 0, data_size);
308  data = (ClearMessage_data_t *)data_ptr;
310  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
311  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
312  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
313  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
314  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
315  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
316  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
317  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
318  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
319  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
320  enum_map_EdgeMode[(int)FORCE] = "FORCE";
321 }
322 
323 /** Destructor */
325 {
326  free(data_ptr);
327 }
328 
329 /** Copy constructor.
330  * @param m message to copy from
331  */
333 {
334  data_size = m->data_size;
335  data_ptr = malloc(data_size);
336  memcpy(data_ptr, m->data_ptr, data_size);
337  data = (ClearMessage_data_t *)data_ptr;
339 }
340 
341 /* Methods */
342 /** Clone this message.
343  * Produces a message of the same type as this message and copies the
344  * data to the new message.
345  * @return clone of this message
346  */
347 Message *
349 {
351 }
352 /** @class NavGraphGeneratorInterface::SetBoundingBoxMessage <interfaces/NavGraphGeneratorInterface.h>
353  * SetBoundingBoxMessage Fawkes BlackBoard Interface Message.
354  *
355 
356  */
357 
358 
359 /** Constructor with initial values.
360  * @param ini_p1_x initial value for p1_x
361  * @param ini_p1_y initial value for p1_y
362  * @param ini_p2_x initial value for p2_x
363  * @param ini_p2_y initial value for p2_y
364  */
365 NavGraphGeneratorInterface::SetBoundingBoxMessage::SetBoundingBoxMessage(const float ini_p1_x, const float ini_p1_y, const float ini_p2_x, const float ini_p2_y) : Message("SetBoundingBoxMessage")
366 {
367  data_size = sizeof(SetBoundingBoxMessage_data_t);
368  data_ptr = malloc(data_size);
369  memset(data_ptr, 0, data_size);
370  data = (SetBoundingBoxMessage_data_t *)data_ptr;
372  data->p1_x = ini_p1_x;
373  data->p1_y = ini_p1_y;
374  data->p2_x = ini_p2_x;
375  data->p2_y = ini_p2_y;
376  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
377  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
378  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
379  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
380  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
381  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
382  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
383  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
384  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
385  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
386  enum_map_EdgeMode[(int)FORCE] = "FORCE";
387  add_fieldinfo(IFT_FLOAT, "p1_x", 1, &data->p1_x);
388  add_fieldinfo(IFT_FLOAT, "p1_y", 1, &data->p1_y);
389  add_fieldinfo(IFT_FLOAT, "p2_x", 1, &data->p2_x);
390  add_fieldinfo(IFT_FLOAT, "p2_y", 1, &data->p2_y);
391 }
392 /** Constructor */
394 {
395  data_size = sizeof(SetBoundingBoxMessage_data_t);
396  data_ptr = malloc(data_size);
397  memset(data_ptr, 0, data_size);
398  data = (SetBoundingBoxMessage_data_t *)data_ptr;
400  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
401  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
402  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
403  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
404  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
405  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
406  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
407  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
408  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
409  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
410  enum_map_EdgeMode[(int)FORCE] = "FORCE";
411  add_fieldinfo(IFT_FLOAT, "p1_x", 1, &data->p1_x);
412  add_fieldinfo(IFT_FLOAT, "p1_y", 1, &data->p1_y);
413  add_fieldinfo(IFT_FLOAT, "p2_x", 1, &data->p2_x);
414  add_fieldinfo(IFT_FLOAT, "p2_y", 1, &data->p2_y);
415 }
416 
417 /** Destructor */
419 {
420  free(data_ptr);
421 }
422 
423 /** Copy constructor.
424  * @param m message to copy from
425  */
427 {
428  data_size = m->data_size;
429  data_ptr = malloc(data_size);
430  memcpy(data_ptr, m->data_ptr, data_size);
431  data = (SetBoundingBoxMessage_data_t *)data_ptr;
433 }
434 
435 /* Methods */
436 /** Get p1_x value.
437  * X coordinate of bbox start point in global frame.
438  * @return p1_x value
439  */
440 float
442 {
443  return data->p1_x;
444 }
445 
446 /** Get maximum length of p1_x value.
447  * @return length of p1_x value, can be length of the array or number of
448  * maximum number of characters for a string
449  */
450 size_t
452 {
453  return 1;
454 }
455 
456 /** Set p1_x value.
457  * X coordinate of bbox start point in global frame.
458  * @param new_p1_x new p1_x value
459  */
460 void
462 {
463  data->p1_x = new_p1_x;
464 }
465 
466 /** Get p1_y value.
467  * Y coordinate of bbox start point in global frame.
468  * @return p1_y value
469  */
470 float
472 {
473  return data->p1_y;
474 }
475 
476 /** Get maximum length of p1_y value.
477  * @return length of p1_y value, can be length of the array or number of
478  * maximum number of characters for a string
479  */
480 size_t
482 {
483  return 1;
484 }
485 
486 /** Set p1_y value.
487  * Y coordinate of bbox start point in global frame.
488  * @param new_p1_y new p1_y value
489  */
490 void
492 {
493  data->p1_y = new_p1_y;
494 }
495 
496 /** Get p2_x value.
497  * X coordinate of bbox end point in global frame.
498  * @return p2_x value
499  */
500 float
502 {
503  return data->p2_x;
504 }
505 
506 /** Get maximum length of p2_x value.
507  * @return length of p2_x value, can be length of the array or number of
508  * maximum number of characters for a string
509  */
510 size_t
512 {
513  return 1;
514 }
515 
516 /** Set p2_x value.
517  * X coordinate of bbox end point in global frame.
518  * @param new_p2_x new p2_x value
519  */
520 void
522 {
523  data->p2_x = new_p2_x;
524 }
525 
526 /** Get p2_y value.
527  * Y coordinate of bbox end point in global frame.
528  * @return p2_y value
529  */
530 float
532 {
533  return data->p2_y;
534 }
535 
536 /** Get maximum length of p2_y value.
537  * @return length of p2_y value, can be length of the array or number of
538  * maximum number of characters for a string
539  */
540 size_t
542 {
543  return 1;
544 }
545 
546 /** Set p2_y value.
547  * Y coordinate of bbox end point in global frame.
548  * @param new_p2_y new p2_y value
549  */
550 void
552 {
553  data->p2_y = new_p2_y;
554 }
555 
556 /** Clone this message.
557  * Produces a message of the same type as this message and copies the
558  * data to the new message.
559  * @return clone of this message
560  */
561 Message *
563 {
565 }
566 /** @class NavGraphGeneratorInterface::SetFilterMessage <interfaces/NavGraphGeneratorInterface.h>
567  * SetFilterMessage Fawkes BlackBoard Interface Message.
568  *
569 
570  */
571 
572 
573 /** Constructor with initial values.
574  * @param ini_filter initial value for filter
575  * @param ini_enable initial value for enable
576  */
577 NavGraphGeneratorInterface::SetFilterMessage::SetFilterMessage(const FilterType ini_filter, const bool ini_enable) : Message("SetFilterMessage")
578 {
579  data_size = sizeof(SetFilterMessage_data_t);
580  data_ptr = malloc(data_size);
581  memset(data_ptr, 0, data_size);
582  data = (SetFilterMessage_data_t *)data_ptr;
584  data->filter = ini_filter;
585  data->enable = ini_enable;
586  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
587  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
588  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
589  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
590  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
591  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
592  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
593  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
594  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
595  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
596  enum_map_EdgeMode[(int)FORCE] = "FORCE";
597  add_fieldinfo(IFT_ENUM, "filter", 1, &data->filter, "FilterType", &enum_map_FilterType);
598  add_fieldinfo(IFT_BOOL, "enable", 1, &data->enable);
599 }
600 /** Constructor */
602 {
603  data_size = sizeof(SetFilterMessage_data_t);
604  data_ptr = malloc(data_size);
605  memset(data_ptr, 0, data_size);
606  data = (SetFilterMessage_data_t *)data_ptr;
608  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
609  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
610  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
611  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
612  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
613  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
614  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
615  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
616  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
617  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
618  enum_map_EdgeMode[(int)FORCE] = "FORCE";
619  add_fieldinfo(IFT_ENUM, "filter", 1, &data->filter, "FilterType", &enum_map_FilterType);
620  add_fieldinfo(IFT_BOOL, "enable", 1, &data->enable);
621 }
622 
623 /** Destructor */
625 {
626  free(data_ptr);
627 }
628 
629 /** Copy constructor.
630  * @param m message to copy from
631  */
633 {
634  data_size = m->data_size;
635  data_ptr = malloc(data_size);
636  memcpy(data_ptr, m->data_ptr, data_size);
637  data = (SetFilterMessage_data_t *)data_ptr;
639 }
640 
641 /* Methods */
642 /** Get filter value.
643  * Which filter to
644  enable/disable.
645  * @return filter value
646  */
649 {
650  return (NavGraphGeneratorInterface::FilterType)data->filter;
651 }
652 
653 /** Get maximum length of filter value.
654  * @return length of filter value, can be length of the array or number of
655  * maximum number of characters for a string
656  */
657 size_t
659 {
660  return 1;
661 }
662 
663 /** Set filter value.
664  * Which filter to
665  enable/disable.
666  * @param new_filter new filter value
667  */
668 void
670 {
671  data->filter = new_filter;
672 }
673 
674 /** Get enable value.
675  * True to enable, false to
676  disable
677  * @return enable value
678  */
679 bool
681 {
682  return data->enable;
683 }
684 
685 /** Get maximum length of enable value.
686  * @return length of enable value, can be length of the array or number of
687  * maximum number of characters for a string
688  */
689 size_t
691 {
692  return 1;
693 }
694 
695 /** Set enable value.
696  * True to enable, false to
697  disable
698  * @param new_enable new enable value
699  */
700 void
702 {
703  data->enable = new_enable;
704 }
705 
706 /** Clone this message.
707  * Produces a message of the same type as this message and copies the
708  * data to the new message.
709  * @return clone of this message
710  */
711 Message *
713 {
715 }
716 /** @class NavGraphGeneratorInterface::SetFilterParamFloatMessage <interfaces/NavGraphGeneratorInterface.h>
717  * SetFilterParamFloatMessage Fawkes BlackBoard Interface Message.
718  *
719 
720  */
721 
722 
723 /** Constructor with initial values.
724  * @param ini_filter initial value for filter
725  * @param ini_param initial value for param
726  * @param ini_value initial value for value
727  */
728 NavGraphGeneratorInterface::SetFilterParamFloatMessage::SetFilterParamFloatMessage(const FilterType ini_filter, const char * ini_param, const float ini_value) : Message("SetFilterParamFloatMessage")
729 {
730  data_size = sizeof(SetFilterParamFloatMessage_data_t);
731  data_ptr = malloc(data_size);
732  memset(data_ptr, 0, data_size);
733  data = (SetFilterParamFloatMessage_data_t *)data_ptr;
735  data->filter = ini_filter;
736  strncpy(data->param, ini_param, 32);
737  data->value = ini_value;
738  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
739  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
740  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
741  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
742  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
743  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
744  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
745  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
746  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
747  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
748  enum_map_EdgeMode[(int)FORCE] = "FORCE";
749  add_fieldinfo(IFT_ENUM, "filter", 1, &data->filter, "FilterType", &enum_map_FilterType);
750  add_fieldinfo(IFT_STRING, "param", 32, data->param);
751  add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
752 }
753 /** Constructor */
755 {
756  data_size = sizeof(SetFilterParamFloatMessage_data_t);
757  data_ptr = malloc(data_size);
758  memset(data_ptr, 0, data_size);
759  data = (SetFilterParamFloatMessage_data_t *)data_ptr;
761  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
762  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
763  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
764  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
765  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
766  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
767  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
768  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
769  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
770  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
771  enum_map_EdgeMode[(int)FORCE] = "FORCE";
772  add_fieldinfo(IFT_ENUM, "filter", 1, &data->filter, "FilterType", &enum_map_FilterType);
773  add_fieldinfo(IFT_STRING, "param", 32, data->param);
774  add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
775 }
776 
777 /** Destructor */
779 {
780  free(data_ptr);
781 }
782 
783 /** Copy constructor.
784  * @param m message to copy from
785  */
787 {
788  data_size = m->data_size;
789  data_ptr = malloc(data_size);
790  memcpy(data_ptr, m->data_ptr, data_size);
791  data = (SetFilterParamFloatMessage_data_t *)data_ptr;
793 }
794 
795 /* Methods */
796 /** Get filter value.
797  * Which filter to
798  enable/disable.
799  * @return filter value
800  */
803 {
804  return (NavGraphGeneratorInterface::FilterType)data->filter;
805 }
806 
807 /** Get maximum length of filter value.
808  * @return length of filter value, can be length of the array or number of
809  * maximum number of characters for a string
810  */
811 size_t
813 {
814  return 1;
815 }
816 
817 /** Set filter value.
818  * Which filter to
819  enable/disable.
820  * @param new_filter new filter value
821  */
822 void
824 {
825  data->filter = new_filter;
826 }
827 
828 /** Get param value.
829  * Parameter name, see FilterType
830  description for possible values.
831  * @return param value
832  */
833 char *
835 {
836  return data->param;
837 }
838 
839 /** Get maximum length of param value.
840  * @return length of param value, can be length of the array or number of
841  * maximum number of characters for a string
842  */
843 size_t
845 {
846  return 32;
847 }
848 
849 /** Set param value.
850  * Parameter name, see FilterType
851  description for possible values.
852  * @param new_param new param value
853  */
854 void
856 {
857  strncpy(data->param, new_param, sizeof(data->param));
858 }
859 
860 /** Get value value.
861  * True to enable, false to
862  disable
863  * @return value value
864  */
865 float
867 {
868  return data->value;
869 }
870 
871 /** Get maximum length of value value.
872  * @return length of value value, can be length of the array or number of
873  * maximum number of characters for a string
874  */
875 size_t
877 {
878  return 1;
879 }
880 
881 /** Set value value.
882  * True to enable, false to
883  disable
884  * @param new_value new value value
885  */
886 void
888 {
889  data->value = new_value;
890 }
891 
892 /** Clone this message.
893  * Produces a message of the same type as this message and copies the
894  * data to the new message.
895  * @return clone of this message
896  */
897 Message *
899 {
901 }
902 /** @class NavGraphGeneratorInterface::AddMapObstaclesMessage <interfaces/NavGraphGeneratorInterface.h>
903  * AddMapObstaclesMessage Fawkes BlackBoard Interface Message.
904  *
905 
906  */
907 
908 
909 /** Constructor with initial values.
910  * @param ini_max_line_point_distance initial value for max_line_point_distance
911  */
912 NavGraphGeneratorInterface::AddMapObstaclesMessage::AddMapObstaclesMessage(const float ini_max_line_point_distance) : Message("AddMapObstaclesMessage")
913 {
914  data_size = sizeof(AddMapObstaclesMessage_data_t);
915  data_ptr = malloc(data_size);
916  memset(data_ptr, 0, data_size);
917  data = (AddMapObstaclesMessage_data_t *)data_ptr;
919  data->max_line_point_distance = ini_max_line_point_distance;
920  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
921  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
922  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
923  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
924  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
925  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
926  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
927  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
928  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
929  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
930  enum_map_EdgeMode[(int)FORCE] = "FORCE";
931  add_fieldinfo(IFT_FLOAT, "max_line_point_distance", 1, &data->max_line_point_distance);
932 }
933 /** Constructor */
935 {
936  data_size = sizeof(AddMapObstaclesMessage_data_t);
937  data_ptr = malloc(data_size);
938  memset(data_ptr, 0, data_size);
939  data = (AddMapObstaclesMessage_data_t *)data_ptr;
941  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
942  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
943  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
944  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
945  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
946  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
947  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
948  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
949  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
950  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
951  enum_map_EdgeMode[(int)FORCE] = "FORCE";
952  add_fieldinfo(IFT_FLOAT, "max_line_point_distance", 1, &data->max_line_point_distance);
953 }
954 
955 /** Destructor */
957 {
958  free(data_ptr);
959 }
960 
961 /** Copy constructor.
962  * @param m message to copy from
963  */
965 {
966  data_size = m->data_size;
967  data_ptr = malloc(data_size);
968  memcpy(data_ptr, m->data_ptr, data_size);
969  data = (AddMapObstaclesMessage_data_t *)data_ptr;
971 }
972 
973 /* Methods */
974 /** Get max_line_point_distance value.
975  *
976  For points generated on lines found in the map, do not exceed
977  this threshold in terms of maximum distance of points on line.
978 
979  * @return max_line_point_distance value
980  */
981 float
983 {
984  return data->max_line_point_distance;
985 }
986 
987 /** Get maximum length of max_line_point_distance value.
988  * @return length of max_line_point_distance value, can be length of the array or number of
989  * maximum number of characters for a string
990  */
991 size_t
993 {
994  return 1;
995 }
996 
997 /** Set max_line_point_distance value.
998  *
999  For points generated on lines found in the map, do not exceed
1000  this threshold in terms of maximum distance of points on line.
1001 
1002  * @param new_max_line_point_distance new max_line_point_distance value
1003  */
1004 void
1006 {
1007  data->max_line_point_distance = new_max_line_point_distance;
1008 }
1009 
1010 /** Clone this message.
1011  * Produces a message of the same type as this message and copies the
1012  * data to the new message.
1013  * @return clone of this message
1014  */
1015 Message *
1017 {
1019 }
1020 /** @class NavGraphGeneratorInterface::AddObstacleMessage <interfaces/NavGraphGeneratorInterface.h>
1021  * AddObstacleMessage Fawkes BlackBoard Interface Message.
1022  *
1023 
1024  */
1025 
1026 
1027 /** Constructor with initial values.
1028  * @param ini_name initial value for name
1029  * @param ini_x initial value for x
1030  * @param ini_y initial value for y
1031  */
1032 NavGraphGeneratorInterface::AddObstacleMessage::AddObstacleMessage(const char * ini_name, const float ini_x, const float ini_y) : Message("AddObstacleMessage")
1033 {
1034  data_size = sizeof(AddObstacleMessage_data_t);
1035  data_ptr = malloc(data_size);
1036  memset(data_ptr, 0, data_size);
1037  data = (AddObstacleMessage_data_t *)data_ptr;
1039  strncpy(data->name, ini_name, 64);
1040  data->x = ini_x;
1041  data->y = ini_y;
1042  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1043  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1044  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1045  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1046  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1047  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1048  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1049  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1050  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1051  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1052  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1053  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1054  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1055  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1056 }
1057 /** Constructor */
1059 {
1060  data_size = sizeof(AddObstacleMessage_data_t);
1061  data_ptr = malloc(data_size);
1062  memset(data_ptr, 0, data_size);
1063  data = (AddObstacleMessage_data_t *)data_ptr;
1065  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1066  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1067  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1068  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1069  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1070  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1071  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1072  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1073  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1074  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1075  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1076  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1077  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1078  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1079 }
1080 
1081 /** Destructor */
1083 {
1084  free(data_ptr);
1085 }
1086 
1087 /** Copy constructor.
1088  * @param m message to copy from
1089  */
1091 {
1092  data_size = m->data_size;
1093  data_ptr = malloc(data_size);
1094  memcpy(data_ptr, m->data_ptr, data_size);
1095  data = (AddObstacleMessage_data_t *)data_ptr;
1097 }
1098 
1099 /* Methods */
1100 /** Get name value.
1101  *
1102  ID of the obstacle. Can later be used to remove it again.
1103 
1104  * @return name value
1105  */
1106 char *
1108 {
1109  return data->name;
1110 }
1111 
1112 /** Get maximum length of name value.
1113  * @return length of name value, can be length of the array or number of
1114  * maximum number of characters for a string
1115  */
1116 size_t
1118 {
1119  return 64;
1120 }
1121 
1122 /** Set name value.
1123  *
1124  ID of the obstacle. Can later be used to remove it again.
1125 
1126  * @param new_name new name value
1127  */
1128 void
1130 {
1131  strncpy(data->name, new_name, sizeof(data->name));
1132 }
1133 
1134 /** Get x value.
1135  * X coordinate of obstacle in global frame.
1136  * @return x value
1137  */
1138 float
1140 {
1141  return data->x;
1142 }
1143 
1144 /** Get maximum length of x value.
1145  * @return length of x value, can be length of the array or number of
1146  * maximum number of characters for a string
1147  */
1148 size_t
1150 {
1151  return 1;
1152 }
1153 
1154 /** Set x value.
1155  * X coordinate of obstacle in global frame.
1156  * @param new_x new x value
1157  */
1158 void
1160 {
1161  data->x = new_x;
1162 }
1163 
1164 /** Get y value.
1165  * Y coordinate of obstacle in global frame.
1166  * @return y value
1167  */
1168 float
1170 {
1171  return data->y;
1172 }
1173 
1174 /** Get maximum length of y value.
1175  * @return length of y value, can be length of the array or number of
1176  * maximum number of characters for a string
1177  */
1178 size_t
1180 {
1181  return 1;
1182 }
1183 
1184 /** Set y value.
1185  * Y coordinate of obstacle in global frame.
1186  * @param new_y new y value
1187  */
1188 void
1190 {
1191  data->y = new_y;
1192 }
1193 
1194 /** Clone this message.
1195  * Produces a message of the same type as this message and copies the
1196  * data to the new message.
1197  * @return clone of this message
1198  */
1199 Message *
1201 {
1203 }
1204 /** @class NavGraphGeneratorInterface::RemoveObstacleMessage <interfaces/NavGraphGeneratorInterface.h>
1205  * RemoveObstacleMessage Fawkes BlackBoard Interface Message.
1206  *
1207 
1208  */
1209 
1210 
1211 /** Constructor with initial values.
1212  * @param ini_name initial value for name
1213  */
1215 {
1216  data_size = sizeof(RemoveObstacleMessage_data_t);
1217  data_ptr = malloc(data_size);
1218  memset(data_ptr, 0, data_size);
1219  data = (RemoveObstacleMessage_data_t *)data_ptr;
1221  strncpy(data->name, ini_name, 64);
1222  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1223  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1224  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1225  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1226  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1227  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1228  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1229  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1230  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1231  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1232  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1233  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1234 }
1235 /** Constructor */
1237 {
1238  data_size = sizeof(RemoveObstacleMessage_data_t);
1239  data_ptr = malloc(data_size);
1240  memset(data_ptr, 0, data_size);
1241  data = (RemoveObstacleMessage_data_t *)data_ptr;
1243  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1244  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1245  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1246  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1247  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1248  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1249  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1250  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1251  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1252  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1253  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1254  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1255 }
1256 
1257 /** Destructor */
1259 {
1260  free(data_ptr);
1261 }
1262 
1263 /** Copy constructor.
1264  * @param m message to copy from
1265  */
1267 {
1268  data_size = m->data_size;
1269  data_ptr = malloc(data_size);
1270  memcpy(data_ptr, m->data_ptr, data_size);
1271  data = (RemoveObstacleMessage_data_t *)data_ptr;
1273 }
1274 
1275 /* Methods */
1276 /** Get name value.
1277  *
1278  ID of the obstacle to remove.
1279 
1280  * @return name value
1281  */
1282 char *
1284 {
1285  return data->name;
1286 }
1287 
1288 /** Get maximum length of name value.
1289  * @return length of name 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 64;
1296 }
1297 
1298 /** Set name value.
1299  *
1300  ID of the obstacle to remove.
1301 
1302  * @param new_name new name value
1303  */
1304 void
1306 {
1307  strncpy(data->name, new_name, sizeof(data->name));
1308 }
1309 
1310 /** Clone this message.
1311  * Produces a message of the same type as this message and copies the
1312  * data to the new message.
1313  * @return clone of this message
1314  */
1315 Message *
1317 {
1319 }
1320 /** @class NavGraphGeneratorInterface::AddPointOfInterestMessage <interfaces/NavGraphGeneratorInterface.h>
1321  * AddPointOfInterestMessage Fawkes BlackBoard Interface Message.
1322  *
1323 
1324  */
1325 
1326 
1327 /** Constructor with initial values.
1328  * @param ini_name initial value for name
1329  * @param ini_x initial value for x
1330  * @param ini_y initial value for y
1331  * @param ini_mode initial value for mode
1332  */
1333 NavGraphGeneratorInterface::AddPointOfInterestMessage::AddPointOfInterestMessage(const char * ini_name, const float ini_x, const float ini_y, const ConnectionMode ini_mode) : Message("AddPointOfInterestMessage")
1334 {
1335  data_size = sizeof(AddPointOfInterestMessage_data_t);
1336  data_ptr = malloc(data_size);
1337  memset(data_ptr, 0, data_size);
1338  data = (AddPointOfInterestMessage_data_t *)data_ptr;
1340  strncpy(data->name, ini_name, 64);
1341  data->x = ini_x;
1342  data->y = ini_y;
1343  data->mode = ini_mode;
1344  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1345  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1346  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1347  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1348  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1349  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1350  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1351  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1352  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1353  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1354  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1355  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1356  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1357  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1358  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "ConnectionMode", &enum_map_ConnectionMode);
1359 }
1360 /** Constructor */
1362 {
1363  data_size = sizeof(AddPointOfInterestMessage_data_t);
1364  data_ptr = malloc(data_size);
1365  memset(data_ptr, 0, data_size);
1366  data = (AddPointOfInterestMessage_data_t *)data_ptr;
1368  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1369  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1370  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1371  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1372  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1373  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1374  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1375  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1376  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1377  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1378  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1379  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1380  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1381  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1382  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "ConnectionMode", &enum_map_ConnectionMode);
1383 }
1384 
1385 /** Destructor */
1387 {
1388  free(data_ptr);
1389 }
1390 
1391 /** Copy constructor.
1392  * @param m message to copy from
1393  */
1395 {
1396  data_size = m->data_size;
1397  data_ptr = malloc(data_size);
1398  memcpy(data_ptr, m->data_ptr, data_size);
1399  data = (AddPointOfInterestMessage_data_t *)data_ptr;
1401 }
1402 
1403 /* Methods */
1404 /** Get name value.
1405  *
1406  ID of the obstacle. Can later be used to remove it again.
1407 
1408  * @return name value
1409  */
1410 char *
1412 {
1413  return data->name;
1414 }
1415 
1416 /** Get maximum length of name value.
1417  * @return length of name value, can be length of the array or number of
1418  * maximum number of characters for a string
1419  */
1420 size_t
1422 {
1423  return 64;
1424 }
1425 
1426 /** Set name value.
1427  *
1428  ID of the obstacle. Can later be used to remove it again.
1429 
1430  * @param new_name new name value
1431  */
1432 void
1434 {
1435  strncpy(data->name, new_name, sizeof(data->name));
1436 }
1437 
1438 /** Get x value.
1439  * X coordinate of obstacle in global frame.
1440  * @return x value
1441  */
1442 float
1444 {
1445  return data->x;
1446 }
1447 
1448 /** Get maximum length of x value.
1449  * @return length of x value, can be length of the array or number of
1450  * maximum number of characters for a string
1451  */
1452 size_t
1454 {
1455  return 1;
1456 }
1457 
1458 /** Set x value.
1459  * X coordinate of obstacle in global frame.
1460  * @param new_x new x value
1461  */
1462 void
1464 {
1465  data->x = new_x;
1466 }
1467 
1468 /** Get y value.
1469  * Y coordinate of obstacle in global frame.
1470  * @return y value
1471  */
1472 float
1474 {
1475  return data->y;
1476 }
1477 
1478 /** Get maximum length of y value.
1479  * @return length of y value, can be length of the array or number of
1480  * maximum number of characters for a string
1481  */
1482 size_t
1484 {
1485  return 1;
1486 }
1487 
1488 /** Set y value.
1489  * Y coordinate of obstacle in global frame.
1490  * @param new_y new y value
1491  */
1492 void
1494 {
1495  data->y = new_y;
1496 }
1497 
1498 /** Get mode value.
1499  *
1500  The connection mode to use to connect the POI with the graph.
1501 
1502  * @return mode value
1503  */
1506 {
1507  return (NavGraphGeneratorInterface::ConnectionMode)data->mode;
1508 }
1509 
1510 /** Get maximum length of mode value.
1511  * @return length of mode value, can be length of the array or number of
1512  * maximum number of characters for a string
1513  */
1514 size_t
1516 {
1517  return 1;
1518 }
1519 
1520 /** Set mode value.
1521  *
1522  The connection mode to use to connect the POI with the graph.
1523 
1524  * @param new_mode new mode value
1525  */
1526 void
1528 {
1529  data->mode = new_mode;
1530 }
1531 
1532 /** Clone this message.
1533  * Produces a message of the same type as this message and copies the
1534  * data to the new message.
1535  * @return clone of this message
1536  */
1537 Message *
1539 {
1541 }
1542 /** @class NavGraphGeneratorInterface::AddPointOfInterestWithOriMessage <interfaces/NavGraphGeneratorInterface.h>
1543  * AddPointOfInterestWithOriMessage Fawkes BlackBoard Interface Message.
1544  *
1545 
1546  */
1547 
1548 
1549 /** Constructor with initial values.
1550  * @param ini_name initial value for name
1551  * @param ini_x initial value for x
1552  * @param ini_y initial value for y
1553  * @param ini_ori initial value for ori
1554  * @param ini_mode initial value for mode
1555  */
1556 NavGraphGeneratorInterface::AddPointOfInterestWithOriMessage::AddPointOfInterestWithOriMessage(const char * ini_name, const float ini_x, const float ini_y, const float ini_ori, const ConnectionMode ini_mode) : Message("AddPointOfInterestWithOriMessage")
1557 {
1558  data_size = sizeof(AddPointOfInterestWithOriMessage_data_t);
1559  data_ptr = malloc(data_size);
1560  memset(data_ptr, 0, data_size);
1561  data = (AddPointOfInterestWithOriMessage_data_t *)data_ptr;
1563  strncpy(data->name, ini_name, 64);
1564  data->x = ini_x;
1565  data->y = ini_y;
1566  data->ori = ini_ori;
1567  data->mode = ini_mode;
1568  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1569  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1570  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1571  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1572  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1573  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1574  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1575  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1576  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1577  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1578  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1579  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1580  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1581  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1582  add_fieldinfo(IFT_FLOAT, "ori", 1, &data->ori);
1583  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "ConnectionMode", &enum_map_ConnectionMode);
1584 }
1585 /** Constructor */
1587 {
1588  data_size = sizeof(AddPointOfInterestWithOriMessage_data_t);
1589  data_ptr = malloc(data_size);
1590  memset(data_ptr, 0, data_size);
1591  data = (AddPointOfInterestWithOriMessage_data_t *)data_ptr;
1593  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1594  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1595  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1596  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1597  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1598  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1599  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1600  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1601  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1602  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1603  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1604  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1605  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1606  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1607  add_fieldinfo(IFT_FLOAT, "ori", 1, &data->ori);
1608  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "ConnectionMode", &enum_map_ConnectionMode);
1609 }
1610 
1611 /** Destructor */
1613 {
1614  free(data_ptr);
1615 }
1616 
1617 /** Copy constructor.
1618  * @param m message to copy from
1619  */
1621 {
1622  data_size = m->data_size;
1623  data_ptr = malloc(data_size);
1624  memcpy(data_ptr, m->data_ptr, data_size);
1625  data = (AddPointOfInterestWithOriMessage_data_t *)data_ptr;
1627 }
1628 
1629 /* Methods */
1630 /** Get name value.
1631  *
1632  ID of the obstacle. Can later be used to remove it again.
1633 
1634  * @return name value
1635  */
1636 char *
1638 {
1639  return data->name;
1640 }
1641 
1642 /** Get maximum length of name value.
1643  * @return length of name value, can be length of the array or number of
1644  * maximum number of characters for a string
1645  */
1646 size_t
1648 {
1649  return 64;
1650 }
1651 
1652 /** Set name value.
1653  *
1654  ID of the obstacle. Can later be used to remove it again.
1655 
1656  * @param new_name new name value
1657  */
1658 void
1660 {
1661  strncpy(data->name, new_name, sizeof(data->name));
1662 }
1663 
1664 /** Get x value.
1665  * X coordinate of obstacle in global frame.
1666  * @return x value
1667  */
1668 float
1670 {
1671  return data->x;
1672 }
1673 
1674 /** Get maximum length of x value.
1675  * @return length of x value, can be length of the array or number of
1676  * maximum number of characters for a string
1677  */
1678 size_t
1680 {
1681  return 1;
1682 }
1683 
1684 /** Set x value.
1685  * X coordinate of obstacle in global frame.
1686  * @param new_x new x value
1687  */
1688 void
1690 {
1691  data->x = new_x;
1692 }
1693 
1694 /** Get y value.
1695  * Y coordinate of obstacle in global frame.
1696  * @return y value
1697  */
1698 float
1700 {
1701  return data->y;
1702 }
1703 
1704 /** Get maximum length of y value.
1705  * @return length of y value, can be length of the array or number of
1706  * maximum number of characters for a string
1707  */
1708 size_t
1710 {
1711  return 1;
1712 }
1713 
1714 /** Set y value.
1715  * Y coordinate of obstacle in global frame.
1716  * @param new_y new y value
1717  */
1718 void
1720 {
1721  data->y = new_y;
1722 }
1723 
1724 /** Get ori value.
1725  * Orientation for target point (rad).
1726  * @return ori value
1727  */
1728 float
1730 {
1731  return data->ori;
1732 }
1733 
1734 /** Get maximum length of ori value.
1735  * @return length of ori value, can be length of the array or number of
1736  * maximum number of characters for a string
1737  */
1738 size_t
1740 {
1741  return 1;
1742 }
1743 
1744 /** Set ori value.
1745  * Orientation for target point (rad).
1746  * @param new_ori new ori value
1747  */
1748 void
1750 {
1751  data->ori = new_ori;
1752 }
1753 
1754 /** Get mode value.
1755  *
1756  The connection mode to use to connect the POI with the graph.
1757 
1758  * @return mode value
1759  */
1762 {
1763  return (NavGraphGeneratorInterface::ConnectionMode)data->mode;
1764 }
1765 
1766 /** Get maximum length of mode value.
1767  * @return length of mode value, can be length of the array or number of
1768  * maximum number of characters for a string
1769  */
1770 size_t
1772 {
1773  return 1;
1774 }
1775 
1776 /** Set mode value.
1777  *
1778  The connection mode to use to connect the POI with the graph.
1779 
1780  * @param new_mode new mode value
1781  */
1782 void
1784 {
1785  data->mode = new_mode;
1786 }
1787 
1788 /** Clone this message.
1789  * Produces a message of the same type as this message and copies the
1790  * data to the new message.
1791  * @return clone of this message
1792  */
1793 Message *
1795 {
1797 }
1798 /** @class NavGraphGeneratorInterface::SetPointOfInterestPropertyMessage <interfaces/NavGraphGeneratorInterface.h>
1799  * SetPointOfInterestPropertyMessage Fawkes BlackBoard Interface Message.
1800  *
1801 
1802  */
1803 
1804 
1805 /** Constructor with initial values.
1806  * @param ini_name initial value for name
1807  * @param ini_property_name initial value for property_name
1808  * @param ini_property_value initial value for property_value
1809  */
1810 NavGraphGeneratorInterface::SetPointOfInterestPropertyMessage::SetPointOfInterestPropertyMessage(const char * ini_name, const char * ini_property_name, const char * ini_property_value) : Message("SetPointOfInterestPropertyMessage")
1811 {
1812  data_size = sizeof(SetPointOfInterestPropertyMessage_data_t);
1813  data_ptr = malloc(data_size);
1814  memset(data_ptr, 0, data_size);
1815  data = (SetPointOfInterestPropertyMessage_data_t *)data_ptr;
1817  strncpy(data->name, ini_name, 64);
1818  strncpy(data->property_name, ini_property_name, 64);
1819  strncpy(data->property_value, ini_property_value, 1024);
1820  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1821  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1822  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1823  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1824  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1825  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1826  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1827  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1828  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1829  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1830  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1831  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1832  add_fieldinfo(IFT_STRING, "property_name", 64, data->property_name);
1833  add_fieldinfo(IFT_STRING, "property_value", 1024, data->property_value);
1834 }
1835 /** Constructor */
1837 {
1838  data_size = sizeof(SetPointOfInterestPropertyMessage_data_t);
1839  data_ptr = malloc(data_size);
1840  memset(data_ptr, 0, data_size);
1841  data = (SetPointOfInterestPropertyMessage_data_t *)data_ptr;
1843  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1844  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1845  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1846  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1847  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1848  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1849  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1850  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1851  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1852  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1853  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1854  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1855  add_fieldinfo(IFT_STRING, "property_name", 64, data->property_name);
1856  add_fieldinfo(IFT_STRING, "property_value", 1024, data->property_value);
1857 }
1858 
1859 /** Destructor */
1861 {
1862  free(data_ptr);
1863 }
1864 
1865 /** Copy constructor.
1866  * @param m message to copy from
1867  */
1869 {
1870  data_size = m->data_size;
1871  data_ptr = malloc(data_size);
1872  memcpy(data_ptr, m->data_ptr, data_size);
1873  data = (SetPointOfInterestPropertyMessage_data_t *)data_ptr;
1875 }
1876 
1877 /* Methods */
1878 /** Get name value.
1879  *
1880  ID of the point of interest.
1881 
1882  * @return name value
1883  */
1884 char *
1886 {
1887  return data->name;
1888 }
1889 
1890 /** Get maximum length of name value.
1891  * @return length of name value, can be length of the array or number of
1892  * maximum number of characters for a string
1893  */
1894 size_t
1896 {
1897  return 64;
1898 }
1899 
1900 /** Set name value.
1901  *
1902  ID of the point of interest.
1903 
1904  * @param new_name new name value
1905  */
1906 void
1908 {
1909  strncpy(data->name, new_name, sizeof(data->name));
1910 }
1911 
1912 /** Get property_name value.
1913  * Name of the property to set.
1914  * @return property_name value
1915  */
1916 char *
1918 {
1919  return data->property_name;
1920 }
1921 
1922 /** Get maximum length of property_name value.
1923  * @return length of property_name value, can be length of the array or number of
1924  * maximum number of characters for a string
1925  */
1926 size_t
1928 {
1929  return 64;
1930 }
1931 
1932 /** Set property_name value.
1933  * Name of the property to set.
1934  * @param new_property_name new property_name value
1935  */
1936 void
1938 {
1939  strncpy(data->property_name, new_property_name, sizeof(data->property_name));
1940 }
1941 
1942 /** Get property_value value.
1943  * Value of the property
1944  to set.
1945  * @return property_value value
1946  */
1947 char *
1949 {
1950  return data->property_value;
1951 }
1952 
1953 /** Get maximum length of property_value value.
1954  * @return length of property_value value, can be length of the array or number of
1955  * maximum number of characters for a string
1956  */
1957 size_t
1959 {
1960  return 1024;
1961 }
1962 
1963 /** Set property_value value.
1964  * Value of the property
1965  to set.
1966  * @param new_property_value new property_value value
1967  */
1968 void
1970 {
1971  strncpy(data->property_value, new_property_value, sizeof(data->property_value));
1972 }
1973 
1974 /** Clone this message.
1975  * Produces a message of the same type as this message and copies the
1976  * data to the new message.
1977  * @return clone of this message
1978  */
1979 Message *
1981 {
1983 }
1984 /** @class NavGraphGeneratorInterface::AddEdgeMessage <interfaces/NavGraphGeneratorInterface.h>
1985  * AddEdgeMessage Fawkes BlackBoard Interface Message.
1986  *
1987 
1988  */
1989 
1990 
1991 /** Constructor with initial values.
1992  * @param ini_p1 initial value for p1
1993  * @param ini_p2 initial value for p2
1994  * @param ini_directed initial value for directed
1995  * @param ini_mode initial value for mode
1996  */
1997 NavGraphGeneratorInterface::AddEdgeMessage::AddEdgeMessage(const char * ini_p1, const char * ini_p2, const bool ini_directed, const EdgeMode ini_mode) : Message("AddEdgeMessage")
1998 {
1999  data_size = sizeof(AddEdgeMessage_data_t);
2000  data_ptr = malloc(data_size);
2001  memset(data_ptr, 0, data_size);
2002  data = (AddEdgeMessage_data_t *)data_ptr;
2004  strncpy(data->p1, ini_p1, 64);
2005  strncpy(data->p2, ini_p2, 64);
2006  data->directed = ini_directed;
2007  data->mode = ini_mode;
2008  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2009  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2010  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2011  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2012  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2013  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2014  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2015  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2016  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2017  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2018  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2019  add_fieldinfo(IFT_STRING, "p1", 64, data->p1);
2020  add_fieldinfo(IFT_STRING, "p2", 64, data->p2);
2021  add_fieldinfo(IFT_BOOL, "directed", 1, &data->directed);
2022  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "EdgeMode", &enum_map_EdgeMode);
2023 }
2024 /** Constructor */
2026 {
2027  data_size = sizeof(AddEdgeMessage_data_t);
2028  data_ptr = malloc(data_size);
2029  memset(data_ptr, 0, data_size);
2030  data = (AddEdgeMessage_data_t *)data_ptr;
2032  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2033  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2034  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2035  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2036  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2037  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2038  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2039  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2040  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2041  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2042  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2043  add_fieldinfo(IFT_STRING, "p1", 64, data->p1);
2044  add_fieldinfo(IFT_STRING, "p2", 64, data->p2);
2045  add_fieldinfo(IFT_BOOL, "directed", 1, &data->directed);
2046  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "EdgeMode", &enum_map_EdgeMode);
2047 }
2048 
2049 /** Destructor */
2051 {
2052  free(data_ptr);
2053 }
2054 
2055 /** Copy constructor.
2056  * @param m message to copy from
2057  */
2059 {
2060  data_size = m->data_size;
2061  data_ptr = malloc(data_size);
2062  memcpy(data_ptr, m->data_ptr, data_size);
2063  data = (AddEdgeMessage_data_t *)data_ptr;
2065 }
2066 
2067 /* Methods */
2068 /** Get p1 value.
2069  * ID of first node.
2070  * @return p1 value
2071  */
2072 char *
2074 {
2075  return data->p1;
2076 }
2077 
2078 /** Get maximum length of p1 value.
2079  * @return length of p1 value, can be length of the array or number of
2080  * maximum number of characters for a string
2081  */
2082 size_t
2084 {
2085  return 64;
2086 }
2087 
2088 /** Set p1 value.
2089  * ID of first node.
2090  * @param new_p1 new p1 value
2091  */
2092 void
2094 {
2095  strncpy(data->p1, new_p1, sizeof(data->p1));
2096 }
2097 
2098 /** Get p2 value.
2099  * ID of second node.
2100  * @return p2 value
2101  */
2102 char *
2104 {
2105  return data->p2;
2106 }
2107 
2108 /** Get maximum length of p2 value.
2109  * @return length of p2 value, can be length of the array or number of
2110  * maximum number of characters for a string
2111  */
2112 size_t
2114 {
2115  return 64;
2116 }
2117 
2118 /** Set p2 value.
2119  * ID of second node.
2120  * @param new_p2 new p2 value
2121  */
2122 void
2124 {
2125  strncpy(data->p2, new_p2, sizeof(data->p2));
2126 }
2127 
2128 /** Get directed value.
2129  *
2130  True to create a directed edge from p1 to p2, otherwise the edge
2131  is assumed to be undirected.
2132 
2133  * @return directed value
2134  */
2135 bool
2137 {
2138  return data->directed;
2139 }
2140 
2141 /** Get maximum length of directed value.
2142  * @return length of directed value, can be length of the array or number of
2143  * maximum number of characters for a string
2144  */
2145 size_t
2147 {
2148  return 1;
2149 }
2150 
2151 /** Set directed value.
2152  *
2153  True to create a directed edge from p1 to p2, otherwise the edge
2154  is assumed to be undirected.
2155 
2156  * @param new_directed new directed value
2157  */
2158 void
2160 {
2161  data->directed = new_directed;
2162 }
2163 
2164 /** Get mode value.
2165  * The edge insertion mode.
2166  * @return mode value
2167  */
2170 {
2171  return (NavGraphGeneratorInterface::EdgeMode)data->mode;
2172 }
2173 
2174 /** Get maximum length of mode value.
2175  * @return length of mode value, can be length of the array or number of
2176  * maximum number of characters for a string
2177  */
2178 size_t
2180 {
2181  return 1;
2182 }
2183 
2184 /** Set mode value.
2185  * The edge insertion mode.
2186  * @param new_mode new mode value
2187  */
2188 void
2190 {
2191  data->mode = new_mode;
2192 }
2193 
2194 /** Clone this message.
2195  * Produces a message of the same type as this message and copies the
2196  * data to the new message.
2197  * @return clone of this message
2198  */
2199 Message *
2201 {
2203 }
2204 /** @class NavGraphGeneratorInterface::SetGraphDefaultPropertyMessage <interfaces/NavGraphGeneratorInterface.h>
2205  * SetGraphDefaultPropertyMessage Fawkes BlackBoard Interface Message.
2206  *
2207 
2208  */
2209 
2210 
2211 /** Constructor with initial values.
2212  * @param ini_property_name initial value for property_name
2213  * @param ini_property_value initial value for property_value
2214  */
2215 NavGraphGeneratorInterface::SetGraphDefaultPropertyMessage::SetGraphDefaultPropertyMessage(const char * ini_property_name, const char * ini_property_value) : Message("SetGraphDefaultPropertyMessage")
2216 {
2217  data_size = sizeof(SetGraphDefaultPropertyMessage_data_t);
2218  data_ptr = malloc(data_size);
2219  memset(data_ptr, 0, data_size);
2220  data = (SetGraphDefaultPropertyMessage_data_t *)data_ptr;
2222  strncpy(data->property_name, ini_property_name, 64);
2223  strncpy(data->property_value, ini_property_value, 1024);
2224  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2225  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2226  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2227  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2228  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2229  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2230  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2231  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2232  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2233  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2234  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2235  add_fieldinfo(IFT_STRING, "property_name", 64, data->property_name);
2236  add_fieldinfo(IFT_STRING, "property_value", 1024, data->property_value);
2237 }
2238 /** Constructor */
2240 {
2241  data_size = sizeof(SetGraphDefaultPropertyMessage_data_t);
2242  data_ptr = malloc(data_size);
2243  memset(data_ptr, 0, data_size);
2244  data = (SetGraphDefaultPropertyMessage_data_t *)data_ptr;
2246  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2247  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2248  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2249  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2250  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2251  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2252  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2253  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2254  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2255  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2256  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2257  add_fieldinfo(IFT_STRING, "property_name", 64, data->property_name);
2258  add_fieldinfo(IFT_STRING, "property_value", 1024, data->property_value);
2259 }
2260 
2261 /** Destructor */
2263 {
2264  free(data_ptr);
2265 }
2266 
2267 /** Copy constructor.
2268  * @param m message to copy from
2269  */
2271 {
2272  data_size = m->data_size;
2273  data_ptr = malloc(data_size);
2274  memcpy(data_ptr, m->data_ptr, data_size);
2275  data = (SetGraphDefaultPropertyMessage_data_t *)data_ptr;
2277 }
2278 
2279 /* Methods */
2280 /** Get property_name value.
2281  * Name of the property to set.
2282  * @return property_name value
2283  */
2284 char *
2286 {
2287  return data->property_name;
2288 }
2289 
2290 /** Get maximum length of property_name value.
2291  * @return length of property_name value, can be length of the array or number of
2292  * maximum number of characters for a string
2293  */
2294 size_t
2296 {
2297  return 64;
2298 }
2299 
2300 /** Set property_name value.
2301  * Name of the property to set.
2302  * @param new_property_name new property_name value
2303  */
2304 void
2306 {
2307  strncpy(data->property_name, new_property_name, sizeof(data->property_name));
2308 }
2309 
2310 /** Get property_value value.
2311  * Value of the property
2312  to set.
2313  * @return property_value value
2314  */
2315 char *
2317 {
2318  return data->property_value;
2319 }
2320 
2321 /** Get maximum length of property_value value.
2322  * @return length of property_value value, can be length of the array or number of
2323  * maximum number of characters for a string
2324  */
2325 size_t
2327 {
2328  return 1024;
2329 }
2330 
2331 /** Set property_value value.
2332  * Value of the property
2333  to set.
2334  * @param new_property_value new property_value value
2335  */
2336 void
2338 {
2339  strncpy(data->property_value, new_property_value, sizeof(data->property_value));
2340 }
2341 
2342 /** Clone this message.
2343  * Produces a message of the same type as this message and copies the
2344  * data to the new message.
2345  * @return clone of this message
2346  */
2347 Message *
2349 {
2351 }
2352 /** @class NavGraphGeneratorInterface::SetCopyGraphDefaultPropertiesMessage <interfaces/NavGraphGeneratorInterface.h>
2353  * SetCopyGraphDefaultPropertiesMessage Fawkes BlackBoard Interface Message.
2354  *
2355 
2356  */
2357 
2358 
2359 /** Constructor with initial values.
2360  * @param ini_enable_copy initial value for enable_copy
2361  */
2363 {
2364  data_size = sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2365  data_ptr = malloc(data_size);
2366  memset(data_ptr, 0, data_size);
2367  data = (SetCopyGraphDefaultPropertiesMessage_data_t *)data_ptr;
2369  data->enable_copy = ini_enable_copy;
2370  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2371  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2372  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2373  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2374  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2375  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2376  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2377  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2378  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2379  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2380  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2381  add_fieldinfo(IFT_BOOL, "enable_copy", 1, &data->enable_copy);
2382 }
2383 /** Constructor */
2385 {
2386  data_size = sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2387  data_ptr = malloc(data_size);
2388  memset(data_ptr, 0, data_size);
2389  data = (SetCopyGraphDefaultPropertiesMessage_data_t *)data_ptr;
2391  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2392  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2393  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2394  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2395  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2396  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2397  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2398  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2399  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2400  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2401  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2402  add_fieldinfo(IFT_BOOL, "enable_copy", 1, &data->enable_copy);
2403 }
2404 
2405 /** Destructor */
2407 {
2408  free(data_ptr);
2409 }
2410 
2411 /** Copy constructor.
2412  * @param m message to copy from
2413  */
2415 {
2416  data_size = m->data_size;
2417  data_ptr = malloc(data_size);
2418  memcpy(data_ptr, m->data_ptr, data_size);
2419  data = (SetCopyGraphDefaultPropertiesMessage_data_t *)data_ptr;
2421 }
2422 
2423 /* Methods */
2424 /** Get enable_copy value.
2425  * True to enable copying
2426  (default) false to disable).
2427  * @return enable_copy value
2428  */
2429 bool
2431 {
2432  return data->enable_copy;
2433 }
2434 
2435 /** Get maximum length of enable_copy value.
2436  * @return length of enable_copy value, can be length of the array or number of
2437  * maximum number of characters for a string
2438  */
2439 size_t
2441 {
2442  return 1;
2443 }
2444 
2445 /** Set enable_copy value.
2446  * True to enable copying
2447  (default) false to disable).
2448  * @param new_enable_copy new enable_copy value
2449  */
2450 void
2452 {
2453  data->enable_copy = new_enable_copy;
2454 }
2455 
2456 /** Clone this message.
2457  * Produces a message of the same type as this message and copies the
2458  * data to the new message.
2459  * @return clone of this message
2460  */
2461 Message *
2463 {
2465 }
2466 /** @class NavGraphGeneratorInterface::RemovePointOfInterestMessage <interfaces/NavGraphGeneratorInterface.h>
2467  * RemovePointOfInterestMessage Fawkes BlackBoard Interface Message.
2468  *
2469 
2470  */
2471 
2472 
2473 /** Constructor with initial values.
2474  * @param ini_name initial value for name
2475  */
2477 {
2478  data_size = sizeof(RemovePointOfInterestMessage_data_t);
2479  data_ptr = malloc(data_size);
2480  memset(data_ptr, 0, data_size);
2481  data = (RemovePointOfInterestMessage_data_t *)data_ptr;
2483  strncpy(data->name, ini_name, 64);
2484  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2485  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2486  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2487  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2488  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2489  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2490  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2491  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2492  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2493  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2494  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2495  add_fieldinfo(IFT_STRING, "name", 64, data->name);
2496 }
2497 /** Constructor */
2499 {
2500  data_size = sizeof(RemovePointOfInterestMessage_data_t);
2501  data_ptr = malloc(data_size);
2502  memset(data_ptr, 0, data_size);
2503  data = (RemovePointOfInterestMessage_data_t *)data_ptr;
2505  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2506  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2507  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2508  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2509  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2510  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2511  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2512  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2513  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2514  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2515  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2516  add_fieldinfo(IFT_STRING, "name", 64, data->name);
2517 }
2518 
2519 /** Destructor */
2521 {
2522  free(data_ptr);
2523 }
2524 
2525 /** Copy constructor.
2526  * @param m message to copy from
2527  */
2529 {
2530  data_size = m->data_size;
2531  data_ptr = malloc(data_size);
2532  memcpy(data_ptr, m->data_ptr, data_size);
2533  data = (RemovePointOfInterestMessage_data_t *)data_ptr;
2535 }
2536 
2537 /* Methods */
2538 /** Get name value.
2539  *
2540  ID of the obstacle to remove.
2541 
2542  * @return name value
2543  */
2544 char *
2546 {
2547  return data->name;
2548 }
2549 
2550 /** Get maximum length of name value.
2551  * @return length of name value, can be length of the array or number of
2552  * maximum number of characters for a string
2553  */
2554 size_t
2556 {
2557  return 64;
2558 }
2559 
2560 /** Set name value.
2561  *
2562  ID of the obstacle to remove.
2563 
2564  * @param new_name new name value
2565  */
2566 void
2568 {
2569  strncpy(data->name, new_name, sizeof(data->name));
2570 }
2571 
2572 /** Clone this message.
2573  * Produces a message of the same type as this message and copies the
2574  * data to the new message.
2575  * @return clone of this message
2576  */
2577 Message *
2579 {
2581 }
2582 /** @class NavGraphGeneratorInterface::ComputeMessage <interfaces/NavGraphGeneratorInterface.h>
2583  * ComputeMessage Fawkes BlackBoard Interface Message.
2584  *
2585 
2586  */
2587 
2588 
2589 /** Constructor */
2591 {
2592  data_size = sizeof(ComputeMessage_data_t);
2593  data_ptr = malloc(data_size);
2594  memset(data_ptr, 0, data_size);
2595  data = (ComputeMessage_data_t *)data_ptr;
2597  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2598  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2599  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2600  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2601  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2602  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2603  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2604  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2605  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2606  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2607  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2608 }
2609 
2610 /** Destructor */
2612 {
2613  free(data_ptr);
2614 }
2615 
2616 /** Copy constructor.
2617  * @param m message to copy from
2618  */
2620 {
2621  data_size = m->data_size;
2622  data_ptr = malloc(data_size);
2623  memcpy(data_ptr, m->data_ptr, data_size);
2624  data = (ComputeMessage_data_t *)data_ptr;
2626 }
2627 
2628 /* Methods */
2629 /** Clone this message.
2630  * Produces a message of the same type as this message and copies the
2631  * data to the new message.
2632  * @return clone of this message
2633  */
2634 Message *
2636 {
2638 }
2639 /** Check if message is valid and can be enqueued.
2640  * @param message Message to check
2641  * @return true if the message is valid, false otherwise.
2642  */
2643 bool
2645 {
2646  const ClearMessage *m0 = dynamic_cast<const ClearMessage *>(message);
2647  if ( m0 != NULL ) {
2648  return true;
2649  }
2650  const SetBoundingBoxMessage *m1 = dynamic_cast<const SetBoundingBoxMessage *>(message);
2651  if ( m1 != NULL ) {
2652  return true;
2653  }
2654  const SetFilterMessage *m2 = dynamic_cast<const SetFilterMessage *>(message);
2655  if ( m2 != NULL ) {
2656  return true;
2657  }
2658  const SetFilterParamFloatMessage *m3 = dynamic_cast<const SetFilterParamFloatMessage *>(message);
2659  if ( m3 != NULL ) {
2660  return true;
2661  }
2662  const AddMapObstaclesMessage *m4 = dynamic_cast<const AddMapObstaclesMessage *>(message);
2663  if ( m4 != NULL ) {
2664  return true;
2665  }
2666  const AddObstacleMessage *m5 = dynamic_cast<const AddObstacleMessage *>(message);
2667  if ( m5 != NULL ) {
2668  return true;
2669  }
2670  const RemoveObstacleMessage *m6 = dynamic_cast<const RemoveObstacleMessage *>(message);
2671  if ( m6 != NULL ) {
2672  return true;
2673  }
2674  const AddPointOfInterestMessage *m7 = dynamic_cast<const AddPointOfInterestMessage *>(message);
2675  if ( m7 != NULL ) {
2676  return true;
2677  }
2678  const AddPointOfInterestWithOriMessage *m8 = dynamic_cast<const AddPointOfInterestWithOriMessage *>(message);
2679  if ( m8 != NULL ) {
2680  return true;
2681  }
2682  const SetPointOfInterestPropertyMessage *m9 = dynamic_cast<const SetPointOfInterestPropertyMessage *>(message);
2683  if ( m9 != NULL ) {
2684  return true;
2685  }
2686  const AddEdgeMessage *m10 = dynamic_cast<const AddEdgeMessage *>(message);
2687  if ( m10 != NULL ) {
2688  return true;
2689  }
2690  const SetGraphDefaultPropertyMessage *m11 = dynamic_cast<const SetGraphDefaultPropertyMessage *>(message);
2691  if ( m11 != NULL ) {
2692  return true;
2693  }
2694  const SetCopyGraphDefaultPropertiesMessage *m12 = dynamic_cast<const SetCopyGraphDefaultPropertiesMessage *>(message);
2695  if ( m12 != NULL ) {
2696  return true;
2697  }
2698  const RemovePointOfInterestMessage *m13 = dynamic_cast<const RemovePointOfInterestMessage *>(message);
2699  if ( m13 != NULL ) {
2700  return true;
2701  }
2702  const ComputeMessage *m14 = dynamic_cast<const ComputeMessage *>(message);
2703  if ( m14 != NULL ) {
2704  return true;
2705  }
2706  return false;
2707 }
2708 
2709 /// @cond INTERNALS
2710 EXPORT_INTERFACE(NavGraphGeneratorInterface)
2711 /// @endcond
2712 
2713 
2714 } // end namespace fawkes
SetFilterParamFloatMessage Fawkes BlackBoard Interface Message.
RemovePointOfInterestMessage Fawkes BlackBoard Interface Message.
AddPointOfInterestMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_p2_x() const
Get maximum length of p2_x value.
The node is marked as unconnected and will not be connected to another node.
void set_mode(const ConnectionMode new_mode)
Set mode value.
void set_max_line_point_distance(const float new_max_line_point_distance)
Set max_line_point_distance value.
EdgeMode
When adding edges, the mode defines how to add edges.
void * data_ptr
Pointer to memory that contains local data.
Definition: message.h:124
float max_line_point_distance() const
Get max_line_point_distance value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Definition: message.h:44
void set_property_value(const char *new_property_value)
Set property_value value.
virtual Message * clone() const
Clone this message.
AddPointOfInterestWithOriMessage Fawkes BlackBoard Interface Message.
SetGraphDefaultPropertyMessage Fawkes BlackBoard Interface Message.
void set_property_name(const char *new_property_name)
Set property_name value.
SetCopyGraphDefaultPropertiesMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_name() const
Get maximum length of name value.
size_t maxlenof_name() const
Get maximum length of name value.
Fawkes library namespace.
size_t maxlenof_value() const
Get maximum length of value 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_line_point_distance() const
Get maximum length of max_line_point_distance value.
SetFilterMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
SetBoundingBoxMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_property_value() const
Get maximum length of property_value value.
void set_filter(const FilterType new_filter)
Set filter value.
string field
Definition: types.h:47
If enabled, filters out all nodes which are not connected to any other node.
Sometimes after applying other filters one can end up with multiple disconnected graphs.
virtual Message * clone() const
Clone this message.
size_t maxlenof_filter() const
Get maximum length of filter value.
The node is will not be initially connected.
Base class for all Fawkes BlackBoard interfaces.
Definition: interface.h:79
size_t maxlenof_directed() const
Get maximum length of directed value.
size_t maxlenof_name() const
Get maximum length of name value.
If enabled, filters out all edges after the map generation that pass too close by an occupied cell of...
size_t maxlenof_property_value() const
Get maximum length of property_value value.
AddObstacleMessage Fawkes BlackBoard Interface Message.
SetPointOfInterestPropertyMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_filter() const
Get maximum length of filter value.
virtual Message * clone() const
Clone this message.
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
The edge is added as-is, it may overlap or intersect with other edges.
NavGraphGeneratorInterface Fawkes BlackBoard Interface.
ComputeMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
size_t maxlenof_enable() const
Get maximum length of enable value.
size_t maxlenof_p1_x() const
Get maximum length of p1_x value.
size_t maxlenof_p2_y() const
Get maximum length of p2_y value.
const char * type() const
Get type of interface.
Definition: interface.cpp:651
size_t maxlenof_p2() const
Get maximum length of p2 value.
size_t maxlenof_mode() const
Get maximum length of mode value.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
void set_filter(const FilterType new_filter)
Set filter value.
float field
Definition: types.h:45
Only insert edge if it does not intersect with any other existing edge in the graph.
void set_property_value(const char *new_property_value)
Set property_value value.
FilterType
Post-processing filtering type.
void set_property_name(const char *new_property_name)
Set property_name value.
size_t maxlenof_p1() const
Get maximum length of p1 value.
ClearMessage Fawkes BlackBoard Interface Message.
void set_enable_copy(const bool new_enable_copy)
Set enable_copy value.
size_t maxlenof_p1_y() const
Get maximum length of p1_y value.
AddMapObstaclesMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_mode() const
Get maximum length of mode value.
void set_mode(const EdgeMode new_mode)
Set mode value.
size_t maxlenof_enable_copy() const
Get maximum length of enable_copy value.
Connect point to the node on the graph closest to the given point.
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
If the new edge intersects with one or more edges, add new points at the intersections and split the ...
boolean field
Definition: types.h:36
AddEdgeMessage Fawkes BlackBoard Interface Message.
void set_directed(const bool new_directed)
Set directed value.
Connect point to the edge in which segment it lies, i.e.
RemoveObstacleMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_x() const
Get maximum length of x value.
size_t maxlenof_param() const
Get maximum length of param value.
field with interface specific enum type
Definition: types.h:49
void set_enable(const bool new_enable)
Set enable value.