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-2017 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  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
78  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
79  add_fieldinfo(IFT_UINT32, "msgid", 1, &data->msgid);
80  add_fieldinfo(IFT_BOOL, "final", 1, &data->final);
81  add_fieldinfo(IFT_BOOL, "ok", 1, &data->ok);
82  add_fieldinfo(IFT_STRING, "error_message", 128, data->error_message);
83  add_messageinfo("ClearMessage");
84  add_messageinfo("SetAlgorithmMessage");
85  add_messageinfo("SetAlgorithmParameterMessage");
86  add_messageinfo("SetBoundingBoxMessage");
87  add_messageinfo("SetFilterMessage");
88  add_messageinfo("SetFilterParamFloatMessage");
89  add_messageinfo("AddMapObstaclesMessage");
90  add_messageinfo("AddObstacleMessage");
91  add_messageinfo("RemoveObstacleMessage");
92  add_messageinfo("AddPointOfInterestMessage");
93  add_messageinfo("AddPointOfInterestWithOriMessage");
94  add_messageinfo("SetPointOfInterestPropertyMessage");
95  add_messageinfo("AddEdgeMessage");
96  add_messageinfo("SetGraphDefaultPropertyMessage");
97  add_messageinfo("SetCopyGraphDefaultPropertiesMessage");
98  add_messageinfo("RemovePointOfInterestMessage");
99  add_messageinfo("ComputeMessage");
100  unsigned char tmp_hash[] = {0xec, 0x52, 0xc2, 0x84, 0x36, 0x53, 0x28, 0xc3, 0xdd, 0x79, 0x9f, 0x29, 0xe0, 0x48, 0xab, 0x6};
101  set_hash(tmp_hash);
102 }
103 
104 /** Destructor */
105 NavGraphGeneratorInterface::~NavGraphGeneratorInterface()
106 {
107  free(data_ptr);
108 }
109 /** Convert ConnectionMode constant to string.
110  * @param value value to convert to string
111  * @return constant value as string.
112  */
113 const char *
114 NavGraphGeneratorInterface::tostring_ConnectionMode(ConnectionMode value) const
115 {
116  switch (value) {
117  case NOT_CONNECTED: return "NOT_CONNECTED";
118  case UNCONNECTED: return "UNCONNECTED";
119  case CLOSEST_NODE: return "CLOSEST_NODE";
120  case CLOSEST_EDGE: return "CLOSEST_EDGE";
121  case CLOSEST_EDGE_OR_NODE: return "CLOSEST_EDGE_OR_NODE";
122  default: return "UNKNOWN";
123  }
124 }
125 /** Convert FilterType constant to string.
126  * @param value value to convert to string
127  * @return constant value as string.
128  */
129 const char *
130 NavGraphGeneratorInterface::tostring_FilterType(FilterType value) const
131 {
132  switch (value) {
133  case FILTER_EDGES_BY_MAP: return "FILTER_EDGES_BY_MAP";
134  case FILTER_ORPHAN_NODES: return "FILTER_ORPHAN_NODES";
135  case FILTER_MULTI_GRAPH: return "FILTER_MULTI_GRAPH";
136  default: return "UNKNOWN";
137  }
138 }
139 /** Convert EdgeMode constant to string.
140  * @param value value to convert to string
141  * @return constant value as string.
142  */
143 const char *
144 NavGraphGeneratorInterface::tostring_EdgeMode(EdgeMode value) const
145 {
146  switch (value) {
147  case NO_INTERSECTION: return "NO_INTERSECTION";
148  case SPLIT_INTERSECTION: return "SPLIT_INTERSECTION";
149  case FORCE: return "FORCE";
150  default: return "UNKNOWN";
151  }
152 }
153 /** Convert Algorithm constant to string.
154  * @param value value to convert to string
155  * @return constant value as string.
156  */
157 const char *
158 NavGraphGeneratorInterface::tostring_Algorithm(Algorithm value) const
159 {
160  switch (value) {
161  case ALGORITHM_VORONOI: return "ALGORITHM_VORONOI";
162  case ALGORITHM_GRID: return "ALGORITHM_GRID";
163  default: return "UNKNOWN";
164  }
165 }
166 /* Methods */
167 /** Get msgid value.
168  *
169  The ID of the message that is currently being processed or
170  was processed last.
171 
172  * @return msgid value
173  */
174 uint32_t
175 NavGraphGeneratorInterface::msgid() const
176 {
177  return data->msgid;
178 }
179 
180 /** Get maximum length of msgid value.
181  * @return length of msgid value, can be length of the array or number of
182  * maximum number of characters for a string
183  */
184 size_t
185 NavGraphGeneratorInterface::maxlenof_msgid() const
186 {
187  return 1;
188 }
189 
190 /** Set msgid value.
191  *
192  The ID of the message that is currently being processed or
193  was processed last.
194 
195  * @param new_msgid new msgid value
196  */
197 void
198 NavGraphGeneratorInterface::set_msgid(const uint32_t new_msgid)
199 {
200  set_field(data->msgid, new_msgid);
201 }
202 
203 /** Get final value.
204  *
205  True, if the last generation triggered by a ComputeMessage has
206  been completed, false if it is still running. Also check the
207  msgid field if this field applies to the correct message.
208 
209  * @return final value
210  */
211 bool
212 NavGraphGeneratorInterface::is_final() const
213 {
214  return data->final;
215 }
216 
217 /** Get maximum length of final value.
218  * @return length of final value, can be length of the array or number of
219  * maximum number of characters for a string
220  */
221 size_t
222 NavGraphGeneratorInterface::maxlenof_final() const
223 {
224  return 1;
225 }
226 
227 /** Set final value.
228  *
229  True, if the last generation triggered by a ComputeMessage has
230  been completed, false if it is still running. Also check the
231  msgid field if this field applies to the correct message.
232 
233  * @param new_final new final value
234  */
235 void
236 NavGraphGeneratorInterface::set_final(const bool new_final)
237 {
238  set_field(data->final, new_final);
239 }
240 
241 /** Get ok value.
242  *
243  Indicate success (true) or failure (false) of the most recent
244  navgraph generation (valid if final equals true).
245 
246  * @return ok value
247  */
248 bool
249 NavGraphGeneratorInterface::is_ok() const
250 {
251  return data->ok;
252 }
253 
254 /** Get maximum length of ok value.
255  * @return length of ok value, can be length of the array or number of
256  * maximum number of characters for a string
257  */
258 size_t
259 NavGraphGeneratorInterface::maxlenof_ok() const
260 {
261  return 1;
262 }
263 
264 /** Set ok value.
265  *
266  Indicate success (true) or failure (false) of the most recent
267  navgraph generation (valid if final equals true).
268 
269  * @param new_ok new ok value
270  */
271 void
272 NavGraphGeneratorInterface::set_ok(const bool new_ok)
273 {
274  set_field(data->ok, new_ok);
275 }
276 
277 /** Get error_message value.
278  *
279  If the "ok" field is false, may give an additional clue about
280  the encountered error.
281 
282  * @return error_message value
283  */
284 char *
285 NavGraphGeneratorInterface::error_message() const
286 {
287  return data->error_message;
288 }
289 
290 /** Get maximum length of error_message value.
291  * @return length of error_message value, can be length of the array or number of
292  * maximum number of characters for a string
293  */
294 size_t
295 NavGraphGeneratorInterface::maxlenof_error_message() const
296 {
297  return 128;
298 }
299 
300 /** Set error_message value.
301  *
302  If the "ok" field is false, may give an additional clue about
303  the encountered error.
304 
305  * @param new_error_message new error_message value
306  */
307 void
308 NavGraphGeneratorInterface::set_error_message(const char * new_error_message)
309 {
310  set_field(data->error_message, new_error_message);
311 }
312 
313 /* =========== message create =========== */
314 Message *
315 NavGraphGeneratorInterface::create_message(const char *type) const
316 {
317  if ( strncmp("ClearMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
318  return new ClearMessage();
319  } else if ( strncmp("SetAlgorithmMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
320  return new SetAlgorithmMessage();
321  } else if ( strncmp("SetAlgorithmParameterMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
322  return new SetAlgorithmParameterMessage();
323  } else if ( strncmp("SetBoundingBoxMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
324  return new SetBoundingBoxMessage();
325  } else if ( strncmp("SetFilterMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
326  return new SetFilterMessage();
327  } else if ( strncmp("SetFilterParamFloatMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
328  return new SetFilterParamFloatMessage();
329  } else if ( strncmp("AddMapObstaclesMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
330  return new AddMapObstaclesMessage();
331  } else if ( strncmp("AddObstacleMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
332  return new AddObstacleMessage();
333  } else if ( strncmp("RemoveObstacleMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
334  return new RemoveObstacleMessage();
335  } else if ( strncmp("AddPointOfInterestMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
336  return new AddPointOfInterestMessage();
337  } else if ( strncmp("AddPointOfInterestWithOriMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
339  } else if ( strncmp("SetPointOfInterestPropertyMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
341  } else if ( strncmp("AddEdgeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
342  return new AddEdgeMessage();
343  } else if ( strncmp("SetGraphDefaultPropertyMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
344  return new SetGraphDefaultPropertyMessage();
345  } else if ( strncmp("SetCopyGraphDefaultPropertiesMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
347  } else if ( strncmp("RemovePointOfInterestMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
348  return new RemovePointOfInterestMessage();
349  } else if ( strncmp("ComputeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
350  return new ComputeMessage();
351  } else {
352  throw UnknownTypeException("The given type '%s' does not match any known "
353  "message type for this interface type.", type);
354  }
355 }
356 
357 
358 /** Copy values from other interface.
359  * @param other other interface to copy values from
360  */
361 void
362 NavGraphGeneratorInterface::copy_values(const Interface *other)
363 {
364  const NavGraphGeneratorInterface *oi = dynamic_cast<const NavGraphGeneratorInterface *>(other);
365  if (oi == NULL) {
366  throw TypeMismatchException("Can only copy values from interface of same type (%s vs. %s)",
367  type(), other->type());
368  }
369  memcpy(data, oi->data, sizeof(NavGraphGeneratorInterface_data_t));
370 }
371 
372 const char *
373 NavGraphGeneratorInterface::enum_tostring(const char *enumtype, int val) const
374 {
375  if (strcmp(enumtype, "ConnectionMode") == 0) {
376  return tostring_ConnectionMode((ConnectionMode)val);
377  }
378  if (strcmp(enumtype, "FilterType") == 0) {
379  return tostring_FilterType((FilterType)val);
380  }
381  if (strcmp(enumtype, "EdgeMode") == 0) {
382  return tostring_EdgeMode((EdgeMode)val);
383  }
384  if (strcmp(enumtype, "Algorithm") == 0) {
385  return tostring_Algorithm((Algorithm)val);
386  }
387  throw UnknownTypeException("Unknown enum type %s", enumtype);
388 }
389 
390 /* =========== messages =========== */
391 /** @class NavGraphGeneratorInterface::ClearMessage <interfaces/NavGraphGeneratorInterface.h>
392  * ClearMessage Fawkes BlackBoard Interface Message.
393  *
394 
395  */
396 
397 
398 /** Constructor */
399 NavGraphGeneratorInterface::ClearMessage::ClearMessage() : Message("ClearMessage")
400 {
401  data_size = sizeof(ClearMessage_data_t);
402  data_ptr = malloc(data_size);
403  memset(data_ptr, 0, data_size);
404  data = (ClearMessage_data_t *)data_ptr;
406  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
407  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
408  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
409  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
410  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
411  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
412  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
413  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
414  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
415  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
416  enum_map_EdgeMode[(int)FORCE] = "FORCE";
417  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
418  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
419 }
420 
421 /** Destructor */
423 {
424  free(data_ptr);
425 }
426 
427 /** Copy constructor.
428  * @param m message to copy from
429  */
431 {
432  data_size = m->data_size;
433  data_ptr = malloc(data_size);
434  memcpy(data_ptr, m->data_ptr, data_size);
435  data = (ClearMessage_data_t *)data_ptr;
437 }
438 
439 /* Methods */
440 /** Clone this message.
441  * Produces a message of the same type as this message and copies the
442  * data to the new message.
443  * @return clone of this message
444  */
445 Message *
447 {
449 }
450 /** @class NavGraphGeneratorInterface::SetAlgorithmMessage <interfaces/NavGraphGeneratorInterface.h>
451  * SetAlgorithmMessage Fawkes BlackBoard Interface Message.
452  *
453 
454  */
455 
456 
457 /** Constructor with initial values.
458  * @param ini_algorithm initial value for algorithm
459  */
461 {
462  data_size = sizeof(SetAlgorithmMessage_data_t);
463  data_ptr = malloc(data_size);
464  memset(data_ptr, 0, data_size);
465  data = (SetAlgorithmMessage_data_t *)data_ptr;
467  data->algorithm = ini_algorithm;
468  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
469  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
470  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
471  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
472  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
473  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
474  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
475  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
476  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
477  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
478  enum_map_EdgeMode[(int)FORCE] = "FORCE";
479  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
480  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
481  add_fieldinfo(IFT_ENUM, "algorithm", 1, &data->algorithm, "Algorithm", &enum_map_Algorithm);
482 }
483 /** Constructor */
485 {
486  data_size = sizeof(SetAlgorithmMessage_data_t);
487  data_ptr = malloc(data_size);
488  memset(data_ptr, 0, data_size);
489  data = (SetAlgorithmMessage_data_t *)data_ptr;
491  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
492  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
493  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
494  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
495  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
496  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
497  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
498  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
499  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
500  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
501  enum_map_EdgeMode[(int)FORCE] = "FORCE";
502  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
503  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
504  add_fieldinfo(IFT_ENUM, "algorithm", 1, &data->algorithm, "Algorithm", &enum_map_Algorithm);
505 }
506 
507 /** Destructor */
509 {
510  free(data_ptr);
511 }
512 
513 /** Copy constructor.
514  * @param m message to copy from
515  */
517 {
518  data_size = m->data_size;
519  data_ptr = malloc(data_size);
520  memcpy(data_ptr, m->data_ptr, data_size);
521  data = (SetAlgorithmMessage_data_t *)data_ptr;
523 }
524 
525 /* Methods */
526 /** Get algorithm value.
527  * Algorithm to use.
528  * @return algorithm value
529  */
532 {
533  return (NavGraphGeneratorInterface::Algorithm)data->algorithm;
534 }
535 
536 /** Get maximum length of algorithm value.
537  * @return length of algorithm 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 algorithm value.
547  * Algorithm to use.
548  * @param new_algorithm new algorithm value
549  */
550 void
552 {
553  set_field(data->algorithm, new_algorithm);
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::SetAlgorithmParameterMessage <interfaces/NavGraphGeneratorInterface.h>
567  * SetAlgorithmParameterMessage Fawkes BlackBoard Interface Message.
568  *
569 
570  */
571 
572 
573 /** Constructor with initial values.
574  * @param ini_param initial value for param
575  * @param ini_value initial value for value
576  */
577 NavGraphGeneratorInterface::SetAlgorithmParameterMessage::SetAlgorithmParameterMessage(const char * ini_param, const char * ini_value) : Message("SetAlgorithmParameterMessage")
578 {
579  data_size = sizeof(SetAlgorithmParameterMessage_data_t);
580  data_ptr = malloc(data_size);
581  memset(data_ptr, 0, data_size);
582  data = (SetAlgorithmParameterMessage_data_t *)data_ptr;
584  strncpy(data->param, ini_param, 32-1);
585  data->param[32-1] = 0;
586  strncpy(data->value, ini_value, 64-1);
587  data->value[64-1] = 0;
588  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
589  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
590  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
591  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
592  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
593  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
594  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
595  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
596  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
597  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
598  enum_map_EdgeMode[(int)FORCE] = "FORCE";
599  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
600  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
601  add_fieldinfo(IFT_STRING, "param", 32, data->param);
602  add_fieldinfo(IFT_STRING, "value", 64, data->value);
603 }
604 /** Constructor */
606 {
607  data_size = sizeof(SetAlgorithmParameterMessage_data_t);
608  data_ptr = malloc(data_size);
609  memset(data_ptr, 0, data_size);
610  data = (SetAlgorithmParameterMessage_data_t *)data_ptr;
612  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
613  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
614  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
615  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
616  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
617  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
618  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
619  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
620  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
621  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
622  enum_map_EdgeMode[(int)FORCE] = "FORCE";
623  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
624  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
625  add_fieldinfo(IFT_STRING, "param", 32, data->param);
626  add_fieldinfo(IFT_STRING, "value", 64, data->value);
627 }
628 
629 /** Destructor */
631 {
632  free(data_ptr);
633 }
634 
635 /** Copy constructor.
636  * @param m message to copy from
637  */
639 {
640  data_size = m->data_size;
641  data_ptr = malloc(data_size);
642  memcpy(data_ptr, m->data_ptr, data_size);
643  data = (SetAlgorithmParameterMessage_data_t *)data_ptr;
645 }
646 
647 /* Methods */
648 /** Get param value.
649  * Parameter name, see
650  Algorithm enum description for algorithm-specific
651  parameters. Unknown parameters will be ignored.
652  * @return param value
653  */
654 char *
656 {
657  return data->param;
658 }
659 
660 /** Get maximum length of param value.
661  * @return length of param value, can be length of the array or number of
662  * maximum number of characters for a string
663  */
664 size_t
666 {
667  return 32;
668 }
669 
670 /** Set param value.
671  * Parameter name, see
672  Algorithm enum description for algorithm-specific
673  parameters. Unknown parameters will be ignored.
674  * @param new_param new param value
675  */
676 void
678 {
679  set_field(data->param, new_param);
680 }
681 
682 /** Get value value.
683  * Value of parameter
684  encoded as string. The algorithm will perform the conversion to
685  the required data type (e.g., float). An error will make the
686  generation fail.
687  * @return value value
688  */
689 char *
691 {
692  return data->value;
693 }
694 
695 /** Get maximum length of value value.
696  * @return length of value value, can be length of the array or number of
697  * maximum number of characters for a string
698  */
699 size_t
701 {
702  return 64;
703 }
704 
705 /** Set value value.
706  * Value of parameter
707  encoded as string. The algorithm will perform the conversion to
708  the required data type (e.g., float). An error will make the
709  generation fail.
710  * @param new_value new value value
711  */
712 void
714 {
715  set_field(data->value, new_value);
716 }
717 
718 /** Clone this message.
719  * Produces a message of the same type as this message and copies the
720  * data to the new message.
721  * @return clone of this message
722  */
723 Message *
725 {
727 }
728 /** @class NavGraphGeneratorInterface::SetBoundingBoxMessage <interfaces/NavGraphGeneratorInterface.h>
729  * SetBoundingBoxMessage Fawkes BlackBoard Interface Message.
730  *
731 
732  */
733 
734 
735 /** Constructor with initial values.
736  * @param ini_p1_x initial value for p1_x
737  * @param ini_p1_y initial value for p1_y
738  * @param ini_p2_x initial value for p2_x
739  * @param ini_p2_y initial value for p2_y
740  */
741 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")
742 {
743  data_size = sizeof(SetBoundingBoxMessage_data_t);
744  data_ptr = malloc(data_size);
745  memset(data_ptr, 0, data_size);
746  data = (SetBoundingBoxMessage_data_t *)data_ptr;
748  data->p1_x = ini_p1_x;
749  data->p1_y = ini_p1_y;
750  data->p2_x = ini_p2_x;
751  data->p2_y = ini_p2_y;
752  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
753  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
754  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
755  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
756  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
757  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
758  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
759  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
760  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
761  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
762  enum_map_EdgeMode[(int)FORCE] = "FORCE";
763  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
764  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
765  add_fieldinfo(IFT_FLOAT, "p1_x", 1, &data->p1_x);
766  add_fieldinfo(IFT_FLOAT, "p1_y", 1, &data->p1_y);
767  add_fieldinfo(IFT_FLOAT, "p2_x", 1, &data->p2_x);
768  add_fieldinfo(IFT_FLOAT, "p2_y", 1, &data->p2_y);
769 }
770 /** Constructor */
772 {
773  data_size = sizeof(SetBoundingBoxMessage_data_t);
774  data_ptr = malloc(data_size);
775  memset(data_ptr, 0, data_size);
776  data = (SetBoundingBoxMessage_data_t *)data_ptr;
778  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
779  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
780  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
781  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
782  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
783  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
784  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
785  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
786  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
787  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
788  enum_map_EdgeMode[(int)FORCE] = "FORCE";
789  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
790  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
791  add_fieldinfo(IFT_FLOAT, "p1_x", 1, &data->p1_x);
792  add_fieldinfo(IFT_FLOAT, "p1_y", 1, &data->p1_y);
793  add_fieldinfo(IFT_FLOAT, "p2_x", 1, &data->p2_x);
794  add_fieldinfo(IFT_FLOAT, "p2_y", 1, &data->p2_y);
795 }
796 
797 /** Destructor */
799 {
800  free(data_ptr);
801 }
802 
803 /** Copy constructor.
804  * @param m message to copy from
805  */
807 {
808  data_size = m->data_size;
809  data_ptr = malloc(data_size);
810  memcpy(data_ptr, m->data_ptr, data_size);
811  data = (SetBoundingBoxMessage_data_t *)data_ptr;
813 }
814 
815 /* Methods */
816 /** Get p1_x value.
817  * X coordinate of bbox start point in global frame.
818  * @return p1_x value
819  */
820 float
822 {
823  return data->p1_x;
824 }
825 
826 /** Get maximum length of p1_x value.
827  * @return length of p1_x value, can be length of the array or number of
828  * maximum number of characters for a string
829  */
830 size_t
832 {
833  return 1;
834 }
835 
836 /** Set p1_x value.
837  * X coordinate of bbox start point in global frame.
838  * @param new_p1_x new p1_x value
839  */
840 void
842 {
843  set_field(data->p1_x, new_p1_x);
844 }
845 
846 /** Get p1_y value.
847  * Y coordinate of bbox start point in global frame.
848  * @return p1_y value
849  */
850 float
852 {
853  return data->p1_y;
854 }
855 
856 /** Get maximum length of p1_y value.
857  * @return length of p1_y value, can be length of the array or number of
858  * maximum number of characters for a string
859  */
860 size_t
862 {
863  return 1;
864 }
865 
866 /** Set p1_y value.
867  * Y coordinate of bbox start point in global frame.
868  * @param new_p1_y new p1_y value
869  */
870 void
872 {
873  set_field(data->p1_y, new_p1_y);
874 }
875 
876 /** Get p2_x value.
877  * X coordinate of bbox end point in global frame.
878  * @return p2_x value
879  */
880 float
882 {
883  return data->p2_x;
884 }
885 
886 /** Get maximum length of p2_x value.
887  * @return length of p2_x value, can be length of the array or number of
888  * maximum number of characters for a string
889  */
890 size_t
892 {
893  return 1;
894 }
895 
896 /** Set p2_x value.
897  * X coordinate of bbox end point in global frame.
898  * @param new_p2_x new p2_x value
899  */
900 void
902 {
903  set_field(data->p2_x, new_p2_x);
904 }
905 
906 /** Get p2_y value.
907  * Y coordinate of bbox end point in global frame.
908  * @return p2_y value
909  */
910 float
912 {
913  return data->p2_y;
914 }
915 
916 /** Get maximum length of p2_y value.
917  * @return length of p2_y value, can be length of the array or number of
918  * maximum number of characters for a string
919  */
920 size_t
922 {
923  return 1;
924 }
925 
926 /** Set p2_y value.
927  * Y coordinate of bbox end point in global frame.
928  * @param new_p2_y new p2_y value
929  */
930 void
932 {
933  set_field(data->p2_y, new_p2_y);
934 }
935 
936 /** Clone this message.
937  * Produces a message of the same type as this message and copies the
938  * data to the new message.
939  * @return clone of this message
940  */
941 Message *
943 {
945 }
946 /** @class NavGraphGeneratorInterface::SetFilterMessage <interfaces/NavGraphGeneratorInterface.h>
947  * SetFilterMessage Fawkes BlackBoard Interface Message.
948  *
949 
950  */
951 
952 
953 /** Constructor with initial values.
954  * @param ini_filter initial value for filter
955  * @param ini_enable initial value for enable
956  */
957 NavGraphGeneratorInterface::SetFilterMessage::SetFilterMessage(const FilterType ini_filter, const bool ini_enable) : Message("SetFilterMessage")
958 {
959  data_size = sizeof(SetFilterMessage_data_t);
960  data_ptr = malloc(data_size);
961  memset(data_ptr, 0, data_size);
962  data = (SetFilterMessage_data_t *)data_ptr;
964  data->filter = ini_filter;
965  data->enable = ini_enable;
966  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
967  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
968  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
969  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
970  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
971  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
972  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
973  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
974  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
975  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
976  enum_map_EdgeMode[(int)FORCE] = "FORCE";
977  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
978  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
979  add_fieldinfo(IFT_ENUM, "filter", 1, &data->filter, "FilterType", &enum_map_FilterType);
980  add_fieldinfo(IFT_BOOL, "enable", 1, &data->enable);
981 }
982 /** Constructor */
984 {
985  data_size = sizeof(SetFilterMessage_data_t);
986  data_ptr = malloc(data_size);
987  memset(data_ptr, 0, data_size);
988  data = (SetFilterMessage_data_t *)data_ptr;
990  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
991  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
992  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
993  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
994  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
995  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
996  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
997  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
998  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
999  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1000  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1001  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1002  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1003  add_fieldinfo(IFT_ENUM, "filter", 1, &data->filter, "FilterType", &enum_map_FilterType);
1004  add_fieldinfo(IFT_BOOL, "enable", 1, &data->enable);
1005 }
1006 
1007 /** Destructor */
1009 {
1010  free(data_ptr);
1011 }
1012 
1013 /** Copy constructor.
1014  * @param m message to copy from
1015  */
1017 {
1018  data_size = m->data_size;
1019  data_ptr = malloc(data_size);
1020  memcpy(data_ptr, m->data_ptr, data_size);
1021  data = (SetFilterMessage_data_t *)data_ptr;
1023 }
1024 
1025 /* Methods */
1026 /** Get filter value.
1027  * Which filter to
1028  enable/disable.
1029  * @return filter value
1030  */
1033 {
1034  return (NavGraphGeneratorInterface::FilterType)data->filter;
1035 }
1036 
1037 /** Get maximum length of filter value.
1038  * @return length of filter value, can be length of the array or number of
1039  * maximum number of characters for a string
1040  */
1041 size_t
1043 {
1044  return 1;
1045 }
1046 
1047 /** Set filter value.
1048  * Which filter to
1049  enable/disable.
1050  * @param new_filter new filter value
1051  */
1052 void
1054 {
1055  set_field(data->filter, new_filter);
1056 }
1057 
1058 /** Get enable value.
1059  * True to enable, false to
1060  disable
1061  * @return enable value
1062  */
1063 bool
1065 {
1066  return data->enable;
1067 }
1068 
1069 /** Get maximum length of enable value.
1070  * @return length of enable value, can be length of the array or number of
1071  * maximum number of characters for a string
1072  */
1073 size_t
1075 {
1076  return 1;
1077 }
1078 
1079 /** Set enable value.
1080  * True to enable, false to
1081  disable
1082  * @param new_enable new enable value
1083  */
1084 void
1086 {
1087  set_field(data->enable, new_enable);
1088 }
1089 
1090 /** Clone this message.
1091  * Produces a message of the same type as this message and copies the
1092  * data to the new message.
1093  * @return clone of this message
1094  */
1095 Message *
1097 {
1099 }
1100 /** @class NavGraphGeneratorInterface::SetFilterParamFloatMessage <interfaces/NavGraphGeneratorInterface.h>
1101  * SetFilterParamFloatMessage Fawkes BlackBoard Interface Message.
1102  *
1103 
1104  */
1105 
1106 
1107 /** Constructor with initial values.
1108  * @param ini_filter initial value for filter
1109  * @param ini_param initial value for param
1110  * @param ini_value initial value for value
1111  */
1112 NavGraphGeneratorInterface::SetFilterParamFloatMessage::SetFilterParamFloatMessage(const FilterType ini_filter, const char * ini_param, const float ini_value) : Message("SetFilterParamFloatMessage")
1113 {
1114  data_size = sizeof(SetFilterParamFloatMessage_data_t);
1115  data_ptr = malloc(data_size);
1116  memset(data_ptr, 0, data_size);
1117  data = (SetFilterParamFloatMessage_data_t *)data_ptr;
1119  data->filter = ini_filter;
1120  strncpy(data->param, ini_param, 32-1);
1121  data->param[32-1] = 0;
1122  data->value = ini_value;
1123  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1124  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1125  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1126  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1127  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1128  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1129  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1130  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1131  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1132  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1133  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1134  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1135  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1136  add_fieldinfo(IFT_ENUM, "filter", 1, &data->filter, "FilterType", &enum_map_FilterType);
1137  add_fieldinfo(IFT_STRING, "param", 32, data->param);
1138  add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
1139 }
1140 /** Constructor */
1142 {
1143  data_size = sizeof(SetFilterParamFloatMessage_data_t);
1144  data_ptr = malloc(data_size);
1145  memset(data_ptr, 0, data_size);
1146  data = (SetFilterParamFloatMessage_data_t *)data_ptr;
1148  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1149  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1150  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1151  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1152  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1153  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1154  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1155  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1156  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1157  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1158  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1159  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1160  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1161  add_fieldinfo(IFT_ENUM, "filter", 1, &data->filter, "FilterType", &enum_map_FilterType);
1162  add_fieldinfo(IFT_STRING, "param", 32, data->param);
1163  add_fieldinfo(IFT_FLOAT, "value", 1, &data->value);
1164 }
1165 
1166 /** Destructor */
1168 {
1169  free(data_ptr);
1170 }
1171 
1172 /** Copy constructor.
1173  * @param m message to copy from
1174  */
1176 {
1177  data_size = m->data_size;
1178  data_ptr = malloc(data_size);
1179  memcpy(data_ptr, m->data_ptr, data_size);
1180  data = (SetFilterParamFloatMessage_data_t *)data_ptr;
1182 }
1183 
1184 /* Methods */
1185 /** Get filter value.
1186  * Which filter to
1187  enable/disable.
1188  * @return filter value
1189  */
1192 {
1193  return (NavGraphGeneratorInterface::FilterType)data->filter;
1194 }
1195 
1196 /** Get maximum length of filter value.
1197  * @return length of filter value, can be length of the array or number of
1198  * maximum number of characters for a string
1199  */
1200 size_t
1202 {
1203  return 1;
1204 }
1205 
1206 /** Set filter value.
1207  * Which filter to
1208  enable/disable.
1209  * @param new_filter new filter value
1210  */
1211 void
1213 {
1214  set_field(data->filter, new_filter);
1215 }
1216 
1217 /** Get param value.
1218  * Parameter name, see FilterType
1219  description for possible values.
1220  * @return param value
1221  */
1222 char *
1224 {
1225  return data->param;
1226 }
1227 
1228 /** Get maximum length of param value.
1229  * @return length of param value, can be length of the array or number of
1230  * maximum number of characters for a string
1231  */
1232 size_t
1234 {
1235  return 32;
1236 }
1237 
1238 /** Set param value.
1239  * Parameter name, see FilterType
1240  description for possible values.
1241  * @param new_param new param value
1242  */
1243 void
1245 {
1246  set_field(data->param, new_param);
1247 }
1248 
1249 /** Get value value.
1250  * True to enable, false to
1251  disable
1252  * @return value value
1253  */
1254 float
1256 {
1257  return data->value;
1258 }
1259 
1260 /** Get maximum length of value value.
1261  * @return length of value value, can be length of the array or number of
1262  * maximum number of characters for a string
1263  */
1264 size_t
1266 {
1267  return 1;
1268 }
1269 
1270 /** Set value value.
1271  * True to enable, false to
1272  disable
1273  * @param new_value new value value
1274  */
1275 void
1277 {
1278  set_field(data->value, new_value);
1279 }
1280 
1281 /** Clone this message.
1282  * Produces a message of the same type as this message and copies the
1283  * data to the new message.
1284  * @return clone of this message
1285  */
1286 Message *
1288 {
1290 }
1291 /** @class NavGraphGeneratorInterface::AddMapObstaclesMessage <interfaces/NavGraphGeneratorInterface.h>
1292  * AddMapObstaclesMessage Fawkes BlackBoard Interface Message.
1293  *
1294 
1295  */
1296 
1297 
1298 /** Constructor with initial values.
1299  * @param ini_max_line_point_distance initial value for max_line_point_distance
1300  */
1301 NavGraphGeneratorInterface::AddMapObstaclesMessage::AddMapObstaclesMessage(const float ini_max_line_point_distance) : Message("AddMapObstaclesMessage")
1302 {
1303  data_size = sizeof(AddMapObstaclesMessage_data_t);
1304  data_ptr = malloc(data_size);
1305  memset(data_ptr, 0, data_size);
1306  data = (AddMapObstaclesMessage_data_t *)data_ptr;
1308  data->max_line_point_distance = ini_max_line_point_distance;
1309  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1310  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1311  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1312  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1313  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1314  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1315  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1316  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1317  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1318  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1319  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1320  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1321  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1322  add_fieldinfo(IFT_FLOAT, "max_line_point_distance", 1, &data->max_line_point_distance);
1323 }
1324 /** Constructor */
1326 {
1327  data_size = sizeof(AddMapObstaclesMessage_data_t);
1328  data_ptr = malloc(data_size);
1329  memset(data_ptr, 0, data_size);
1330  data = (AddMapObstaclesMessage_data_t *)data_ptr;
1332  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1333  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1334  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1335  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1336  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1337  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1338  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1339  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1340  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1341  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1342  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1343  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1344  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1345  add_fieldinfo(IFT_FLOAT, "max_line_point_distance", 1, &data->max_line_point_distance);
1346 }
1347 
1348 /** Destructor */
1350 {
1351  free(data_ptr);
1352 }
1353 
1354 /** Copy constructor.
1355  * @param m message to copy from
1356  */
1358 {
1359  data_size = m->data_size;
1360  data_ptr = malloc(data_size);
1361  memcpy(data_ptr, m->data_ptr, data_size);
1362  data = (AddMapObstaclesMessage_data_t *)data_ptr;
1364 }
1365 
1366 /* Methods */
1367 /** Get max_line_point_distance value.
1368  *
1369  For points generated on lines found in the map, do not exceed
1370  this threshold in terms of maximum distance of points on line.
1371 
1372  * @return max_line_point_distance value
1373  */
1374 float
1376 {
1377  return data->max_line_point_distance;
1378 }
1379 
1380 /** Get maximum length of max_line_point_distance value.
1381  * @return length of max_line_point_distance value, can be length of the array or number of
1382  * maximum number of characters for a string
1383  */
1384 size_t
1386 {
1387  return 1;
1388 }
1389 
1390 /** Set max_line_point_distance value.
1391  *
1392  For points generated on lines found in the map, do not exceed
1393  this threshold in terms of maximum distance of points on line.
1394 
1395  * @param new_max_line_point_distance new max_line_point_distance value
1396  */
1397 void
1399 {
1400  set_field(data->max_line_point_distance, new_max_line_point_distance);
1401 }
1402 
1403 /** Clone this message.
1404  * Produces a message of the same type as this message and copies the
1405  * data to the new message.
1406  * @return clone of this message
1407  */
1408 Message *
1410 {
1412 }
1413 /** @class NavGraphGeneratorInterface::AddObstacleMessage <interfaces/NavGraphGeneratorInterface.h>
1414  * AddObstacleMessage Fawkes BlackBoard Interface Message.
1415  *
1416 
1417  */
1418 
1419 
1420 /** Constructor with initial values.
1421  * @param ini_name initial value for name
1422  * @param ini_x initial value for x
1423  * @param ini_y initial value for y
1424  */
1425 NavGraphGeneratorInterface::AddObstacleMessage::AddObstacleMessage(const char * ini_name, const float ini_x, const float ini_y) : Message("AddObstacleMessage")
1426 {
1427  data_size = sizeof(AddObstacleMessage_data_t);
1428  data_ptr = malloc(data_size);
1429  memset(data_ptr, 0, data_size);
1430  data = (AddObstacleMessage_data_t *)data_ptr;
1432  strncpy(data->name, ini_name, 64-1);
1433  data->name[64-1] = 0;
1434  data->x = ini_x;
1435  data->y = ini_y;
1436  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1437  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1438  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1439  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1440  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1441  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1442  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1443  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1444  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1445  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1446  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1447  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1448  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1449  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1450  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1451  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1452 }
1453 /** Constructor */
1455 {
1456  data_size = sizeof(AddObstacleMessage_data_t);
1457  data_ptr = malloc(data_size);
1458  memset(data_ptr, 0, data_size);
1459  data = (AddObstacleMessage_data_t *)data_ptr;
1461  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1462  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1463  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1464  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1465  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1466  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1467  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1468  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1469  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1470  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1471  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1472  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1473  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1474  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1475  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1476  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1477 }
1478 
1479 /** Destructor */
1481 {
1482  free(data_ptr);
1483 }
1484 
1485 /** Copy constructor.
1486  * @param m message to copy from
1487  */
1489 {
1490  data_size = m->data_size;
1491  data_ptr = malloc(data_size);
1492  memcpy(data_ptr, m->data_ptr, data_size);
1493  data = (AddObstacleMessage_data_t *)data_ptr;
1495 }
1496 
1497 /* Methods */
1498 /** Get name value.
1499  *
1500  ID of the obstacle. Can later be used to remove it again.
1501 
1502  * @return name value
1503  */
1504 char *
1506 {
1507  return data->name;
1508 }
1509 
1510 /** Get maximum length of name value.
1511  * @return length of name 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 64;
1518 }
1519 
1520 /** Set name value.
1521  *
1522  ID of the obstacle. Can later be used to remove it again.
1523 
1524  * @param new_name new name value
1525  */
1526 void
1528 {
1529  set_field(data->name, new_name);
1530 }
1531 
1532 /** Get x value.
1533  * X coordinate of obstacle in global frame.
1534  * @return x value
1535  */
1536 float
1538 {
1539  return data->x;
1540 }
1541 
1542 /** Get maximum length of x value.
1543  * @return length of x value, can be length of the array or number of
1544  * maximum number of characters for a string
1545  */
1546 size_t
1548 {
1549  return 1;
1550 }
1551 
1552 /** Set x value.
1553  * X coordinate of obstacle in global frame.
1554  * @param new_x new x value
1555  */
1556 void
1558 {
1559  set_field(data->x, new_x);
1560 }
1561 
1562 /** Get y value.
1563  * Y coordinate of obstacle in global frame.
1564  * @return y value
1565  */
1566 float
1568 {
1569  return data->y;
1570 }
1571 
1572 /** Get maximum length of y value.
1573  * @return length of y value, can be length of the array or number of
1574  * maximum number of characters for a string
1575  */
1576 size_t
1578 {
1579  return 1;
1580 }
1581 
1582 /** Set y value.
1583  * Y coordinate of obstacle in global frame.
1584  * @param new_y new y value
1585  */
1586 void
1588 {
1589  set_field(data->y, new_y);
1590 }
1591 
1592 /** Clone this message.
1593  * Produces a message of the same type as this message and copies the
1594  * data to the new message.
1595  * @return clone of this message
1596  */
1597 Message *
1599 {
1601 }
1602 /** @class NavGraphGeneratorInterface::RemoveObstacleMessage <interfaces/NavGraphGeneratorInterface.h>
1603  * RemoveObstacleMessage Fawkes BlackBoard Interface Message.
1604  *
1605 
1606  */
1607 
1608 
1609 /** Constructor with initial values.
1610  * @param ini_name initial value for name
1611  */
1613 {
1614  data_size = sizeof(RemoveObstacleMessage_data_t);
1615  data_ptr = malloc(data_size);
1616  memset(data_ptr, 0, data_size);
1617  data = (RemoveObstacleMessage_data_t *)data_ptr;
1619  strncpy(data->name, ini_name, 64-1);
1620  data->name[64-1] = 0;
1621  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1622  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1623  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1624  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1625  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1626  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1627  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1628  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1629  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1630  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1631  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1632  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1633  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1634  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1635 }
1636 /** Constructor */
1638 {
1639  data_size = sizeof(RemoveObstacleMessage_data_t);
1640  data_ptr = malloc(data_size);
1641  memset(data_ptr, 0, data_size);
1642  data = (RemoveObstacleMessage_data_t *)data_ptr;
1644  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1645  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1646  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1647  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1648  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1649  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1650  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1651  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1652  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1653  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1654  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1655  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1656  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1657  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1658 }
1659 
1660 /** Destructor */
1662 {
1663  free(data_ptr);
1664 }
1665 
1666 /** Copy constructor.
1667  * @param m message to copy from
1668  */
1670 {
1671  data_size = m->data_size;
1672  data_ptr = malloc(data_size);
1673  memcpy(data_ptr, m->data_ptr, data_size);
1674  data = (RemoveObstacleMessage_data_t *)data_ptr;
1676 }
1677 
1678 /* Methods */
1679 /** Get name value.
1680  *
1681  ID of the obstacle to remove.
1682 
1683  * @return name value
1684  */
1685 char *
1687 {
1688  return data->name;
1689 }
1690 
1691 /** Get maximum length of name value.
1692  * @return length of name value, can be length of the array or number of
1693  * maximum number of characters for a string
1694  */
1695 size_t
1697 {
1698  return 64;
1699 }
1700 
1701 /** Set name value.
1702  *
1703  ID of the obstacle to remove.
1704 
1705  * @param new_name new name value
1706  */
1707 void
1709 {
1710  set_field(data->name, new_name);
1711 }
1712 
1713 /** Clone this message.
1714  * Produces a message of the same type as this message and copies the
1715  * data to the new message.
1716  * @return clone of this message
1717  */
1718 Message *
1720 {
1722 }
1723 /** @class NavGraphGeneratorInterface::AddPointOfInterestMessage <interfaces/NavGraphGeneratorInterface.h>
1724  * AddPointOfInterestMessage Fawkes BlackBoard Interface Message.
1725  *
1726 
1727  */
1728 
1729 
1730 /** Constructor with initial values.
1731  * @param ini_name initial value for name
1732  * @param ini_x initial value for x
1733  * @param ini_y initial value for y
1734  * @param ini_mode initial value for mode
1735  */
1736 NavGraphGeneratorInterface::AddPointOfInterestMessage::AddPointOfInterestMessage(const char * ini_name, const float ini_x, const float ini_y, const ConnectionMode ini_mode) : Message("AddPointOfInterestMessage")
1737 {
1738  data_size = sizeof(AddPointOfInterestMessage_data_t);
1739  data_ptr = malloc(data_size);
1740  memset(data_ptr, 0, data_size);
1741  data = (AddPointOfInterestMessage_data_t *)data_ptr;
1743  strncpy(data->name, ini_name, 64-1);
1744  data->name[64-1] = 0;
1745  data->x = ini_x;
1746  data->y = ini_y;
1747  data->mode = ini_mode;
1748  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1749  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1750  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1751  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1752  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1753  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1754  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1755  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1756  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1757  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1758  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1759  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1760  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1761  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1762  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1763  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1764  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "ConnectionMode", &enum_map_ConnectionMode);
1765 }
1766 /** Constructor */
1768 {
1769  data_size = sizeof(AddPointOfInterestMessage_data_t);
1770  data_ptr = malloc(data_size);
1771  memset(data_ptr, 0, data_size);
1772  data = (AddPointOfInterestMessage_data_t *)data_ptr;
1774  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1775  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1776  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1777  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1778  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1779  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1780  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1781  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1782  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1783  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1784  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1785  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1786  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1787  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1788  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1789  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1790  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "ConnectionMode", &enum_map_ConnectionMode);
1791 }
1792 
1793 /** Destructor */
1795 {
1796  free(data_ptr);
1797 }
1798 
1799 /** Copy constructor.
1800  * @param m message to copy from
1801  */
1803 {
1804  data_size = m->data_size;
1805  data_ptr = malloc(data_size);
1806  memcpy(data_ptr, m->data_ptr, data_size);
1807  data = (AddPointOfInterestMessage_data_t *)data_ptr;
1809 }
1810 
1811 /* Methods */
1812 /** Get name value.
1813  *
1814  ID of the obstacle. Can later be used to remove it again.
1815 
1816  * @return name value
1817  */
1818 char *
1820 {
1821  return data->name;
1822 }
1823 
1824 /** Get maximum length of name value.
1825  * @return length of name value, can be length of the array or number of
1826  * maximum number of characters for a string
1827  */
1828 size_t
1830 {
1831  return 64;
1832 }
1833 
1834 /** Set name value.
1835  *
1836  ID of the obstacle. Can later be used to remove it again.
1837 
1838  * @param new_name new name value
1839  */
1840 void
1842 {
1843  set_field(data->name, new_name);
1844 }
1845 
1846 /** Get x value.
1847  * X coordinate of obstacle in global frame.
1848  * @return x value
1849  */
1850 float
1852 {
1853  return data->x;
1854 }
1855 
1856 /** Get maximum length of x value.
1857  * @return length of x value, can be length of the array or number of
1858  * maximum number of characters for a string
1859  */
1860 size_t
1862 {
1863  return 1;
1864 }
1865 
1866 /** Set x value.
1867  * X coordinate of obstacle in global frame.
1868  * @param new_x new x value
1869  */
1870 void
1872 {
1873  set_field(data->x, new_x);
1874 }
1875 
1876 /** Get y value.
1877  * Y coordinate of obstacle in global frame.
1878  * @return y value
1879  */
1880 float
1882 {
1883  return data->y;
1884 }
1885 
1886 /** Get maximum length of y value.
1887  * @return length of y value, can be length of the array or number of
1888  * maximum number of characters for a string
1889  */
1890 size_t
1892 {
1893  return 1;
1894 }
1895 
1896 /** Set y value.
1897  * Y coordinate of obstacle in global frame.
1898  * @param new_y new y value
1899  */
1900 void
1902 {
1903  set_field(data->y, new_y);
1904 }
1905 
1906 /** Get mode value.
1907  *
1908  The connection mode to use to connect the POI with the graph.
1909 
1910  * @return mode value
1911  */
1914 {
1915  return (NavGraphGeneratorInterface::ConnectionMode)data->mode;
1916 }
1917 
1918 /** Get maximum length of mode value.
1919  * @return length of mode value, can be length of the array or number of
1920  * maximum number of characters for a string
1921  */
1922 size_t
1924 {
1925  return 1;
1926 }
1927 
1928 /** Set mode value.
1929  *
1930  The connection mode to use to connect the POI with the graph.
1931 
1932  * @param new_mode new mode value
1933  */
1934 void
1936 {
1937  set_field(data->mode, new_mode);
1938 }
1939 
1940 /** Clone this message.
1941  * Produces a message of the same type as this message and copies the
1942  * data to the new message.
1943  * @return clone of this message
1944  */
1945 Message *
1947 {
1949 }
1950 /** @class NavGraphGeneratorInterface::AddPointOfInterestWithOriMessage <interfaces/NavGraphGeneratorInterface.h>
1951  * AddPointOfInterestWithOriMessage Fawkes BlackBoard Interface Message.
1952  *
1953 
1954  */
1955 
1956 
1957 /** Constructor with initial values.
1958  * @param ini_name initial value for name
1959  * @param ini_x initial value for x
1960  * @param ini_y initial value for y
1961  * @param ini_ori initial value for ori
1962  * @param ini_mode initial value for mode
1963  */
1964 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")
1965 {
1966  data_size = sizeof(AddPointOfInterestWithOriMessage_data_t);
1967  data_ptr = malloc(data_size);
1968  memset(data_ptr, 0, data_size);
1969  data = (AddPointOfInterestWithOriMessage_data_t *)data_ptr;
1971  strncpy(data->name, ini_name, 64-1);
1972  data->name[64-1] = 0;
1973  data->x = ini_x;
1974  data->y = ini_y;
1975  data->ori = ini_ori;
1976  data->mode = ini_mode;
1977  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
1978  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
1979  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
1980  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
1981  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
1982  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
1983  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
1984  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
1985  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
1986  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
1987  enum_map_EdgeMode[(int)FORCE] = "FORCE";
1988  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
1989  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
1990  add_fieldinfo(IFT_STRING, "name", 64, data->name);
1991  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
1992  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
1993  add_fieldinfo(IFT_FLOAT, "ori", 1, &data->ori);
1994  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "ConnectionMode", &enum_map_ConnectionMode);
1995 }
1996 /** Constructor */
1998 {
1999  data_size = sizeof(AddPointOfInterestWithOriMessage_data_t);
2000  data_ptr = malloc(data_size);
2001  memset(data_ptr, 0, data_size);
2002  data = (AddPointOfInterestWithOriMessage_data_t *)data_ptr;
2004  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2005  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2006  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2007  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2008  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2009  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2010  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2011  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2012  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2013  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2014  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2015  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2016  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2017  add_fieldinfo(IFT_STRING, "name", 64, data->name);
2018  add_fieldinfo(IFT_FLOAT, "x", 1, &data->x);
2019  add_fieldinfo(IFT_FLOAT, "y", 1, &data->y);
2020  add_fieldinfo(IFT_FLOAT, "ori", 1, &data->ori);
2021  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "ConnectionMode", &enum_map_ConnectionMode);
2022 }
2023 
2024 /** Destructor */
2026 {
2027  free(data_ptr);
2028 }
2029 
2030 /** Copy constructor.
2031  * @param m message to copy from
2032  */
2034 {
2035  data_size = m->data_size;
2036  data_ptr = malloc(data_size);
2037  memcpy(data_ptr, m->data_ptr, data_size);
2038  data = (AddPointOfInterestWithOriMessage_data_t *)data_ptr;
2040 }
2041 
2042 /* Methods */
2043 /** Get name value.
2044  *
2045  ID of the obstacle. Can later be used to remove it again.
2046 
2047  * @return name value
2048  */
2049 char *
2051 {
2052  return data->name;
2053 }
2054 
2055 /** Get maximum length of name value.
2056  * @return length of name value, can be length of the array or number of
2057  * maximum number of characters for a string
2058  */
2059 size_t
2061 {
2062  return 64;
2063 }
2064 
2065 /** Set name value.
2066  *
2067  ID of the obstacle. Can later be used to remove it again.
2068 
2069  * @param new_name new name value
2070  */
2071 void
2073 {
2074  set_field(data->name, new_name);
2075 }
2076 
2077 /** Get x value.
2078  * X coordinate of obstacle in global frame.
2079  * @return x value
2080  */
2081 float
2083 {
2084  return data->x;
2085 }
2086 
2087 /** Get maximum length of x value.
2088  * @return length of x value, can be length of the array or number of
2089  * maximum number of characters for a string
2090  */
2091 size_t
2093 {
2094  return 1;
2095 }
2096 
2097 /** Set x value.
2098  * X coordinate of obstacle in global frame.
2099  * @param new_x new x value
2100  */
2101 void
2103 {
2104  set_field(data->x, new_x);
2105 }
2106 
2107 /** Get y value.
2108  * Y coordinate of obstacle in global frame.
2109  * @return y value
2110  */
2111 float
2113 {
2114  return data->y;
2115 }
2116 
2117 /** Get maximum length of y value.
2118  * @return length of y value, can be length of the array or number of
2119  * maximum number of characters for a string
2120  */
2121 size_t
2123 {
2124  return 1;
2125 }
2126 
2127 /** Set y value.
2128  * Y coordinate of obstacle in global frame.
2129  * @param new_y new y value
2130  */
2131 void
2133 {
2134  set_field(data->y, new_y);
2135 }
2136 
2137 /** Get ori value.
2138  * Orientation for target point (rad).
2139  * @return ori value
2140  */
2141 float
2143 {
2144  return data->ori;
2145 }
2146 
2147 /** Get maximum length of ori value.
2148  * @return length of ori value, can be length of the array or number of
2149  * maximum number of characters for a string
2150  */
2151 size_t
2153 {
2154  return 1;
2155 }
2156 
2157 /** Set ori value.
2158  * Orientation for target point (rad).
2159  * @param new_ori new ori value
2160  */
2161 void
2163 {
2164  set_field(data->ori, new_ori);
2165 }
2166 
2167 /** Get mode value.
2168  *
2169  The connection mode to use to connect the POI with the graph.
2170 
2171  * @return mode value
2172  */
2175 {
2176  return (NavGraphGeneratorInterface::ConnectionMode)data->mode;
2177 }
2178 
2179 /** Get maximum length of mode value.
2180  * @return length of mode value, can be length of the array or number of
2181  * maximum number of characters for a string
2182  */
2183 size_t
2185 {
2186  return 1;
2187 }
2188 
2189 /** Set mode value.
2190  *
2191  The connection mode to use to connect the POI with the graph.
2192 
2193  * @param new_mode new mode value
2194  */
2195 void
2197 {
2198  set_field(data->mode, new_mode);
2199 }
2200 
2201 /** Clone this message.
2202  * Produces a message of the same type as this message and copies the
2203  * data to the new message.
2204  * @return clone of this message
2205  */
2206 Message *
2208 {
2210 }
2211 /** @class NavGraphGeneratorInterface::SetPointOfInterestPropertyMessage <interfaces/NavGraphGeneratorInterface.h>
2212  * SetPointOfInterestPropertyMessage Fawkes BlackBoard Interface Message.
2213  *
2214 
2215  */
2216 
2217 
2218 /** Constructor with initial values.
2219  * @param ini_name initial value for name
2220  * @param ini_property_name initial value for property_name
2221  * @param ini_property_value initial value for property_value
2222  */
2223 NavGraphGeneratorInterface::SetPointOfInterestPropertyMessage::SetPointOfInterestPropertyMessage(const char * ini_name, const char * ini_property_name, const char * ini_property_value) : Message("SetPointOfInterestPropertyMessage")
2224 {
2225  data_size = sizeof(SetPointOfInterestPropertyMessage_data_t);
2226  data_ptr = malloc(data_size);
2227  memset(data_ptr, 0, data_size);
2228  data = (SetPointOfInterestPropertyMessage_data_t *)data_ptr;
2230  strncpy(data->name, ini_name, 64-1);
2231  data->name[64-1] = 0;
2232  strncpy(data->property_name, ini_property_name, 64-1);
2233  data->property_name[64-1] = 0;
2234  strncpy(data->property_value, ini_property_value, 1024-1);
2235  data->property_value[1024-1] = 0;
2236  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2237  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2238  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2239  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2240  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2241  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2242  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2243  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2244  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2245  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2246  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2247  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2248  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2249  add_fieldinfo(IFT_STRING, "name", 64, data->name);
2250  add_fieldinfo(IFT_STRING, "property_name", 64, data->property_name);
2251  add_fieldinfo(IFT_STRING, "property_value", 1024, data->property_value);
2252 }
2253 /** Constructor */
2255 {
2256  data_size = sizeof(SetPointOfInterestPropertyMessage_data_t);
2257  data_ptr = malloc(data_size);
2258  memset(data_ptr, 0, data_size);
2259  data = (SetPointOfInterestPropertyMessage_data_t *)data_ptr;
2261  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2262  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2263  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2264  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2265  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2266  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2267  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2268  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2269  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2270  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2271  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2272  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2273  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2274  add_fieldinfo(IFT_STRING, "name", 64, data->name);
2275  add_fieldinfo(IFT_STRING, "property_name", 64, data->property_name);
2276  add_fieldinfo(IFT_STRING, "property_value", 1024, data->property_value);
2277 }
2278 
2279 /** Destructor */
2281 {
2282  free(data_ptr);
2283 }
2284 
2285 /** Copy constructor.
2286  * @param m message to copy from
2287  */
2289 {
2290  data_size = m->data_size;
2291  data_ptr = malloc(data_size);
2292  memcpy(data_ptr, m->data_ptr, data_size);
2293  data = (SetPointOfInterestPropertyMessage_data_t *)data_ptr;
2295 }
2296 
2297 /* Methods */
2298 /** Get name value.
2299  *
2300  ID of the point of interest.
2301 
2302  * @return name value
2303  */
2304 char *
2306 {
2307  return data->name;
2308 }
2309 
2310 /** Get maximum length of name value.
2311  * @return length of name value, can be length of the array or number of
2312  * maximum number of characters for a string
2313  */
2314 size_t
2316 {
2317  return 64;
2318 }
2319 
2320 /** Set name value.
2321  *
2322  ID of the point of interest.
2323 
2324  * @param new_name new name value
2325  */
2326 void
2328 {
2329  set_field(data->name, new_name);
2330 }
2331 
2332 /** Get property_name value.
2333  * Name of the property to set.
2334  * @return property_name value
2335  */
2336 char *
2338 {
2339  return data->property_name;
2340 }
2341 
2342 /** Get maximum length of property_name value.
2343  * @return length of property_name value, can be length of the array or number of
2344  * maximum number of characters for a string
2345  */
2346 size_t
2348 {
2349  return 64;
2350 }
2351 
2352 /** Set property_name value.
2353  * Name of the property to set.
2354  * @param new_property_name new property_name value
2355  */
2356 void
2358 {
2359  set_field(data->property_name, new_property_name);
2360 }
2361 
2362 /** Get property_value value.
2363  * Value of the property
2364  to set.
2365  * @return property_value value
2366  */
2367 char *
2369 {
2370  return data->property_value;
2371 }
2372 
2373 /** Get maximum length of property_value value.
2374  * @return length of property_value value, can be length of the array or number of
2375  * maximum number of characters for a string
2376  */
2377 size_t
2379 {
2380  return 1024;
2381 }
2382 
2383 /** Set property_value value.
2384  * Value of the property
2385  to set.
2386  * @param new_property_value new property_value value
2387  */
2388 void
2390 {
2391  set_field(data->property_value, new_property_value);
2392 }
2393 
2394 /** Clone this message.
2395  * Produces a message of the same type as this message and copies the
2396  * data to the new message.
2397  * @return clone of this message
2398  */
2399 Message *
2401 {
2403 }
2404 /** @class NavGraphGeneratorInterface::AddEdgeMessage <interfaces/NavGraphGeneratorInterface.h>
2405  * AddEdgeMessage Fawkes BlackBoard Interface Message.
2406  *
2407 
2408  */
2409 
2410 
2411 /** Constructor with initial values.
2412  * @param ini_p1 initial value for p1
2413  * @param ini_p2 initial value for p2
2414  * @param ini_directed initial value for directed
2415  * @param ini_mode initial value for mode
2416  */
2417 NavGraphGeneratorInterface::AddEdgeMessage::AddEdgeMessage(const char * ini_p1, const char * ini_p2, const bool ini_directed, const EdgeMode ini_mode) : Message("AddEdgeMessage")
2418 {
2419  data_size = sizeof(AddEdgeMessage_data_t);
2420  data_ptr = malloc(data_size);
2421  memset(data_ptr, 0, data_size);
2422  data = (AddEdgeMessage_data_t *)data_ptr;
2424  strncpy(data->p1, ini_p1, 64-1);
2425  data->p1[64-1] = 0;
2426  strncpy(data->p2, ini_p2, 64-1);
2427  data->p2[64-1] = 0;
2428  data->directed = ini_directed;
2429  data->mode = ini_mode;
2430  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2431  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2432  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2433  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2434  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2435  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2436  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2437  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2438  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2439  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2440  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2441  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2442  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2443  add_fieldinfo(IFT_STRING, "p1", 64, data->p1);
2444  add_fieldinfo(IFT_STRING, "p2", 64, data->p2);
2445  add_fieldinfo(IFT_BOOL, "directed", 1, &data->directed);
2446  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "EdgeMode", &enum_map_EdgeMode);
2447 }
2448 /** Constructor */
2450 {
2451  data_size = sizeof(AddEdgeMessage_data_t);
2452  data_ptr = malloc(data_size);
2453  memset(data_ptr, 0, data_size);
2454  data = (AddEdgeMessage_data_t *)data_ptr;
2456  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2457  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2458  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2459  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2460  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2461  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2462  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2463  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2464  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2465  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2466  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2467  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2468  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2469  add_fieldinfo(IFT_STRING, "p1", 64, data->p1);
2470  add_fieldinfo(IFT_STRING, "p2", 64, data->p2);
2471  add_fieldinfo(IFT_BOOL, "directed", 1, &data->directed);
2472  add_fieldinfo(IFT_ENUM, "mode", 1, &data->mode, "EdgeMode", &enum_map_EdgeMode);
2473 }
2474 
2475 /** Destructor */
2477 {
2478  free(data_ptr);
2479 }
2480 
2481 /** Copy constructor.
2482  * @param m message to copy from
2483  */
2485 {
2486  data_size = m->data_size;
2487  data_ptr = malloc(data_size);
2488  memcpy(data_ptr, m->data_ptr, data_size);
2489  data = (AddEdgeMessage_data_t *)data_ptr;
2491 }
2492 
2493 /* Methods */
2494 /** Get p1 value.
2495  * ID of first node.
2496  * @return p1 value
2497  */
2498 char *
2500 {
2501  return data->p1;
2502 }
2503 
2504 /** Get maximum length of p1 value.
2505  * @return length of p1 value, can be length of the array or number of
2506  * maximum number of characters for a string
2507  */
2508 size_t
2510 {
2511  return 64;
2512 }
2513 
2514 /** Set p1 value.
2515  * ID of first node.
2516  * @param new_p1 new p1 value
2517  */
2518 void
2520 {
2521  set_field(data->p1, new_p1);
2522 }
2523 
2524 /** Get p2 value.
2525  * ID of second node.
2526  * @return p2 value
2527  */
2528 char *
2530 {
2531  return data->p2;
2532 }
2533 
2534 /** Get maximum length of p2 value.
2535  * @return length of p2 value, can be length of the array or number of
2536  * maximum number of characters for a string
2537  */
2538 size_t
2540 {
2541  return 64;
2542 }
2543 
2544 /** Set p2 value.
2545  * ID of second node.
2546  * @param new_p2 new p2 value
2547  */
2548 void
2550 {
2551  set_field(data->p2, new_p2);
2552 }
2553 
2554 /** Get directed value.
2555  *
2556  True to create a directed edge from p1 to p2, otherwise the edge
2557  is assumed to be undirected.
2558 
2559  * @return directed value
2560  */
2561 bool
2563 {
2564  return data->directed;
2565 }
2566 
2567 /** Get maximum length of directed value.
2568  * @return length of directed value, can be length of the array or number of
2569  * maximum number of characters for a string
2570  */
2571 size_t
2573 {
2574  return 1;
2575 }
2576 
2577 /** Set directed value.
2578  *
2579  True to create a directed edge from p1 to p2, otherwise the edge
2580  is assumed to be undirected.
2581 
2582  * @param new_directed new directed value
2583  */
2584 void
2586 {
2587  set_field(data->directed, new_directed);
2588 }
2589 
2590 /** Get mode value.
2591  * The edge insertion mode.
2592  * @return mode value
2593  */
2596 {
2597  return (NavGraphGeneratorInterface::EdgeMode)data->mode;
2598 }
2599 
2600 /** Get maximum length of mode value.
2601  * @return length of mode value, can be length of the array or number of
2602  * maximum number of characters for a string
2603  */
2604 size_t
2606 {
2607  return 1;
2608 }
2609 
2610 /** Set mode value.
2611  * The edge insertion mode.
2612  * @param new_mode new mode value
2613  */
2614 void
2616 {
2617  set_field(data->mode, new_mode);
2618 }
2619 
2620 /** Clone this message.
2621  * Produces a message of the same type as this message and copies the
2622  * data to the new message.
2623  * @return clone of this message
2624  */
2625 Message *
2627 {
2629 }
2630 /** @class NavGraphGeneratorInterface::SetGraphDefaultPropertyMessage <interfaces/NavGraphGeneratorInterface.h>
2631  * SetGraphDefaultPropertyMessage Fawkes BlackBoard Interface Message.
2632  *
2633 
2634  */
2635 
2636 
2637 /** Constructor with initial values.
2638  * @param ini_property_name initial value for property_name
2639  * @param ini_property_value initial value for property_value
2640  */
2641 NavGraphGeneratorInterface::SetGraphDefaultPropertyMessage::SetGraphDefaultPropertyMessage(const char * ini_property_name, const char * ini_property_value) : Message("SetGraphDefaultPropertyMessage")
2642 {
2643  data_size = sizeof(SetGraphDefaultPropertyMessage_data_t);
2644  data_ptr = malloc(data_size);
2645  memset(data_ptr, 0, data_size);
2646  data = (SetGraphDefaultPropertyMessage_data_t *)data_ptr;
2648  strncpy(data->property_name, ini_property_name, 64-1);
2649  data->property_name[64-1] = 0;
2650  strncpy(data->property_value, ini_property_value, 1024-1);
2651  data->property_value[1024-1] = 0;
2652  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2653  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2654  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2655  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2656  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2657  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2658  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2659  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2660  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2661  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2662  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2663  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2664  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2665  add_fieldinfo(IFT_STRING, "property_name", 64, data->property_name);
2666  add_fieldinfo(IFT_STRING, "property_value", 1024, data->property_value);
2667 }
2668 /** Constructor */
2670 {
2671  data_size = sizeof(SetGraphDefaultPropertyMessage_data_t);
2672  data_ptr = malloc(data_size);
2673  memset(data_ptr, 0, data_size);
2674  data = (SetGraphDefaultPropertyMessage_data_t *)data_ptr;
2676  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2677  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2678  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2679  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2680  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2681  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2682  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2683  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2684  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2685  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2686  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2687  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2688  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2689  add_fieldinfo(IFT_STRING, "property_name", 64, data->property_name);
2690  add_fieldinfo(IFT_STRING, "property_value", 1024, data->property_value);
2691 }
2692 
2693 /** Destructor */
2695 {
2696  free(data_ptr);
2697 }
2698 
2699 /** Copy constructor.
2700  * @param m message to copy from
2701  */
2703 {
2704  data_size = m->data_size;
2705  data_ptr = malloc(data_size);
2706  memcpy(data_ptr, m->data_ptr, data_size);
2707  data = (SetGraphDefaultPropertyMessage_data_t *)data_ptr;
2709 }
2710 
2711 /* Methods */
2712 /** Get property_name value.
2713  * Name of the property to set.
2714  * @return property_name value
2715  */
2716 char *
2718 {
2719  return data->property_name;
2720 }
2721 
2722 /** Get maximum length of property_name value.
2723  * @return length of property_name value, can be length of the array or number of
2724  * maximum number of characters for a string
2725  */
2726 size_t
2728 {
2729  return 64;
2730 }
2731 
2732 /** Set property_name value.
2733  * Name of the property to set.
2734  * @param new_property_name new property_name value
2735  */
2736 void
2738 {
2739  set_field(data->property_name, new_property_name);
2740 }
2741 
2742 /** Get property_value value.
2743  * Value of the property
2744  to set.
2745  * @return property_value value
2746  */
2747 char *
2749 {
2750  return data->property_value;
2751 }
2752 
2753 /** Get maximum length of property_value value.
2754  * @return length of property_value value, can be length of the array or number of
2755  * maximum number of characters for a string
2756  */
2757 size_t
2759 {
2760  return 1024;
2761 }
2762 
2763 /** Set property_value value.
2764  * Value of the property
2765  to set.
2766  * @param new_property_value new property_value value
2767  */
2768 void
2770 {
2771  set_field(data->property_value, new_property_value);
2772 }
2773 
2774 /** Clone this message.
2775  * Produces a message of the same type as this message and copies the
2776  * data to the new message.
2777  * @return clone of this message
2778  */
2779 Message *
2781 {
2783 }
2784 /** @class NavGraphGeneratorInterface::SetCopyGraphDefaultPropertiesMessage <interfaces/NavGraphGeneratorInterface.h>
2785  * SetCopyGraphDefaultPropertiesMessage Fawkes BlackBoard Interface Message.
2786  *
2787 
2788  */
2789 
2790 
2791 /** Constructor with initial values.
2792  * @param ini_enable_copy initial value for enable_copy
2793  */
2795 {
2796  data_size = sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2797  data_ptr = malloc(data_size);
2798  memset(data_ptr, 0, data_size);
2799  data = (SetCopyGraphDefaultPropertiesMessage_data_t *)data_ptr;
2801  data->enable_copy = ini_enable_copy;
2802  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2803  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2804  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2805  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2806  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2807  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2808  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2809  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2810  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2811  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2812  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2813  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2814  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2815  add_fieldinfo(IFT_BOOL, "enable_copy", 1, &data->enable_copy);
2816 }
2817 /** Constructor */
2819 {
2820  data_size = sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2821  data_ptr = malloc(data_size);
2822  memset(data_ptr, 0, data_size);
2823  data = (SetCopyGraphDefaultPropertiesMessage_data_t *)data_ptr;
2825  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2826  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2827  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2828  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2829  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2830  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2831  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2832  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2833  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2834  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2835  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2836  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2837  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2838  add_fieldinfo(IFT_BOOL, "enable_copy", 1, &data->enable_copy);
2839 }
2840 
2841 /** Destructor */
2843 {
2844  free(data_ptr);
2845 }
2846 
2847 /** Copy constructor.
2848  * @param m message to copy from
2849  */
2851 {
2852  data_size = m->data_size;
2853  data_ptr = malloc(data_size);
2854  memcpy(data_ptr, m->data_ptr, data_size);
2855  data = (SetCopyGraphDefaultPropertiesMessage_data_t *)data_ptr;
2857 }
2858 
2859 /* Methods */
2860 /** Get enable_copy value.
2861  * True to enable copying
2862  (default) false to disable).
2863  * @return enable_copy value
2864  */
2865 bool
2867 {
2868  return data->enable_copy;
2869 }
2870 
2871 /** Get maximum length of enable_copy value.
2872  * @return length of enable_copy value, can be length of the array or number of
2873  * maximum number of characters for a string
2874  */
2875 size_t
2877 {
2878  return 1;
2879 }
2880 
2881 /** Set enable_copy value.
2882  * True to enable copying
2883  (default) false to disable).
2884  * @param new_enable_copy new enable_copy value
2885  */
2886 void
2888 {
2889  set_field(data->enable_copy, new_enable_copy);
2890 }
2891 
2892 /** Clone this message.
2893  * Produces a message of the same type as this message and copies the
2894  * data to the new message.
2895  * @return clone of this message
2896  */
2897 Message *
2899 {
2901 }
2902 /** @class NavGraphGeneratorInterface::RemovePointOfInterestMessage <interfaces/NavGraphGeneratorInterface.h>
2903  * RemovePointOfInterestMessage Fawkes BlackBoard Interface Message.
2904  *
2905 
2906  */
2907 
2908 
2909 /** Constructor with initial values.
2910  * @param ini_name initial value for name
2911  */
2913 {
2914  data_size = sizeof(RemovePointOfInterestMessage_data_t);
2915  data_ptr = malloc(data_size);
2916  memset(data_ptr, 0, data_size);
2917  data = (RemovePointOfInterestMessage_data_t *)data_ptr;
2919  strncpy(data->name, ini_name, 64-1);
2920  data->name[64-1] = 0;
2921  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2922  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2923  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2924  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2925  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2926  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2927  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2928  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2929  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2930  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2931  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2932  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2933  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2934  add_fieldinfo(IFT_STRING, "name", 64, data->name);
2935 }
2936 /** Constructor */
2938 {
2939  data_size = sizeof(RemovePointOfInterestMessage_data_t);
2940  data_ptr = malloc(data_size);
2941  memset(data_ptr, 0, data_size);
2942  data = (RemovePointOfInterestMessage_data_t *)data_ptr;
2944  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
2945  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
2946  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
2947  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
2948  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
2949  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
2950  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
2951  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
2952  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
2953  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
2954  enum_map_EdgeMode[(int)FORCE] = "FORCE";
2955  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
2956  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
2957  add_fieldinfo(IFT_STRING, "name", 64, data->name);
2958 }
2959 
2960 /** Destructor */
2962 {
2963  free(data_ptr);
2964 }
2965 
2966 /** Copy constructor.
2967  * @param m message to copy from
2968  */
2970 {
2971  data_size = m->data_size;
2972  data_ptr = malloc(data_size);
2973  memcpy(data_ptr, m->data_ptr, data_size);
2974  data = (RemovePointOfInterestMessage_data_t *)data_ptr;
2976 }
2977 
2978 /* Methods */
2979 /** Get name value.
2980  *
2981  ID of the obstacle to remove.
2982 
2983  * @return name value
2984  */
2985 char *
2987 {
2988  return data->name;
2989 }
2990 
2991 /** Get maximum length of name value.
2992  * @return length of name value, can be length of the array or number of
2993  * maximum number of characters for a string
2994  */
2995 size_t
2997 {
2998  return 64;
2999 }
3000 
3001 /** Set name value.
3002  *
3003  ID of the obstacle to remove.
3004 
3005  * @param new_name new name value
3006  */
3007 void
3009 {
3010  set_field(data->name, new_name);
3011 }
3012 
3013 /** Clone this message.
3014  * Produces a message of the same type as this message and copies the
3015  * data to the new message.
3016  * @return clone of this message
3017  */
3018 Message *
3020 {
3022 }
3023 /** @class NavGraphGeneratorInterface::ComputeMessage <interfaces/NavGraphGeneratorInterface.h>
3024  * ComputeMessage Fawkes BlackBoard Interface Message.
3025  *
3026 
3027  */
3028 
3029 
3030 /** Constructor */
3032 {
3033  data_size = sizeof(ComputeMessage_data_t);
3034  data_ptr = malloc(data_size);
3035  memset(data_ptr, 0, data_size);
3036  data = (ComputeMessage_data_t *)data_ptr;
3038  enum_map_ConnectionMode[(int)NOT_CONNECTED] = "NOT_CONNECTED";
3039  enum_map_ConnectionMode[(int)UNCONNECTED] = "UNCONNECTED";
3040  enum_map_ConnectionMode[(int)CLOSEST_NODE] = "CLOSEST_NODE";
3041  enum_map_ConnectionMode[(int)CLOSEST_EDGE] = "CLOSEST_EDGE";
3042  enum_map_ConnectionMode[(int)CLOSEST_EDGE_OR_NODE] = "CLOSEST_EDGE_OR_NODE";
3043  enum_map_FilterType[(int)FILTER_EDGES_BY_MAP] = "FILTER_EDGES_BY_MAP";
3044  enum_map_FilterType[(int)FILTER_ORPHAN_NODES] = "FILTER_ORPHAN_NODES";
3045  enum_map_FilterType[(int)FILTER_MULTI_GRAPH] = "FILTER_MULTI_GRAPH";
3046  enum_map_EdgeMode[(int)NO_INTERSECTION] = "NO_INTERSECTION";
3047  enum_map_EdgeMode[(int)SPLIT_INTERSECTION] = "SPLIT_INTERSECTION";
3048  enum_map_EdgeMode[(int)FORCE] = "FORCE";
3049  enum_map_Algorithm[(int)ALGORITHM_VORONOI] = "ALGORITHM_VORONOI";
3050  enum_map_Algorithm[(int)ALGORITHM_GRID] = "ALGORITHM_GRID";
3051 }
3052 
3053 /** Destructor */
3055 {
3056  free(data_ptr);
3057 }
3058 
3059 /** Copy constructor.
3060  * @param m message to copy from
3061  */
3063 {
3064  data_size = m->data_size;
3065  data_ptr = malloc(data_size);
3066  memcpy(data_ptr, m->data_ptr, data_size);
3067  data = (ComputeMessage_data_t *)data_ptr;
3069 }
3070 
3071 /* Methods */
3072 /** Clone this message.
3073  * Produces a message of the same type as this message and copies the
3074  * data to the new message.
3075  * @return clone of this message
3076  */
3077 Message *
3079 {
3081 }
3082 /** Check if message is valid and can be enqueued.
3083  * @param message Message to check
3084  * @return true if the message is valid, false otherwise.
3085  */
3086 bool
3088 {
3089  const ClearMessage *m0 = dynamic_cast<const ClearMessage *>(message);
3090  if ( m0 != NULL ) {
3091  return true;
3092  }
3093  const SetAlgorithmMessage *m1 = dynamic_cast<const SetAlgorithmMessage *>(message);
3094  if ( m1 != NULL ) {
3095  return true;
3096  }
3097  const SetAlgorithmParameterMessage *m2 = dynamic_cast<const SetAlgorithmParameterMessage *>(message);
3098  if ( m2 != NULL ) {
3099  return true;
3100  }
3101  const SetBoundingBoxMessage *m3 = dynamic_cast<const SetBoundingBoxMessage *>(message);
3102  if ( m3 != NULL ) {
3103  return true;
3104  }
3105  const SetFilterMessage *m4 = dynamic_cast<const SetFilterMessage *>(message);
3106  if ( m4 != NULL ) {
3107  return true;
3108  }
3109  const SetFilterParamFloatMessage *m5 = dynamic_cast<const SetFilterParamFloatMessage *>(message);
3110  if ( m5 != NULL ) {
3111  return true;
3112  }
3113  const AddMapObstaclesMessage *m6 = dynamic_cast<const AddMapObstaclesMessage *>(message);
3114  if ( m6 != NULL ) {
3115  return true;
3116  }
3117  const AddObstacleMessage *m7 = dynamic_cast<const AddObstacleMessage *>(message);
3118  if ( m7 != NULL ) {
3119  return true;
3120  }
3121  const RemoveObstacleMessage *m8 = dynamic_cast<const RemoveObstacleMessage *>(message);
3122  if ( m8 != NULL ) {
3123  return true;
3124  }
3125  const AddPointOfInterestMessage *m9 = dynamic_cast<const AddPointOfInterestMessage *>(message);
3126  if ( m9 != NULL ) {
3127  return true;
3128  }
3129  const AddPointOfInterestWithOriMessage *m10 = dynamic_cast<const AddPointOfInterestWithOriMessage *>(message);
3130  if ( m10 != NULL ) {
3131  return true;
3132  }
3133  const SetPointOfInterestPropertyMessage *m11 = dynamic_cast<const SetPointOfInterestPropertyMessage *>(message);
3134  if ( m11 != NULL ) {
3135  return true;
3136  }
3137  const AddEdgeMessage *m12 = dynamic_cast<const AddEdgeMessage *>(message);
3138  if ( m12 != NULL ) {
3139  return true;
3140  }
3141  const SetGraphDefaultPropertyMessage *m13 = dynamic_cast<const SetGraphDefaultPropertyMessage *>(message);
3142  if ( m13 != NULL ) {
3143  return true;
3144  }
3145  const SetCopyGraphDefaultPropertiesMessage *m14 = dynamic_cast<const SetCopyGraphDefaultPropertiesMessage *>(message);
3146  if ( m14 != NULL ) {
3147  return true;
3148  }
3149  const RemovePointOfInterestMessage *m15 = dynamic_cast<const RemovePointOfInterestMessage *>(message);
3150  if ( m15 != NULL ) {
3151  return true;
3152  }
3153  const ComputeMessage *m16 = dynamic_cast<const ComputeMessage *>(message);
3154  if ( m16 != NULL ) {
3155  return true;
3156  }
3157  return false;
3158 }
3159 
3160 /// @cond INTERNALS
3161 EXPORT_INTERFACE(NavGraphGeneratorInterface)
3162 /// @endcond
3163 
3164 
3165 } // end namespace fawkes
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
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
AddEdgeMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
void set_mode(const EdgeMode new_mode)
Set mode value.
size_t maxlenof_mode() const
Get maximum length of mode value.
size_t maxlenof_directed() const
Get maximum length of directed value.
void set_directed(const bool new_directed)
Set directed value.
size_t maxlenof_p1() const
Get maximum length of p1 value.
size_t maxlenof_p2() const
Get maximum length of p2 value.
AddMapObstaclesMessage Fawkes BlackBoard Interface Message.
void set_max_line_point_distance(const float new_max_line_point_distance)
Set max_line_point_distance value.
size_t maxlenof_max_line_point_distance() const
Get maximum length of max_line_point_distance value.
float max_line_point_distance() const
Get max_line_point_distance value.
AddObstacleMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_name() const
Get maximum length of name value.
AddPointOfInterestMessage Fawkes BlackBoard Interface Message.
void set_mode(const ConnectionMode new_mode)
Set mode value.
AddPointOfInterestWithOriMessage Fawkes BlackBoard Interface Message.
ClearMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
ComputeMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
RemoveObstacleMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_name() const
Get maximum length of name value.
RemovePointOfInterestMessage Fawkes BlackBoard Interface Message.
SetAlgorithmMessage Fawkes BlackBoard Interface Message.
void set_algorithm(const Algorithm new_algorithm)
Set algorithm value.
size_t maxlenof_algorithm() const
Get maximum length of algorithm value.
SetAlgorithmParameterMessage Fawkes BlackBoard Interface Message.
SetBoundingBoxMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_p1_y() const
Get maximum length of p1_y value.
size_t maxlenof_p2_y() const
Get maximum length of p2_y value.
size_t maxlenof_p1_x() const
Get maximum length of p1_x value.
size_t maxlenof_p2_x() const
Get maximum length of p2_x value.
SetCopyGraphDefaultPropertiesMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_enable_copy() const
Get maximum length of enable_copy value.
SetFilterMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_enable() const
Get maximum length of enable value.
void set_enable(const bool new_enable)
Set enable value.
void set_filter(const FilterType new_filter)
Set filter value.
size_t maxlenof_filter() const
Get maximum length of filter value.
SetFilterParamFloatMessage Fawkes BlackBoard Interface Message.
void set_filter(const FilterType new_filter)
Set filter value.
size_t maxlenof_filter() const
Get maximum length of filter value.
SetGraphDefaultPropertyMessage Fawkes BlackBoard Interface Message.
void set_property_value(const char *new_property_value)
Set property_value value.
void set_property_name(const char *new_property_name)
Set property_name value.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
size_t maxlenof_property_value() const
Get maximum length of property_value value.
SetPointOfInterestPropertyMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
void set_property_value(const char *new_property_value)
Set property_value value.
void set_property_name(const char *new_property_name)
Set property_name value.
size_t maxlenof_property_value() const
Get maximum length of property_value value.
NavGraphGeneratorInterface Fawkes BlackBoard Interface.
ConnectionMode
Describe how to connect nodes to the graph.
@ CLOSEST_EDGE
Connect point to the edge in which segment it lies, i.e.
@ UNCONNECTED
The node is marked as unconnected and will not be connected to another node.
@ CLOSEST_EDGE_OR_NODE
First try the CLOSEST_EDGE method.
@ CLOSEST_NODE
Connect point to the node on the graph closest to the given point.
@ NOT_CONNECTED
The node is will not be initially connected.
FilterType
Post-processing filtering type.
@ FILTER_MULTI_GRAPH
Sometimes after applying other filters one can end up with multiple disconnected graphs.
@ FILTER_EDGES_BY_MAP
If enabled, filters out all edges after the map generation that pass too close by an occupied cell of...
@ FILTER_ORPHAN_NODES
If enabled, filters out all nodes which are not connected to any other node.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
Algorithm
Available generator algorithms.
@ ALGORITHM_VORONOI
Voronoi-based algorithm for navgraph generation.
@ ALGORITHM_GRID
Grid-based algorithm with customizable spacing.
EdgeMode
When adding edges, the mode defines how to add edges.
@ NO_INTERSECTION
Only insert edge if it does not intersect with any other existing edge in the graph.
@ SPLIT_INTERSECTION
If the new edge intersects with one or more edges, add new points at the intersections and split the ...
@ FORCE
The edge is added as-is, it may overlap or intersect with other edges.
Fawkes library namespace.
@ IFT_FLOAT
float field
Definition: types.h:46
@ IFT_STRING
string field
Definition: types.h:48
@ IFT_BOOL
boolean field
Definition: types.h:37
@ IFT_ENUM
field with interface specific enum type
Definition: types.h:50
Timestamp data, must be present and first entries for each interface data structs!...
Definition: message.h:152