24 #include <interfaces/NavGraphGeneratorInterface.h> 26 #include <core/exceptions/software.h> 59 NavGraphGeneratorInterface::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 add_fieldinfo(IFT_UINT32,
"msgid", 1, &data->msgid);
78 add_fieldinfo(IFT_BOOL,
"final", 1, &data->final);
79 add_messageinfo(
"ClearMessage");
80 add_messageinfo(
"SetBoundingBoxMessage");
81 add_messageinfo(
"SetFilterMessage");
82 add_messageinfo(
"SetFilterParamFloatMessage");
83 add_messageinfo(
"AddMapObstaclesMessage");
84 add_messageinfo(
"AddObstacleMessage");
85 add_messageinfo(
"RemoveObstacleMessage");
86 add_messageinfo(
"AddPointOfInterestMessage");
87 add_messageinfo(
"AddPointOfInterestWithOriMessage");
88 add_messageinfo(
"SetPointOfInterestPropertyMessage");
89 add_messageinfo(
"AddEdgeMessage");
90 add_messageinfo(
"SetGraphDefaultPropertyMessage");
91 add_messageinfo(
"SetCopyGraphDefaultPropertiesMessage");
92 add_messageinfo(
"RemovePointOfInterestMessage");
93 add_messageinfo(
"ComputeMessage");
94 unsigned char tmp_hash[] = {0x5e, 0xdf, 0x82, 0xa5, 0x9f, 0x36, 0xc2, 0xb5, 0x43, 0xba, 0xb6, 0x5, 0x12, 0xf4, 0x9c, 0xd};
99 NavGraphGeneratorInterface::~NavGraphGeneratorInterface()
111 case NOT_CONNECTED:
return "NOT_CONNECTED";
112 case UNCONNECTED:
return "UNCONNECTED";
113 case CLOSEST_NODE:
return "CLOSEST_NODE";
114 case CLOSEST_EDGE:
return "CLOSEST_EDGE";
115 case CLOSEST_EDGE_OR_NODE:
return "CLOSEST_EDGE_OR_NODE";
116 default:
return "UNKNOWN";
124 NavGraphGeneratorInterface::tostring_FilterType(
FilterType value)
const 127 case FILTER_EDGES_BY_MAP:
return "FILTER_EDGES_BY_MAP";
128 case FILTER_ORPHAN_NODES:
return "FILTER_ORPHAN_NODES";
129 case FILTER_MULTI_GRAPH:
return "FILTER_MULTI_GRAPH";
130 default:
return "UNKNOWN";
138 NavGraphGeneratorInterface::tostring_EdgeMode(
EdgeMode value)
const 141 case NO_INTERSECTION:
return "NO_INTERSECTION";
142 case SPLIT_INTERSECTION:
return "SPLIT_INTERSECTION";
143 case FORCE:
return "FORCE";
144 default:
return "UNKNOWN";
156 NavGraphGeneratorInterface::msgid()
const 166 NavGraphGeneratorInterface::maxlenof_msgid()
const 179 NavGraphGeneratorInterface::set_msgid(
const uint32_t new_msgid)
181 data->msgid = new_msgid;
194 NavGraphGeneratorInterface::is_final()
const 204 NavGraphGeneratorInterface::maxlenof_final()
const 218 NavGraphGeneratorInterface::set_final(
const bool new_final)
220 data->final = new_final;
226 NavGraphGeneratorInterface::create_message(
const char *type)
const 228 if ( strncmp(
"ClearMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
230 }
else if ( strncmp(
"SetBoundingBoxMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
232 }
else if ( strncmp(
"SetFilterMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
234 }
else if ( strncmp(
"SetFilterParamFloatMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
236 }
else if ( strncmp(
"AddMapObstaclesMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
238 }
else if ( strncmp(
"AddObstacleMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
240 }
else if ( strncmp(
"RemoveObstacleMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
242 }
else if ( strncmp(
"AddPointOfInterestMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
244 }
else if ( strncmp(
"AddPointOfInterestWithOriMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
246 }
else if ( strncmp(
"SetPointOfInterestPropertyMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
248 }
else if ( strncmp(
"AddEdgeMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
250 }
else if ( strncmp(
"SetGraphDefaultPropertyMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
252 }
else if ( strncmp(
"SetCopyGraphDefaultPropertiesMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
254 }
else if ( strncmp(
"RemovePointOfInterestMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
256 }
else if ( strncmp(
"ComputeMessage", type, __INTERFACE_MESSAGE_TYPE_SIZE) == 0 ) {
260 "message type for this interface type.", type);
269 NavGraphGeneratorInterface::copy_values(
const Interface *other)
274 type(), other->
type());
276 memcpy(data, oi->data,
sizeof(NavGraphGeneratorInterface_data_t));
280 NavGraphGeneratorInterface::enum_tostring(
const char *enumtype,
int val)
const 282 if (strcmp(enumtype,
"ConnectionMode") == 0) {
285 if (strcmp(enumtype,
"FilterType") == 0) {
288 if (strcmp(enumtype,
"EdgeMode") == 0) {
289 return tostring_EdgeMode((
EdgeMode)val);
303 NavGraphGeneratorInterface::ClearMessage::ClearMessage() :
Message(
"ClearMessage")
308 data = (ClearMessage_data_t *)
data_ptr;
310 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
311 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
312 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
313 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
320 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
337 data = (ClearMessage_data_t *)
data_ptr;
367 data_size =
sizeof(SetBoundingBoxMessage_data_t);
370 data = (SetBoundingBoxMessage_data_t *)
data_ptr;
372 data->p1_x = ini_p1_x;
373 data->p1_y = ini_p1_y;
374 data->p2_x = ini_p2_x;
375 data->p2_y = ini_p2_y;
376 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
377 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
378 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
379 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
386 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
395 data_size =
sizeof(SetBoundingBoxMessage_data_t);
398 data = (SetBoundingBoxMessage_data_t *)
data_ptr;
400 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
401 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
402 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
403 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
410 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
431 data = (SetBoundingBoxMessage_data_t *)
data_ptr;
463 data->p1_x = new_p1_x;
493 data->p1_y = new_p1_y;
523 data->p2_x = new_p2_x;
553 data->p2_y = new_p2_y;
579 data_size =
sizeof(SetFilterMessage_data_t);
582 data = (SetFilterMessage_data_t *)
data_ptr;
584 data->filter = ini_filter;
585 data->enable = ini_enable;
586 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
587 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
588 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
589 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
596 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
603 data_size =
sizeof(SetFilterMessage_data_t);
606 data = (SetFilterMessage_data_t *)
data_ptr;
608 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
609 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
610 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
611 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
618 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
637 data = (SetFilterMessage_data_t *)
data_ptr;
671 data->filter = new_filter;
703 data->enable = new_enable;
730 data_size =
sizeof(SetFilterParamFloatMessage_data_t);
733 data = (SetFilterParamFloatMessage_data_t *)
data_ptr;
735 data->filter = ini_filter;
736 strncpy(data->param, ini_param, 32);
737 data->value = ini_value;
738 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
739 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
740 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
741 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
748 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
756 data_size =
sizeof(SetFilterParamFloatMessage_data_t);
759 data = (SetFilterParamFloatMessage_data_t *)
data_ptr;
761 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
762 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
763 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
764 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
771 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
791 data = (SetFilterParamFloatMessage_data_t *)
data_ptr;
825 data->filter = new_filter;
857 strncpy(data->param, new_param,
sizeof(data->param));
889 data->value = new_value;
914 data_size =
sizeof(AddMapObstaclesMessage_data_t);
917 data = (AddMapObstaclesMessage_data_t *)
data_ptr;
919 data->max_line_point_distance = ini_max_line_point_distance;
920 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
921 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
922 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
923 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
930 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
936 data_size =
sizeof(AddMapObstaclesMessage_data_t);
939 data = (AddMapObstaclesMessage_data_t *)
data_ptr;
941 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
942 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
943 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
944 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
951 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
969 data = (AddMapObstaclesMessage_data_t *)
data_ptr;
984 return data->max_line_point_distance;
1007 data->max_line_point_distance = new_max_line_point_distance;
1034 data_size =
sizeof(AddObstacleMessage_data_t);
1037 data = (AddObstacleMessage_data_t *)
data_ptr;
1039 strncpy(data->name, ini_name, 64);
1042 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1043 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1044 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1045 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1052 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1060 data_size =
sizeof(AddObstacleMessage_data_t);
1063 data = (AddObstacleMessage_data_t *)
data_ptr;
1065 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1066 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1067 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1068 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1075 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1095 data = (AddObstacleMessage_data_t *)
data_ptr;
1131 strncpy(data->name, new_name,
sizeof(data->name));
1216 data_size =
sizeof(RemoveObstacleMessage_data_t);
1219 data = (RemoveObstacleMessage_data_t *)
data_ptr;
1221 strncpy(data->name, ini_name, 64);
1222 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1223 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1224 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1225 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1232 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1238 data_size =
sizeof(RemoveObstacleMessage_data_t);
1241 data = (RemoveObstacleMessage_data_t *)
data_ptr;
1243 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1244 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1245 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1246 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1253 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1271 data = (RemoveObstacleMessage_data_t *)
data_ptr;
1307 strncpy(data->name, new_name,
sizeof(data->name));
1335 data_size =
sizeof(AddPointOfInterestMessage_data_t);
1338 data = (AddPointOfInterestMessage_data_t *)
data_ptr;
1340 strncpy(data->name, ini_name, 64);
1343 data->mode = ini_mode;
1344 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1345 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1346 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1347 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1354 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1363 data_size =
sizeof(AddPointOfInterestMessage_data_t);
1366 data = (AddPointOfInterestMessage_data_t *)
data_ptr;
1368 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1369 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1370 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1371 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1378 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1399 data = (AddPointOfInterestMessage_data_t *)
data_ptr;
1435 strncpy(data->name, new_name,
sizeof(data->name));
1529 data->mode = new_mode;
1558 data_size =
sizeof(AddPointOfInterestWithOriMessage_data_t);
1561 data = (AddPointOfInterestWithOriMessage_data_t *)
data_ptr;
1563 strncpy(data->name, ini_name, 64);
1566 data->ori = ini_ori;
1567 data->mode = ini_mode;
1568 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1569 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1570 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1571 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1578 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1588 data_size =
sizeof(AddPointOfInterestWithOriMessage_data_t);
1591 data = (AddPointOfInterestWithOriMessage_data_t *)
data_ptr;
1593 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1594 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1595 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1596 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1603 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1625 data = (AddPointOfInterestWithOriMessage_data_t *)
data_ptr;
1661 strncpy(data->name, new_name,
sizeof(data->name));
1751 data->ori = new_ori;
1785 data->mode = new_mode;
1812 data_size =
sizeof(SetPointOfInterestPropertyMessage_data_t);
1815 data = (SetPointOfInterestPropertyMessage_data_t *)
data_ptr;
1817 strncpy(data->name, ini_name, 64);
1818 strncpy(data->property_name, ini_property_name, 64);
1819 strncpy(data->property_value, ini_property_value, 1024);
1820 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1821 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1822 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1823 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1830 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1838 data_size =
sizeof(SetPointOfInterestPropertyMessage_data_t);
1841 data = (SetPointOfInterestPropertyMessage_data_t *)
data_ptr;
1843 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
1844 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
1845 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
1846 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
1853 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
1873 data = (SetPointOfInterestPropertyMessage_data_t *)
data_ptr;
1909 strncpy(data->name, new_name,
sizeof(data->name));
1919 return data->property_name;
1939 strncpy(data->property_name, new_property_name,
sizeof(data->property_name));
1950 return data->property_value;
1971 strncpy(data->property_value, new_property_value,
sizeof(data->property_value));
1999 data_size =
sizeof(AddEdgeMessage_data_t);
2002 data = (AddEdgeMessage_data_t *)
data_ptr;
2004 strncpy(data->p1, ini_p1, 64);
2005 strncpy(data->p2, ini_p2, 64);
2006 data->directed = ini_directed;
2007 data->mode = ini_mode;
2008 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2009 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2010 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2011 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2018 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2027 data_size =
sizeof(AddEdgeMessage_data_t);
2030 data = (AddEdgeMessage_data_t *)
data_ptr;
2032 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2033 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2034 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2035 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2042 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2063 data = (AddEdgeMessage_data_t *)
data_ptr;
2095 strncpy(data->p1, new_p1,
sizeof(data->p1));
2125 strncpy(data->p2, new_p2,
sizeof(data->p2));
2138 return data->directed;
2161 data->directed = new_directed;
2191 data->mode = new_mode;
2217 data_size =
sizeof(SetGraphDefaultPropertyMessage_data_t);
2220 data = (SetGraphDefaultPropertyMessage_data_t *)
data_ptr;
2222 strncpy(data->property_name, ini_property_name, 64);
2223 strncpy(data->property_value, ini_property_value, 1024);
2224 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2225 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2226 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2227 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2234 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2241 data_size =
sizeof(SetGraphDefaultPropertyMessage_data_t);
2244 data = (SetGraphDefaultPropertyMessage_data_t *)
data_ptr;
2246 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2247 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2248 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2249 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2256 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2275 data = (SetGraphDefaultPropertyMessage_data_t *)
data_ptr;
2287 return data->property_name;
2307 strncpy(data->property_name, new_property_name,
sizeof(data->property_name));
2318 return data->property_value;
2339 strncpy(data->property_value, new_property_value,
sizeof(data->property_value));
2364 data_size =
sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2367 data = (SetCopyGraphDefaultPropertiesMessage_data_t *)
data_ptr;
2369 data->enable_copy = ini_enable_copy;
2370 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2371 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2372 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2373 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2380 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2386 data_size =
sizeof(SetCopyGraphDefaultPropertiesMessage_data_t);
2389 data = (SetCopyGraphDefaultPropertiesMessage_data_t *)
data_ptr;
2391 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2392 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2393 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2394 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2401 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2419 data = (SetCopyGraphDefaultPropertiesMessage_data_t *)
data_ptr;
2432 return data->enable_copy;
2453 data->enable_copy = new_enable_copy;
2478 data_size =
sizeof(RemovePointOfInterestMessage_data_t);
2481 data = (RemovePointOfInterestMessage_data_t *)
data_ptr;
2483 strncpy(data->name, ini_name, 64);
2484 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2485 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2486 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2487 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2494 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2500 data_size =
sizeof(RemovePointOfInterestMessage_data_t);
2503 data = (RemovePointOfInterestMessage_data_t *)
data_ptr;
2505 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2506 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2507 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2508 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2515 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2533 data = (RemovePointOfInterestMessage_data_t *)
data_ptr;
2569 strncpy(data->name, new_name,
sizeof(data->name));
2592 data_size =
sizeof(ComputeMessage_data_t);
2595 data = (ComputeMessage_data_t *)
data_ptr;
2597 enum_map_ConnectionMode[(int)
NOT_CONNECTED] =
"NOT_CONNECTED";
2598 enum_map_ConnectionMode[(int)
UNCONNECTED] =
"UNCONNECTED";
2599 enum_map_ConnectionMode[(int)
CLOSEST_NODE] =
"CLOSEST_NODE";
2600 enum_map_ConnectionMode[(int)
CLOSEST_EDGE] =
"CLOSEST_EDGE";
2607 enum_map_EdgeMode[(int)
FORCE] =
"FORCE";
2624 data = (ComputeMessage_data_t *)
data_ptr;
2687 if ( m10 != NULL ) {
2691 if ( m11 != NULL ) {
2695 if ( m12 != NULL ) {
2699 if ( m13 != NULL ) {
2703 if ( m14 != NULL ) {
~AddObstacleMessage()
Destructor.
char * name() const
Get name value.
size_t maxlenof_mode() const
Get maximum length of mode value.
void set_name(const char *new_name)
Set name value.
void set_y(const float new_y)
Set y value.
SetFilterParamFloatMessage Fawkes BlackBoard Interface Message.
FilterType filter() const
Get filter value.
void set_p2_y(const float new_p2_y)
Set p2_y value.
RemovePointOfInterestMessage Fawkes BlackBoard Interface Message.
float p2_y() const
Get p2_y value.
AddPointOfInterestMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_p2_x() const
Get maximum length of p2_x value.
The node is marked as unconnected and will not be connected to another node.
size_t maxlenof_name() const
Get maximum length of name value.
~AddPointOfInterestMessage()
Destructor.
virtual Message * clone() const
Clone this message.
void set_mode(const ConnectionMode new_mode)
Set mode value.
void set_max_line_point_distance(const float new_max_line_point_distance)
Set max_line_point_distance value.
EdgeMode
When adding edges, the mode defines how to add edges.
void * data_ptr
Pointer to memory that contains local data.
~ClearMessage()
Destructor.
size_t maxlenof_y() const
Get maximum length of y value.
float value() const
Get value value.
float max_line_point_distance() const
Get max_line_point_distance value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
void set_property_value(const char *new_property_value)
Set property_value value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_x() const
Get maximum length of x value.
virtual Message * clone() const
Clone this message.
AddPointOfInterestWithOriMessage Fawkes BlackBoard Interface Message.
~AddMapObstaclesMessage()
Destructor.
SetGraphDefaultPropertyMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
void set_property_name(const char *new_property_name)
Set property_name value.
SetCopyGraphDefaultPropertiesMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_name() const
Get maximum length of name value.
size_t maxlenof_name() const
Get maximum length of name value.
virtual Message * clone() const
Clone this message.
float p1_x() const
Get p1_x value.
ComputeMessage()
Constructor.
char * name() const
Get name value.
Fawkes library namespace.
void set_p1(const char *new_p1)
Set p1 value.
float p2_x() const
Get p2_x value.
size_t maxlenof_value() const
Get maximum length of value value.
Timestamp data, must be present and first entries for each interface data structs! This leans on time...
~RemovePointOfInterestMessage()
Destructor.
size_t maxlenof_max_line_point_distance() const
Get maximum length of max_line_point_distance value.
SetFilterMessage Fawkes BlackBoard Interface Message.
virtual Message * clone() const
Clone this message.
size_t maxlenof_ori() const
Get maximum length of ori value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
void set_x(const float new_x)
Set x value.
SetBoundingBoxMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_property_value() const
Get maximum length of property_value value.
void set_filter(const FilterType new_filter)
Set filter value.
float x() const
Get x value.
void set_param(const char *new_param)
Set param value.
If enabled, filters out all nodes which are not connected to any other node.
SetFilterParamFloatMessage()
Constructor.
EdgeMode mode() const
Get mode value.
ConnectionMode
Drive modes enum.
RemoveObstacleMessage()
Constructor.
ClearMessage()
Constructor.
Sometimes after applying other filters one can end up with multiple disconnected graphs.
virtual Message * clone() const
Clone this message.
size_t maxlenof_filter() const
Get maximum length of filter value.
The node is will not be initially connected.
Base class for all Fawkes BlackBoard interfaces.
void set_ori(const float new_ori)
Set ori value.
size_t maxlenof_directed() const
Get maximum length of directed value.
size_t maxlenof_name() const
Get maximum length of name value.
If enabled, filters out all edges after the map generation that pass too close by an occupied cell of...
size_t maxlenof_property_value() const
Get maximum length of property_value value.
AddObstacleMessage Fawkes BlackBoard Interface Message.
~SetCopyGraphDefaultPropertiesMessage()
Destructor.
float p1_y() const
Get p1_y value.
SetPointOfInterestPropertyMessage Fawkes BlackBoard Interface Message.
float y() const
Get y value.
size_t maxlenof_filter() const
Get maximum length of filter value.
size_t maxlenof_name() const
Get maximum length of name value.
ConnectionMode mode() const
Get mode value.
virtual Message * clone() const
Clone this message.
void set_y(const float new_y)
Set y value.
virtual Message * clone() const
Clone this message.
~SetFilterParamFloatMessage()
Destructor.
void set_value(const float new_value)
Set value value.
message_data_ts_t * data_ts
data timestamp aliasing pointer
char * name() const
Get name value.
unsigned int data_size
Size of memory needed to hold all data.
The edge is added as-is, it may overlap or intersect with other edges.
virtual Message * clone() const
Clone this message.
FilterType filter() const
Get filter value.
char * name() const
Get name value.
AddPointOfInterestWithOriMessage()
Constructor.
NavGraphGeneratorInterface Fawkes BlackBoard Interface.
SetCopyGraphDefaultPropertiesMessage()
Constructor.
float y() const
Get y value.
SetPointOfInterestPropertyMessage()
Constructor.
virtual Message * clone() const
Clone this message.
ComputeMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
size_t maxlenof_enable() const
Get maximum length of enable value.
~AddPointOfInterestWithOriMessage()
Destructor.
size_t maxlenof_p1_x() const
Get maximum length of p1_x value.
size_t maxlenof_p2_y() const
Get maximum length of p2_y value.
char * property_name() const
Get property_name value.
const char * type() const
Get type of interface.
~SetBoundingBoxMessage()
Destructor.
~RemoveObstacleMessage()
Destructor.
float x() const
Get x value.
size_t maxlenof_p2() const
Get maximum length of p2 value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_mode() const
Get maximum length of mode value.
void set_name(const char *new_name)
Set name value.
float ori() const
Get ori value.
void set_y(const float new_y)
Set y value.
char * param() const
Get param value.
char * p1() const
Get p1 value.
void set_p2(const char *new_p2)
Set p2 value.
size_t maxlenof_x() const
Get maximum length of x value.
char * property_value() const
Get property_value value.
void set_x(const float new_x)
Set x value.
SetFilterMessage()
Constructor.
char * property_value() const
Get property_value value.
bool is_enable_copy() const
Get enable_copy value.
char * p2() const
Get p2 value.
void set_name(const char *new_name)
Set name value.
size_t maxlenof_property_name() const
Get maximum length of property_name value.
void set_p2_x(const float new_p2_x)
Set p2_x value.
void set_filter(const FilterType new_filter)
Set filter value.
AddObstacleMessage()
Constructor.
bool is_enable() const
Get enable value.
Only insert edge if it does not intersect with any other existing edge in the graph.
void set_property_value(const char *new_property_value)
Set property_value value.
void set_p1_x(const float new_p1_x)
Set p1_x value.
FilterType
Post-processing filtering type.
void set_property_name(const char *new_property_name)
Set property_name value.
size_t maxlenof_p1() const
Get maximum length of p1 value.
virtual Message * clone() const
Clone this message.
~SetPointOfInterestPropertyMessage()
Destructor.
ClearMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_name() const
Get maximum length of name value.
ConnectionMode mode() const
Get mode value.
SetGraphDefaultPropertyMessage()
Constructor.
~SetGraphDefaultPropertyMessage()
Destructor.
void set_mode(const ConnectionMode new_mode)
Set mode value.
void set_enable_copy(const bool new_enable_copy)
Set enable_copy value.
size_t maxlenof_p1_y() const
Get maximum length of p1_y value.
virtual Message * clone() const
Clone this message.
AddMapObstaclesMessage Fawkes BlackBoard Interface Message.
~SetFilterMessage()
Destructor.
RemovePointOfInterestMessage()
Constructor.
SetBoundingBoxMessage()
Constructor.
void set_name(const char *new_name)
Set name value.
~AddEdgeMessage()
Destructor.
size_t maxlenof_mode() const
Get maximum length of mode value.
void set_mode(const EdgeMode new_mode)
Set mode value.
size_t maxlenof_enable_copy() const
Get maximum length of enable_copy value.
void set_x(const float new_x)
Set x value.
First try the CLOSEST_EDGE method.
float y() const
Get y value.
~ComputeMessage()
Destructor.
char * name() const
Get name value.
Connect point to the node on the graph closest to the given point.
virtual Message * clone() const
Clone this message.
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.
If the new edge intersects with one or more edges, add new points at the intersections and split the ...
void set_name(const char *new_name)
Set name value.
AddEdgeMessage Fawkes BlackBoard Interface Message.
void set_directed(const bool new_directed)
Set directed value.
Connect point to the edge in which segment it lies, i.e.
float x() const
Get x value.
RemoveObstacleMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_y() const
Get maximum length of y value.
bool is_directed() const
Get directed value.
size_t maxlenof_x() const
Get maximum length of x value.
char * name() const
Get name value.
void set_name(const char *new_name)
Set name value.
AddPointOfInterestMessage()
Constructor.
size_t maxlenof_param() const
Get maximum length of param value.
field with interface specific enum type
AddEdgeMessage()
Constructor.
void set_p1_y(const float new_p1_y)
Set p1_y value.
size_t maxlenof_y() const
Get maximum length of y value.
AddMapObstaclesMessage()
Constructor.
char * property_name() const
Get property_name value.
void set_enable(const bool new_enable)
Set enable value.