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