diff options
11 files changed, 82 insertions, 72 deletions
diff --git a/api/franca/navigation/navigationcore/LocationInput.fidl b/api/franca/navigation/navigationcore/LocationInput.fidl index 1825fb4..c4d372e 100644 --- a/api/franca/navigation/navigationcore/LocationInput.fidl +++ b/api/franca/navigation/navigationcore/LocationInput.fidl @@ -58,7 +58,7 @@ interface LocationInput { Double doubleValue
String stringValue
Coordinate3D coordinate3DValue
- ByteBuffer internalData
+ UInt8[] internalData
}
map Address {
diff --git a/api/franca/navigation/navigationcore/Routing.fidl b/api/franca/navigation/navigationcore/Routing.fidl index c05477a..246f748 100644 --- a/api/franca/navigation/navigationcore/Routing.fidl +++ b/api/franca/navigation/navigationcore/Routing.fidl @@ -68,11 +68,6 @@ interface Routing { DEPARTURE_DATE = 397
}
- enumeration RouteOverviewType extends Schedule {
- TOTAL_TIME = 398
- TOTAL_DISTANCE = 399
- }
-
enumeration PreferenceMode extends BasicEnum { //Base 0x0190
PROHIBIT = 400
AVOID = 401
@@ -95,10 +90,6 @@ interface Routing { RoutePreferenceSource source
}
-
- <**
- @description : struct generated for DBus argument SetRoutePreferences_conditionPreferenceList
- **>
struct ConditionPreference {
PreferenceMode mode
ConditionPreferenceSource source
@@ -118,11 +109,46 @@ interface Routing { ALTITUDE = 162
}
- enumeration WaypointElementType extends GeoLocalizedEnum {
- WAYPOINT_TYPE = 289
- LOCATION_INPUT = 17
+ struct IntermediatePoint extends Coordinate2D {
+ WayPointType type
+ }
+
+ enumeration WayPointType {
+ HARD_POINT = 290
+ SOFT_POINT = 291
+ }
+
+ enumeration RouteOverviewType extends Schedule {
+ TOTAL_TIME = 398
+ TOTAL_DISTANCE = 399
+ }
+
+ union RouteOverviewItem {
+ UInt32 uValue
}
+ map RouteOverview {
+ RouteOverviewType to RouteOverviewItem
+ }
+
+ enumeration WaypointElementType {
+ LATITUDE = 160
+ LONGITUDE = 161
+ ALTITUDE = 162
+ LOCATION_INPUT = 17
+ WAYPOINT_TYPE = 289
+ }
+
+ union WayPointItem {
+ Double coordinateValue
+ WayPointType waypointValue
+ UInt8[] metaData
+ }
+
+ map WayPoint {
+ WaypointElementType to WayPointItem
+ }
+
enumeration RouteSegmentType extends BasicEnum {
LINK_ID = 320 //Base 0x0140
START_LATITUDE = 321
@@ -144,50 +170,22 @@ interface Routing { HIGHWAY_EXIT = 116
SPEED = 164
}
-
- enumeration IntermediatePointType {
- HARD_POINT
- SOFT_POINT
- }
-
- union RouteOverviewItem {
- UInt32 uValue
- }
-
- struct IntermediatePoint extends Coordinate2D {
- IntermediatePointType type
- }
-
+
//TODO: Incomplete
union RouteSegmentItem {
Double doubleValue // LATITUDE, LONGITUDE, ALTITUDE
IntermediatePoint[] intermediatePoints
String stringValue // ROAD_NUMBER
- ByteBuffer linkId
+ UInt8[] linkId
Int32 int32Value
Int16 int16Value
UInt32 uInt32Value
}
-
- union WayPointItem {
- Double coordinateValue
- Int32 altitudeValue
- IntermediatePointType wayPointValue
- ByteBuffer metaData
- }
-
- map WayPoint {
- WaypointElementType to WayPointItem
- }
-
+
map RouteSegment {
RouteSegmentType to RouteSegmentItem
}
- map RouteOverview {
- RouteOverviewType to RouteOverviewItem
- }
-
<**
@description : struct generated for DBus argument SetBlockedRouteStretches_blockParameters
**>
@@ -772,7 +770,7 @@ interface Routing { <**
@description : percentage = progress status. Range [0:100]
**>
- Int8 percentage
+ UInt8 percentage
}
}
diff --git a/src/navigation/CMakeLists.txt b/src/navigation/CMakeLists.txt index bb599cc..13eb1ae 100644 --- a/src/navigation/CMakeLists.txt +++ b/src/navigation/CMakeLists.txt @@ -144,6 +144,8 @@ add_subdirectory(navigation-core) add_subdirectory(map-viewer) +add_subdirectory(poi-cam) + if (NOT WITH_PLUGIN_MIGRATION) - add_subdirectory(poi-cam) +# add_subdirectory(poi-cam) endif() diff --git a/src/navigation/map-viewer/CMakeLists.txt b/src/navigation/map-viewer/CMakeLists.txt index ad8194d..e176cc3 100644 --- a/src/navigation/map-viewer/CMakeLists.txt +++ b/src/navigation/map-viewer/CMakeLists.txt @@ -89,11 +89,15 @@ if(${YOCTO_CONFIG}) include_directories(${STAGING_INCDIR}/navit) endif() +add_subdirectory(configuration-plugin) +add_subdirectory(mapviewercontrol-plugin) +add_subdirectory(session-plugin) + if (WITH_PLUGIN_MIGRATION) set(FRANCA_DIR "${API_DIR}/franca") - add_subdirectory(configuration-server-plugin) - add_subdirectory(mapviewercontrol-server-plugin) - add_subdirectory(session-server-plugin) +# add_subdirectory(configuration-server-plugin) +# add_subdirectory(mapviewercontrol-server-plugin) +# add_subdirectory(session-server-plugin) else() add_subdirectory(configuration-plugin) add_subdirectory(mapviewercontrol-plugin) diff --git a/src/navigation/navigation-core/CMakeLists.txt b/src/navigation/navigation-core/CMakeLists.txt index 8723405..5f8e679 100644 --- a/src/navigation/navigation-core/CMakeLists.txt +++ b/src/navigation/navigation-core/CMakeLists.txt @@ -90,6 +90,8 @@ if(${YOCTO_CONFIG}) endif() +add_subdirectory(enhancedposition-plugin) + if (WITH_PLUGIN_MIGRATION) set(FRANCA_DIR "${API_DIR}/franca") add_subdirectory(configuration-server-plugin) @@ -98,8 +100,8 @@ if (WITH_PLUGIN_MIGRATION) add_subdirectory(mapmatchedposition-server-plugin) add_subdirectory(routing-server-plugin) add_subdirectory(session-server-plugin) - add_subdirectory(poicam-server-plugin) - add_subdirectory(enhancedposition-client-plugin) +# add_subdirectory(poicam-server-plugin) +# add_subdirectory(enhancedposition-client-plugin) else() add_subdirectory(configuration-plugin) add_subdirectory(locationinput-plugin) diff --git a/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt index c910984..5610143 100644 --- a/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt +++ b/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt @@ -34,7 +34,7 @@ if(DBUS_LIB_PATH) message(STATUS "DBUS_LIB_PATH = " ${DBUS_LIB_PATH}) set(DBUS_INCLUDE_DIRS ${DBUS_LIB_PATH}/include/dbus-1.0 ${DBUS_LIB_PATH}/lib/dbus-1.0/include) set(DBUS_LIBDIR ${DBUS_LIB_PATH}/lib) - set(DBUS_LIBRARIES ${DBUS_LIB_PATH}/lib/libdbus-1.so) + set(DBUS_LIBRARIES ${DBUS_LIBDIR}/libdbus-1.so) else() message(FATAL_ERROR "Please specify the path to your patched DBus library using -DDBUS_LIB_PATH=yourPath") endif() @@ -98,9 +98,9 @@ link_directories( ) set(LIBRARIES - ${DBUS_LIBRARIES} ${COMMONAPI_LIBRARIES} ${COMMONAPI_DBUS_LIBRARIES} + ${DBUS_LIBRARIES} ${GOBJECT_LIBRARIES} ${GLIB_LIBRARIES} ${DBUS_CPP_GLIB_LIBRARIES} diff --git a/src/navigation/navigation-core/locationinput-server-plugin/genivi_navigationcore_locationinput.cxx b/src/navigation/navigation-core/locationinput-server-plugin/genivi_navigationcore_locationinput.cxx index 2a987ed..37b52f2 100644 --- a/src/navigation/navigation-core/locationinput-server-plugin/genivi_navigationcore_locationinput.cxx +++ b/src/navigation/navigation-core/locationinput-server-plugin/genivi_navigationcore_locationinput.cxx @@ -121,7 +121,7 @@ public: uint32_t LocationInputHandle; dbg(lvl_debug,"enter\n"); LocationInputHandle=FIRST_LOCATION_HANDLE; - while (mp_handles.count(LocationInputHandle)>0 ) { + while ((mp_handles.count(LocationInputHandle)>0 ) && (mp_handles[LocationInputHandle] != NULL)) { LocationInputHandle++; if (LocationInputHandle == MAX_LOCATION_HANDLES) throw DBus::ErrorLimitsExceeded("Out of location handles"); @@ -140,10 +140,12 @@ public: { LocationInputObj *obj=mp_handles[_locationInputHandle]; delete(obj); + mp_handles[_locationInputHandle]=NULL; } else { throw DBus::ErrorInvalidArgs("location handle invalid"); } + _reply(); } diff --git a/src/navigation/navigation-core/navit_genivi_navigationcore_capi.xsl b/src/navigation/navigation-core/navit_genivi_navigationcore_capi.xsl index 94b92c9..68cd29d 100644 --- a/src/navigation/navigation-core/navit_genivi_navigationcore_capi.xsl +++ b/src/navigation/navigation-core/navit_genivi_navigationcore_capi.xsl @@ -35,9 +35,9 @@ <xsl:text>
 </xsl:text> <plugin path="../../navigation-core/mapmatchedposition-server-plugin/.libs/libgenivi_navigationcore_mapmatchedposition_server.so" ondemand="no"/> <xsl:text>
 </xsl:text> - <plugin path="../../navigation-core/enhancedposition-client-plugin/.libs/libgenivi_positioning_enhancedposition_client.so" ondemand="no"/> + <plugin path="../../navigation-core/enhancedposition-plugin/.libs/libgenivi_positioning_enhancedposition.so" ondemand="no"/> <xsl:text>
 </xsl:text> - <plugin path="../../navigation-core/poicam-server-plugin/.libs/libgenivi_poiservice_cam_server.so" ondemand="no"/> + <plugin path="../../poi-cam/.libs/libgenivi_poiservice_cam_navit.so" ondemand="no"/> </xsl:template> <xsl:template match="/config/plugins/plugin"> <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> diff --git a/src/navigation/navigation-core/routing-server-plugin/genivi_navigationcore_routing.cxx b/src/navigation/navigation-core/routing-server-plugin/genivi_navigationcore_routing.cxx index 3eb1449..5032f36 100644 --- a/src/navigation/navigation-core/routing-server-plugin/genivi_navigationcore_routing.cxx +++ b/src/navigation/navigation-core/routing-server-plugin/genivi_navigationcore_routing.cxx @@ -342,8 +342,6 @@ class RoutingServerStub : public RoutingStubDefault RoutingObj *obj=mp_handles[_routeHandle]; if (!obj) throw DBus::ErrorInvalidArgs("Route handle invalid"); - printf("0\n"); - obj->SetWaypoints(_sessionHandle, _startFromCurrentPosition, _waypointsList); _reply(); } @@ -648,8 +646,6 @@ RoutingObj::SetWaypoints(uint32_t SessionHandle, bool StartFromCurrentPosition, } for (size_t i=0 ; i < Waypoints.size(); i++) { waypoint = Waypoints[i]; - printf("0\n"); - printf("%d",waypoint[Routing::WaypointElementType::LATITUDE]); if (waypoint.find(Routing::WaypointElementType::LATITUDE) == waypoint.end()) throw DBus::ErrorInvalidArgs("Waypoint doesn't contain Latitude"); if (waypoint.find(Routing::WaypointElementType::LONGITUDE) == waypoint.end()) @@ -688,7 +684,7 @@ RoutingObj::CalculateRoute(uint32_t SessionHandle) struct pcoord pc; if (!m_waypoints.size()) - throw DBus::ErrorFailed("no waipoints set"); + throw DBus::ErrorFailed("no waypoints set"); route_set_profile(m_route.u.route,m_vehicleprofile.u.vehicleprofile); if (!m_startfromcurrentposition) { route_set_destination(m_route.u.route, NULL, 0); diff --git a/test/navigation/test-location-input-capi.py b/test/navigation/test-location-input-capi.py index 2f73f70..0a56ce9 100755 --- a/test/navigation/test-location-input-capi.py +++ b/test/navigation/test-location-input-capi.py @@ -226,10 +226,10 @@ def spell_search(handle, entered_string, search_string, valid_characters, first= dbus.String(spell_character), dbus.UInt16(20)) else: print ('TEST FAILED (Target character can not be entered)') - loop.quit() + exit() else: print ('TEST FAILED (Unexpected completion)') - loop.quit() + exit() else: print ('Full spell match') @@ -273,16 +273,16 @@ def evaluate_address(address, guidable): print ('TEST PASSED') else: print ('TEST FAILED (wrong address)') - loop.quit() + exit() else: print ('TEST FAILED (non-guidable address)') - loop.quit() + exit() address_index = current_address_index + 1 if address_index < len(COUNTRY_STRING): startSearch(address_index) else: print('END OF THE TEST') - loop.quit() + exit() # Signal receiver @@ -334,7 +334,7 @@ def content_updated_handler(handle, guidable, available_selection_criteria, addr full_string_search(handle, target_search_string) else: print ('\nTEST FAILED (Invalid search mode)') - loop.quit() + exit() # Handler for SpellResult callback def spell_result_handler(handle, unique_string, valid_characters, full_match): @@ -356,7 +356,7 @@ def spell_result_handler(handle, unique_string, valid_characters, full_match): if len(valid_characters) == 1: if unicode(valid_characters[0]) == u'\x08': print ('\nTEST FAILED (Dead end spelling)') - loop.quit() + exit() if unicode(entered_search_string) == unicode(target_search_string): found_exact_match = 1 @@ -400,7 +400,7 @@ def search_result_list_handler(handle, total_size, window_offset, window_size, r location_input_interface.selectEntry(dbus.UInt32(session_handle), dbus.UInt32(handle), dbus.UInt16(0)) else: print ('\nTEST FAILED (Unexpected single result list)') - loop.quit() + exit() elif spell_next_character == 1: spell_next_character = 0 spell_search(handle, entered_search_string, target_search_string, available_characters) @@ -428,8 +428,13 @@ bus.add_signal_receiver(content_updated_handler, def timeout(): print('Timeout Expired') print ('\nTEST FAILED\n') - loop.quit() + exit() +# Exit +def exit(): + location_input_interface.deleteLocationInput(dbus.UInt32(session_handle),dbus.UInt32(location_input_handle)) + loop.quit() + def startSearch(address_index): global entered_search_string global spell_next_character diff --git a/test/navigation/test-route-calculation-capi.py b/test/navigation/test-route-calculation-capi.py index 98bd88a..45c7fbf 100755 --- a/test/navigation/test-route-calculation-capi.py +++ b/test/navigation/test-route-calculation-capi.py @@ -179,12 +179,13 @@ def launch_route_calculation(route): '+start+'(' + str(locations[routes[g_current_route].getElementsByTagName("start")[0].childNodes[0].data][0]) + ',' + str(locations[routes[g_current_route].getElementsByTagName("start")[0].childNodes[0].data][1]) + ') to \ '+dest+'(' + str(locations[routes[g_current_route].getElementsByTagName("destination")[0].childNodes[0].data][0]) + ',' + str(locations[routes[g_current_route].getElementsByTagName("destination")[0].childNodes[0].data][1]) + ')' #set waypoints + waypointDoubleCapiType = 0x03 g_routing_interface.setWaypoints(dbus.UInt32(g_session_handle), \ dbus.UInt32(g_route_handle), \ dbus.Boolean(0), \ dbus.Array([ \ - dbus.Dictionary({dbus.Int32(GENIVI_NAVIGATIONCORE_LATITUDE):dbus.Struct([dbus.Byte(0),dbus.Double(locations[routes[g_current_route].getElementsByTagName("start")[0].childNodes[0].data][0])]),dbus.Int32(GENIVI_NAVIGATIONCORE_LONGITUDE):dbus.Struct([dbus.Byte(0),dbus.Double(locations[routes[g_current_route].getElementsByTagName("start")[0].childNodes[0].data][1])])}), \ - dbus.Dictionary({dbus.Int32(GENIVI_NAVIGATIONCORE_LATITUDE):dbus.Struct([dbus.Byte(0),dbus.Double(locations[routes[g_current_route].getElementsByTagName("destination")[0].childNodes[0].data][0])]),dbus.Int32(GENIVI_NAVIGATIONCORE_LONGITUDE):dbus.Struct([dbus.Byte(0),dbus.Double(locations[routes[g_current_route].getElementsByTagName("destination")[0].childNodes[0].data][1])])}) \ + dbus.Dictionary({dbus.Int32(GENIVI_NAVIGATIONCORE_LATITUDE):dbus.Struct([dbus.Byte(waypointDoubleCapiType),dbus.Double(locations[routes[g_current_route].getElementsByTagName("start")[0].childNodes[0].data][0])]),dbus.Int32(GENIVI_NAVIGATIONCORE_LONGITUDE):dbus.Struct([dbus.Byte(waypointDoubleCapiType),dbus.Double(locations[routes[g_current_route].getElementsByTagName("start")[0].childNodes[0].data][1])])}), \ + dbus.Dictionary({dbus.Int32(GENIVI_NAVIGATIONCORE_LATITUDE):dbus.Struct([dbus.Byte(waypointDoubleCapiType),dbus.Double(locations[routes[g_current_route].getElementsByTagName("destination")[0].childNodes[0].data][0])]),dbus.Int32(GENIVI_NAVIGATIONCORE_LONGITUDE):dbus.Struct([dbus.Byte(waypointDoubleCapiType),dbus.Double(locations[routes[g_current_route].getElementsByTagName("destination")[0].childNodes[0].data][1])])}) \ ]) \ ) |