24#include <interfaces/NavGraphGeneratorInterface.h>
26#include <core/exceptions/software.h>
59NavGraphGeneratorInterface::NavGraphGeneratorInterface() : Interface()
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};
105NavGraphGeneratorInterface::~NavGraphGeneratorInterface()
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";
130NavGraphGeneratorInterface::tostring_FilterType(
FilterType value)
const
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";
144NavGraphGeneratorInterface::tostring_EdgeMode(
EdgeMode value)
const
147 case NO_INTERSECTION:
return "NO_INTERSECTION";
148 case SPLIT_INTERSECTION:
return "SPLIT_INTERSECTION";
149 case FORCE:
return "FORCE";
150 default:
return "UNKNOWN";
158NavGraphGeneratorInterface::tostring_Algorithm(
Algorithm value)
const
161 case ALGORITHM_VORONOI:
return "ALGORITHM_VORONOI";
162 case ALGORITHM_GRID:
return "ALGORITHM_GRID";
163 default:
return "UNKNOWN";
175NavGraphGeneratorInterface::msgid()
const
185NavGraphGeneratorInterface::maxlenof_msgid()
const
198NavGraphGeneratorInterface::set_msgid(
const uint32_t new_msgid)
200 set_field(data->msgid, new_msgid);
212NavGraphGeneratorInterface::is_final()
const
222NavGraphGeneratorInterface::maxlenof_final()
const
236NavGraphGeneratorInterface::set_final(
const bool new_final)
238 set_field(data->final, new_final);
249NavGraphGeneratorInterface::is_ok()
const
259NavGraphGeneratorInterface::maxlenof_ok()
const
272NavGraphGeneratorInterface::set_ok(
const bool new_ok)
274 set_field(data->ok, new_ok);
285NavGraphGeneratorInterface::error_message()
const
287 return data->error_message;
295NavGraphGeneratorInterface::maxlenof_error_message()
const
308NavGraphGeneratorInterface::set_error_message(
const char * new_error_message)
310 set_field(data->error_message, new_error_message);
315NavGraphGeneratorInterface::create_message(
const char *type)
const
317 if ( strncmp(
"ClearMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
319 }
else if ( strncmp(
"SetAlgorithmMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
321 }
else if ( strncmp(
"SetAlgorithmParameterMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
323 }
else if ( strncmp(
"SetBoundingBoxMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
325 }
else if ( strncmp(
"SetFilterMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
327 }
else if ( strncmp(
"SetFilterParamFloatMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
329 }
else if ( strncmp(
"AddMapObstaclesMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
331 }
else if ( strncmp(
"AddObstacleMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
333 }
else if ( strncmp(
"RemoveObstacleMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
335 }
else if ( strncmp(
"AddPointOfInterestMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
337 }
else if ( strncmp(
"AddPointOfInterestWithOriMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
339 }
else if ( strncmp(
"SetPointOfInterestPropertyMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
341 }
else if ( strncmp(
"AddEdgeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
343 }
else if ( strncmp(
"SetGraphDefaultPropertyMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
345 }
else if ( strncmp(
"SetCopyGraphDefaultPropertiesMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
347 }
else if ( strncmp(
"RemovePointOfInterestMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
349 }
else if ( strncmp(
"ComputeMessage", type, INTERFACE_MESSAGE_TYPE_SIZE_ - 1) == 0 ) {
353 "message type for this interface type.", type);
362NavGraphGeneratorInterface::copy_values(
const Interface *other)
367 type(), other->
type());
369 memcpy(data, oi->data,
sizeof(NavGraphGeneratorInterface_data_t));
373NavGraphGeneratorInterface::enum_tostring(
const char *enumtype,
int val)
const
375 if (strcmp(enumtype,
"ConnectionMode") == 0) {
378 if (strcmp(enumtype,
"FilterType") == 0) {
381 if (strcmp(enumtype,
"EdgeMode") == 0) {
382 return tostring_EdgeMode((
EdgeMode)val);
384 if (strcmp(enumtype,
"Algorithm") == 0) {
385 return tostring_Algorithm((
Algorithm)val);
399NavGraphGeneratorInterface::ClearMessage::ClearMessage() :
Message(
"ClearMessage")
404 data = (ClearMessage_data_t *)
data_ptr;
406 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
407 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
408 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
409 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
416 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
435 data = (ClearMessage_data_t *)
data_ptr;
462 data_size =
sizeof(SetAlgorithmMessage_data_t);
465 data = (SetAlgorithmMessage_data_t *)
data_ptr;
467 data->algorithm = ini_algorithm;
468 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
469 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
470 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
471 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
478 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
486 data_size =
sizeof(SetAlgorithmMessage_data_t);
489 data = (SetAlgorithmMessage_data_t *)
data_ptr;
491 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
492 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
493 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
494 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
501 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
521 data = (SetAlgorithmMessage_data_t *)
data_ptr;
553 set_field(data->algorithm, new_algorithm);
579 data_size =
sizeof(SetAlgorithmParameterMessage_data_t);
582 data = (SetAlgorithmParameterMessage_data_t *)
data_ptr;
584 strncpy(data->param, ini_param, 32-1);
585 data->param[32-1] = 0;
586 strncpy(data->value, ini_value, 64-1);
587 data->value[64-1] = 0;
588 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
589 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
590 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
591 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
598 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
607 data_size =
sizeof(SetAlgorithmParameterMessage_data_t);
610 data = (SetAlgorithmParameterMessage_data_t *)
data_ptr;
612 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
613 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
614 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
615 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
622 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
643 data = (SetAlgorithmParameterMessage_data_t *)
data_ptr;
743 data_size =
sizeof(SetBoundingBoxMessage_data_t);
746 data = (SetBoundingBoxMessage_data_t *)
data_ptr;
748 data->p1_x = ini_p1_x;
749 data->p1_y = ini_p1_y;
750 data->p2_x = ini_p2_x;
751 data->p2_y = ini_p2_y;
752 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
753 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
754 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
755 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
762 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
773 data_size =
sizeof(SetBoundingBoxMessage_data_t);
776 data = (SetBoundingBoxMessage_data_t *)
data_ptr;
778 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
779 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
780 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
781 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
788 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
811 data = (SetBoundingBoxMessage_data_t *)
data_ptr;
959 data_size =
sizeof(SetFilterMessage_data_t);
962 data = (SetFilterMessage_data_t *)
data_ptr;
964 data->filter = ini_filter;
965 data->enable = ini_enable;
966 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
967 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
968 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
969 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
976 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
985 data_size =
sizeof(SetFilterMessage_data_t);
988 data = (SetFilterMessage_data_t *)
data_ptr;
990 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
991 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
992 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
993 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1000 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1021 data = (SetFilterMessage_data_t *)
data_ptr;
1066 return data->enable;
1114 data_size =
sizeof(SetFilterParamFloatMessage_data_t);
1117 data = (SetFilterParamFloatMessage_data_t *)
data_ptr;
1119 data->filter = ini_filter;
1120 strncpy(data->param, ini_param, 32-1);
1121 data->param[32-1] = 0;
1122 data->value = ini_value;
1123 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1124 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1125 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1126 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1133 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1143 data_size =
sizeof(SetFilterParamFloatMessage_data_t);
1146 data = (SetFilterParamFloatMessage_data_t *)
data_ptr;
1148 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1149 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1150 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1151 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1158 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1180 data = (SetFilterParamFloatMessage_data_t *)
data_ptr;
1303 data_size =
sizeof(AddMapObstaclesMessage_data_t);
1306 data = (AddMapObstaclesMessage_data_t *)
data_ptr;
1308 data->max_line_point_distance = ini_max_line_point_distance;
1309 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1310 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1311 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1312 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1319 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1327 data_size =
sizeof(AddMapObstaclesMessage_data_t);
1330 data = (AddMapObstaclesMessage_data_t *)
data_ptr;
1332 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1333 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1334 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1335 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1342 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1362 data = (AddMapObstaclesMessage_data_t *)
data_ptr;
1377 return data->max_line_point_distance;
1400 set_field(data->max_line_point_distance, new_max_line_point_distance);
1427 data_size =
sizeof(AddObstacleMessage_data_t);
1430 data = (AddObstacleMessage_data_t *)
data_ptr;
1432 strncpy(data->name, ini_name, 64-1);
1433 data->name[64-1] = 0;
1436 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1437 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1438 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1439 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1446 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1456 data_size =
sizeof(AddObstacleMessage_data_t);
1459 data = (AddObstacleMessage_data_t *)
data_ptr;
1461 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1462 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1463 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1464 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1471 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1493 data = (AddObstacleMessage_data_t *)
data_ptr;
1614 data_size =
sizeof(RemoveObstacleMessage_data_t);
1617 data = (RemoveObstacleMessage_data_t *)
data_ptr;
1619 strncpy(data->name, ini_name, 64-1);
1620 data->name[64-1] = 0;
1621 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1622 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1623 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1624 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1631 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1639 data_size =
sizeof(RemoveObstacleMessage_data_t);
1642 data = (RemoveObstacleMessage_data_t *)
data_ptr;
1644 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1645 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1646 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1647 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1654 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1674 data = (RemoveObstacleMessage_data_t *)
data_ptr;
1738 data_size =
sizeof(AddPointOfInterestMessage_data_t);
1741 data = (AddPointOfInterestMessage_data_t *)
data_ptr;
1743 strncpy(data->name, ini_name, 64-1);
1744 data->name[64-1] = 0;
1747 data->mode = ini_mode;
1748 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1749 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1750 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1751 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1758 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1769 data_size =
sizeof(AddPointOfInterestMessage_data_t);
1772 data = (AddPointOfInterestMessage_data_t *)
data_ptr;
1774 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1775 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1776 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1777 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1784 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1807 data = (AddPointOfInterestMessage_data_t *)
data_ptr;
1966 data_size =
sizeof(AddPointOfInterestWithOriMessage_data_t);
1969 data = (AddPointOfInterestWithOriMessage_data_t *)
data_ptr;
1971 strncpy(data->name, ini_name, 64-1);
1972 data->name[64-1] = 0;
1975 data->ori = ini_ori;
1976 data->mode = ini_mode;
1977 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1978 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1979 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1980 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1987 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1999 data_size =
sizeof(AddPointOfInterestWithOriMessage_data_t);
2002 data = (AddPointOfInterestWithOriMessage_data_t *)
data_ptr;
2004 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2005 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2006 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2007 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2014 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2038 data = (AddPointOfInterestWithOriMessage_data_t *)
data_ptr;
2225 data_size =
sizeof(SetPointOfInterestPropertyMessage_data_t);
2228 data = (SetPointOfInterestPropertyMessage_data_t *)
data_ptr;
2230 strncpy(data->name, ini_name, 64-1);
2231 data->name[64-1] = 0;
2232 strncpy(data->property_name, ini_property_name, 64-1);
2233 data->property_name[64-1] = 0;
2234 strncpy(data->property_value, ini_property_value, 1024-1);
2235 data->property_value[1024-1] = 0;
2236 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2237 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2238 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2239 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2246 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2256 data_size =
sizeof(SetPointOfInterestPropertyMessage_data_t);
2259 data = (SetPointOfInterestPropertyMessage_data_t *)
data_ptr;
2261 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2262 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2263 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2264 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2271 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2293 data = (SetPointOfInterestPropertyMessage_data_t *)
data_ptr;
2339 return data->property_name;
2359 set_field(data->property_name, new_property_name);
2370 return data->property_value;
2391 set_field(data->property_value, new_property_value);
2419 data_size =
sizeof(AddEdgeMessage_data_t);
2422 data = (AddEdgeMessage_data_t *)
data_ptr;
2424 strncpy(data->p1, ini_p1, 64-1);
2426 strncpy(data->p2, ini_p2, 64-1);
2428 data->directed = ini_directed;
2429 data->mode = ini_mode;
2430 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2431 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2432 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2433 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2440 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2451 data_size =
sizeof(AddEdgeMessage_data_t);
2454 data = (AddEdgeMessage_data_t *)
data_ptr;
2456 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2457 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2458 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2459 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2466 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2489 data = (AddEdgeMessage_data_t *)
data_ptr;
2564 return data->directed;
2587 set_field(data->directed, new_directed);
2643 data_size =
sizeof(SetGraphDefaultPropertyMessage_data_t);
2646 data = (SetGraphDefaultPropertyMessage_data_t *)
data_ptr;
2648 strncpy(data->property_name, ini_property_name, 64-1);
2649 data->property_name[64-1] = 0;
2650 strncpy(data->property_value, ini_property_value, 1024-1);
2651 data->property_value[1024-1] = 0;
2652 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2653 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2654 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2655 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2662 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2671 data_size =
sizeof(SetGraphDefaultPropertyMessage_data_t);
2674 data = (SetGraphDefaultPropertyMessage_data_t *)
data_ptr;
2676 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2677 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2678 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2679 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2686 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2707 data = (SetGraphDefaultPropertyMessage_data_t *)
data_ptr;
2719 return data->property_name;
2739 set_field(data->property_name, new_property_name);
2750 return data->property_value;
2771 set_field(data->property_value, new_property_value);
2796 data_size =
sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2799 data = (SetCopyGraphDefaultPropertiesMessage_data_t *)
data_ptr;
2801 data->enable_copy = ini_enable_copy;
2802 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2803 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2804 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2805 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2812 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2820 data_size =
sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2823 data = (SetCopyGraphDefaultPropertiesMessage_data_t *)
data_ptr;
2825 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2826 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2827 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2828 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2835 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2855 data = (SetCopyGraphDefaultPropertiesMessage_data_t *)
data_ptr;
2868 return data->enable_copy;
2889 set_field(data->enable_copy, new_enable_copy);
2914 data_size =
sizeof(RemovePointOfInterestMessage_data_t);
2917 data = (RemovePointOfInterestMessage_data_t *)
data_ptr;
2919 strncpy(data->name, ini_name, 64-1);
2920 data->name[64-1] = 0;
2921 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2922 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2923 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2924 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2931 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2939 data_size =
sizeof(RemovePointOfInterestMessage_data_t);
2942 data = (RemovePointOfInterestMessage_data_t *)
data_ptr;
2944 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2945 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2946 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2947 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2954 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2974 data = (RemovePointOfInterestMessage_data_t *)
data_ptr;
3033 data_size =
sizeof(ComputeMessage_data_t);
3036 data = (ComputeMessage_data_t *)
data_ptr;
3038 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
3039 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
3040 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
3041 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
3048 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
3067 data = (ComputeMessage_data_t *)
data_ptr;
3130 if ( m10 != NULL ) {
3134 if ( m11 != NULL ) {
3138 if ( m12 != NULL ) {
3142 if ( m13 != NULL ) {
3146 if ( m14 != NULL ) {
3150 if ( m15 != NULL ) {
3154 if ( m16 != NULL ) {
Base class for all Fawkes BlackBoard interfaces.
const char * type() const
Get type of interface.
void * data_ptr
Pointer to local memory storage.
void set_field(FieldT &field, DataT &data)
Set a field, set data_changed to true and update data_changed accordingly.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
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.
void * data_ptr
Pointer to memory that contains local data.
message_data_ts_t * data_ts
data timestamp aliasing pointer
unsigned int data_size
Size of memory needed to hold all data.
AddEdgeMessage Fawkes BlackBoard Interface Message.
char * p2() const
Get p2 value.
void set_p2(const char *new_p2)
Set p2 value.
virtual Message * clone() const
Clone this message.
~AddEdgeMessage()
Destructor.
char * p1() const
Get p1 value.
void set_mode(const EdgeMode new_mode)
Set mode value.
size_t maxlenof_mode() const
Get maximum length of mode value.
EdgeMode mode() const
Get mode value.
size_t maxlenof_directed() const
Get maximum length of directed value.
AddEdgeMessage()
Constructor.
void set_p1(const char *new_p1)
Set p1 value.
void set_directed(const bool new_directed)
Set directed value.
size_t maxlenof_p1() const
Get maximum length of p1 value.
bool is_directed() const
Get directed value.
size_t maxlenof_p2() const
Get maximum length of p2 value.
AddMapObstaclesMessage Fawkes BlackBoard Interface Message.
void set_max_line_point_distance(const float new_max_line_point_distance)
Set max_line_point_distance value.
AddMapObstaclesMessage()
Constructor.
virtual Message * clone() const
Clone this message.
size_t maxlenof_max_line_point_distance() const
Get maximum length of max_line_point_distance value.
~AddMapObstaclesMessage()
Destructor.
float max_line_point_distance() const
Get max_line_point_distance value.
AddObstacleMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_x() const
Get maximum length of x value.
float y() const
Get y value.
virtual Message * clone() const
Clone this message.
void set_y(const float new_y)
Set y value.
size_t maxlenof_y() const
Get maximum length of y value.
char * name() const
Get name value.
void set_name(const char *new_name)
Set name value.
float x() const
Get x value.
void set_x(const float new_x)
Set x value.
AddObstacleMessage()
Constructor.
size_t maxlenof_name() const
Get maximum length of name value.
~AddObstacleMessage()
Destructor.
AddPointOfInterestMessage Fawkes BlackBoard Interface Message.
~AddPointOfInterestMessage()
Destructor.
void set_y(const float new_y)
Set y value.
size_t maxlenof_y() const
Get maximum length of y value.
size_t maxlenof_mode() const
Get maximum length of mode value.
size_t maxlenof_x() const
Get maximum length of x value.
void set_x(const float new_x)
Set x value.
virtual Message * clone() const
Clone this message.
char * name() const
Get name value.
float x() const
Get x value.
AddPointOfInterestMessage()
Constructor.
size_t maxlenof_name() const
Get maximum length of name value.
void set_mode(const ConnectionMode new_mode)
Set mode value.
ConnectionMode mode() const
Get mode value.
float y() const
Get y value.
void set_name(const char *new_name)
Set name value.
AddPointOfInterestWithOriMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_mode() const
Get maximum length of mode value.
size_t maxlenof_x() const
Get maximum length of x value.
ConnectionMode mode() const
Get mode value.
float ori() const
Get ori value.
void set_ori(const float new_ori)
Set ori value.
AddPointOfInterestWithOriMessage()
Constructor.
size_t maxlenof_ori() const
Get maximum length of ori value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_y() const
Get maximum length of y value.
void set_x(const float new_x)
Set x value.
size_t maxlenof_name() const
Get maximum length of name value.
void set_name(const char *new_name)
Set name value.
float x() const
Get x value.
void set_mode(const ConnectionMode new_mode)
Set mode value.
void set_y(const float new_y)
Set y value.
float y() const
Get y value.
~AddPointOfInterestWithOriMessage()
Destructor.
char * name() const
Get name value.
ClearMessage Fawkes BlackBoard Interface Message.
ClearMessage()
Constructor.
virtual Message * clone() const
Clone this message.
~ClearMessage()
Destructor.
ComputeMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
~ComputeMessage()
Destructor.
ComputeMessage()
Constructor.
RemoveObstacleMessage Fawkes BlackBoard Interface Message.
void set_name(const char *new_name)
Set name value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_name() const
Get maximum length of name value.
~RemoveObstacleMessage()
Destructor.
char * name() const
Get name value.
RemoveObstacleMessage()
Constructor.
RemovePointOfInterestMessage Fawkes BlackBoard Interface Message.
void set_name(const char *new_name)
Set name value.
RemovePointOfInterestMessage()
Constructor.
~RemovePointOfInterestMessage()
Destructor.
size_t maxlenof_name() const
Get maximum length of name value.
virtual Message * clone() const
Clone this message.
char * name() const
Get name value.
SetAlgorithmMessage Fawkes BlackBoard Interface Message.
SetAlgorithmMessage()
Constructor.
void set_algorithm(const Algorithm new_algorithm)
Set algorithm value.
~SetAlgorithmMessage()
Destructor.
size_t maxlenof_algorithm() const
Get maximum length of algorithm value.
virtual Message * clone() const
Clone this message.
Algorithm algorithm() const
Get algorithm value.
SetAlgorithmParameterMessage Fawkes BlackBoard Interface Message.
void set_param(const char *new_param)
Set param value.
size_t maxlenof_value() const
Get maximum length of value value.
~SetAlgorithmParameterMessage()
Destructor.
void set_value(const char *new_value)
Set value value.
SetAlgorithmParameterMessage()
Constructor.
char * param() const
Get param value.
char * value() const
Get value value.
size_t maxlenof_param() const
Get maximum length of param value.
virtual Message * clone() const
Clone this message.
SetBoundingBoxMessage Fawkes BlackBoard Interface Message.
float p2_x() const
Get p2_x value.
size_t maxlenof_p1_y() const
Get maximum length of p1_y value.
float p2_y() const
Get p2_y value.
~SetBoundingBoxMessage()
Destructor.
size_t maxlenof_p2_y() const
Get maximum length of p2_y value.
size_t maxlenof_p1_x() const
Get maximum length of p1_x value.
virtual Message * clone() const
Clone this message.
void set_p1_y(const float new_p1_y)
Set p1_y value.
float p1_y() const
Get p1_y value.
float p1_x() const
Get p1_x value.
void set_p1_x(const float new_p1_x)
Set p1_x value.
size_t maxlenof_p2_x() const
Get maximum length of p2_x value.
void set_p2_x(const float new_p2_x)
Set p2_x value.
SetBoundingBoxMessage()
Constructor.
void set_p2_y(const float new_p2_y)
Set p2_y value.
SetCopyGraphDefaultPropertiesMessage Fawkes BlackBoard Interface Message.
void set_enable_copy(const bool new_enable_copy)
Set enable_copy value.
SetCopyGraphDefaultPropertiesMessage()
Constructor.
~SetCopyGraphDefaultPropertiesMessage()
Destructor.
size_t maxlenof_enable_copy() const
Get maximum length of enable_copy value.
bool is_enable_copy() const
Get enable_copy value.
virtual Message * clone() const
Clone this message.
SetFilterMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_enable() const
Get maximum length of enable value.
bool is_enable() const
Get enable value.
FilterType filter() const
Get filter value.
void set_enable(const bool new_enable)
Set enable value.
void set_filter(const FilterType new_filter)
Set filter value.
virtual Message * clone() const
Clone this message.
SetFilterMessage()
Constructor.
~SetFilterMessage()
Destructor.
size_t maxlenof_filter() const
Get maximum length of filter value.
SetFilterParamFloatMessage Fawkes BlackBoard Interface Message.
void set_param(const char *new_param)
Set param value.
size_t maxlenof_value() const
Get maximum length of value value.
float value() const
Get value value.
void set_filter(const FilterType new_filter)
Set filter value.
void set_value(const float new_value)
Set value value.
char * param() const
Get param value.
size_t maxlenof_filter() const
Get maximum length of filter value.
~SetFilterParamFloatMessage()
Destructor.
FilterType filter() const
Get filter value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_param() const
Get maximum length of param value.
SetFilterParamFloatMessage()
Constructor.
SetGraphDefaultPropertyMessage Fawkes BlackBoard Interface Message.
char * property_value() const
Get property_value value.
void set_property_value(const char *new_property_value)
Set property_value value.
virtual Message * clone() const
Clone this message.
~SetGraphDefaultPropertyMessage()
Destructor.
void set_property_name(const char *new_property_name)
Set property_name value.
char * property_name() const
Get property_name value.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
SetGraphDefaultPropertyMessage()
Constructor.
size_t maxlenof_property_value() const
Get maximum length of property_value value.
SetPointOfInterestPropertyMessage Fawkes BlackBoard Interface Message.
char * property_name() const
Get property_name value.
char * name() const
Get name value.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
void set_property_value(const char *new_property_value)
Set property_value value.
~SetPointOfInterestPropertyMessage()
Destructor.
void set_property_name(const char *new_property_name)
Set property_name value.
SetPointOfInterestPropertyMessage()
Constructor.
char * property_value() const
Get property_value value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_name() const
Get maximum length of name value.
void set_name(const char *new_name)
Set name value.
size_t maxlenof_property_value() const
Get maximum length of property_value value.
NavGraphGeneratorInterface Fawkes BlackBoard Interface.
ConnectionMode
Describe how to connect nodes to the graph.
@ CLOSEST_EDGE
Connect point to the edge in which segment it lies, i.e.
@ UNCONNECTED
The node is marked as unconnected and will not be connected to another node.
@ CLOSEST_EDGE_OR_NODE
First try the CLOSEST_EDGE method.
@ CLOSEST_NODE
Connect point to the node on the graph closest to the given point.
@ NOT_CONNECTED
The node is will not be initially connected.
FilterType
Post-processing filtering type.
@ FILTER_MULTI_GRAPH
Sometimes after applying other filters one can end up with multiple disconnected graphs.
@ FILTER_EDGES_BY_MAP
If enabled, filters out all edges after the map generation that pass too close by an occupied cell of...
@ FILTER_ORPHAN_NODES
If enabled, filters out all nodes which are not connected to any other node.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
Algorithm
Available generator algorithms.
@ ALGORITHM_VORONOI
Voronoi-based algorithm for navgraph generation.
@ ALGORITHM_GRID
Grid-based algorithm with customizable spacing.
EdgeMode
When adding edges, the mode defines how to add edges.
@ NO_INTERSECTION
Only insert edge if it does not intersect with any other existing edge in the graph.
@ SPLIT_INTERSECTION
If the new edge intersects with one or more edges, add new points at the intersections and split the ...
@ FORCE
The edge is added as-is, it may overlap or intersect with other edges.
Fawkes library namespace.
@ IFT_ENUM
field with interface specific enum type
Timestamp data, must be present and first entries for each interface data structs!...