From ea97ccb1334a02dd4aea3e02151a8e764db62f07 Mon Sep 17 00:00:00 2001 From: Date: Mon, 26 May 2014 18:23:05 +0200 Subject: [navigation-api/navigation-poc] Alignment with the V3.0.0, POC update --- api/map-viewer/genivi-mapviewer-configuration.xml | 8 +- api/map-viewer/genivi-mapviewer-constants.xml | 9 +- .../genivi-mapviewer-mapviewercontrol.xml | 231 ++++++++++++++++++++- api/map-viewer/genivi-mapviewer-session.xml | 8 +- .../genivi-navigationcore-configuration.xml | 8 +- .../genivi-navigationcore-constants.xml | 39 +++- .../genivi-navigationcore-guidance.xml | 36 ++-- .../genivi-navigationcore-locationinput.xml | 8 +- .../genivi-navigationcore-mapmatchedposition.xml | 8 +- .../genivi-navigationcore-routing.xml | 8 +- .../genivi-navigationcore-session.xml | 8 +- .../genivi_navigationcore_guidance.cxx | 134 ++++++------ 12 files changed, 360 insertions(+), 145 deletions(-) diff --git a/api/map-viewer/genivi-mapviewer-configuration.xml b/api/map-viewer/genivi-mapviewer-configuration.xml index 6939312..dc73bae 100755 --- a/api/map-viewer/genivi-mapviewer-configuration.xml +++ b/api/map-viewer/genivi-mapviewer-configuration.xml @@ -1,14 +1,8 @@  - - 2.0.0 (07-06-2013) + 3.0.0 (21-01-2014) Configuration = This interface offers functions to set and retrieve configuration parameters diff --git a/api/map-viewer/genivi-mapviewer-constants.xml b/api/map-viewer/genivi-mapviewer-constants.xml index cc4515e..2f6d8dd 100644 --- a/api/map-viewer/genivi-mapviewer-constants.xml +++ b/api/map-viewer/genivi-mapviewer-constants.xml @@ -1,13 +1,8 @@ - + - 3.0.0-alpha (07-06-2013) + 3.0.0 (21-01-2014) This document defines the constants used in the MapViewer APIs diff --git a/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml b/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml index 5edfb92..6788710 100755 --- a/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml +++ b/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml @@ -1,14 +1,8 @@  - - 3.0.0-alpha (07-06-2013) + 3.1.0-alpha (03-03-2014) MapViewerControl = This interface offers functions to control the MapViewer @@ -187,6 +181,21 @@ + + + FollowCarModeChanged = This signal is emitted when the follow-car-mode changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + followCarMode = flag. If true, the current car position is interpreted as position of the point the camera must look at + + + SetCameraPosition = This method sets the coordinates of the point at which the camera must be positioned @@ -229,6 +238,24 @@ + + + CameraPositionChanged = This signal is emitted when the position of the camera changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + targetPoint = (lat,lon,alt) + lat = latitude in format %3.6f. Range[-90:+90] + lon = longitude in format %3.6f. Range[-180:+180] + alt = altitude to the ground in meters + + + SetCameraHeadingAngle = This method sets the map view heading angle @@ -320,6 +347,29 @@ + + + CameraHeadingAngleChanged = This signal is emitted when the heading angle of the camera changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + headingType = enum(INVALID,CONSTANT_ANGLE,TRACK_UP,TOWARDS_TARGET, ... ) + + + + + headingAngle = heading angle in degrees. Range [0:360] + The angle in degrees between projection on the ground plane of the line through the center of the screen and the top-centre of the screen, and the North direction + 0 degrees means that the map view is oriented such that North is at the top of the screen + Degrees are measured clockwise such that 90 degrees correspond to the East direction + + + SetCameraTiltAngle = This method sets the camera tilt angle @@ -359,6 +409,23 @@ + + + CameraTiltAngleChanged = This signal is emitted when the camera tilt angle changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + tilt = tilt angle in degrees. Range [-180:180] + Example: 0 = down (straight down to the ground plane), 90 = front (parrallel to the ground plane), 180 = top (straight up to the sky) + Negative angles [0:-180] result in an upside down view + + + Optional @@ -432,6 +499,21 @@ + + + CameraDistanceFromTargetPointChanged = This signal is emitted when the camera distance from the target point changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + distance = distance from the view point in meters + + + SetMapViewScaleMode = This method sets the scaling mode. @@ -597,6 +679,21 @@ + + + MapViewPerspectiveChanged = This signal is emitted when the map perspective chnages + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + perspective = enum(INVALID,2D,3D, ... ) + + + GetSupportedMapViewPerspectives = This method retrieves the supported mapview perspectives @@ -649,6 +746,24 @@ + + + MapViewObjectVisibilityChanged = This signal is emitted when the type of objects shown on the map changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + objectVisibilityList = array[objectVisibility] + objectVisibility = dictionary[key,value] + key = enum[BUILDINGS,TERRAIN, ...] + value = value of type 'b'; if true the objects are shown else they are not shown + + + GetSupportedMapViewObjectVisibilities = This method gets the supported object visibilities. @@ -812,6 +927,25 @@ + + + MapViewBoundingBoxChanged = This signal is emitted when the bounding box of a map instance changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + boundingBox = struct(top-left-corner,bottom-right-corner) + top-left-corner = struct(lat,lon) + bottom-right-corner = struct(lat,lon) + lat = latitude in format %3.6f. Range[-90:+90] + lon = longitude in format %3.6f. Range[-180:+180] + + + SetMapViewSaveArea = This methods defines the area that the HMI guarantees not to @@ -861,6 +995,27 @@ cover with other windows or user interface elements + + + MapViewSaveAreaChanged = This signal is emitted when the area that the HMI guarantees not to cover with other windows or user interface elements chnages + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + boundingBox = struct(rect-left,rect-right,rect-top,rect-bottom) + rect-left = covered area on the left. Range [0:1] + rect-right = covered area on the right. Range [0:1] + rect-top = covered area on top. Range [0:1] + rect-bottom = covered area at the bottom. Range [0:1] + Note: 0.0 means there is no covered area (offset) from that side + When all four parameters are 0 then the save area is equal to the viewport area (being the default) + + + SetMapViewPan = This method pans a given map instance @@ -1059,6 +1214,21 @@ cover with other windows or user interface elements + + + MapViewPerformanceLevelChanged = This signal is emitted when the perfomance level of a map instance changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + performanceLevel = enum(INVALID,LEVEL1,LEVEL2,LEVEL3,LEVEL4,LEVEL5, ... ) + + + GetSupportedMapViewPerformanceLevels = This method retrieves the supported perfomance levels @@ -1242,6 +1412,37 @@ cover with other windows or user interface elements + + + PoiCategoriesVisibilityChanged = This signal is emitted when the visibility of POI categories on a map instance changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + poiCategoryIds = array[poiCategoryId] + poiCategoryId = a POI category as defined in the 'GENIVI POIService API'. + + + + + visible = flag. TRUE means that the POI categories are visible + + + + + minScaleID = minimun scale on which the POI categories are displayed + + + + + maxScaleID = maximum scale on which the POI categories are displayed + + + SetTrafficIncidentsVisibility = Set the visibility of Traffic Incidents on the map. @@ -1299,6 +1500,22 @@ cover with other windows or user interface elements + + + MapViewThemeChanged = This signal is emitted when the theme of a map view instance changes + + + + mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value + + + + + mapViewTheme = enum(INVALID,THEME_1,THEME_2,THEME_3, ... ) + Note: Themes are implementation specific. Example: THEME_1 = day color, THEME_2 = night color + + + GetSupportedMapViewThemes = This method retrieves the supported mapview themes diff --git a/api/map-viewer/genivi-mapviewer-session.xml b/api/map-viewer/genivi-mapviewer-session.xml index f2a8a12..911f645 100755 --- a/api/map-viewer/genivi-mapviewer-session.xml +++ b/api/map-viewer/genivi-mapviewer-session.xml @@ -1,14 +1,8 @@  - - 3.0.0-alpha (07-06-2013) + 3.0.0 (21-01-2014) Session = This interface offers functions to create and delete sessions diff --git a/api/navigation-core/genivi-navigationcore-configuration.xml b/api/navigation-core/genivi-navigationcore-configuration.xml index 8585e50..0aa1bb9 100755 --- a/api/navigation-core/genivi-navigationcore-configuration.xml +++ b/api/navigation-core/genivi-navigationcore-configuration.xml @@ -1,14 +1,8 @@  - - 3.0.0-alpha (07-06-2013) + 3.0.0 (21-01-2014) Configuration = This interface offers functions to set and retrieve configuration parameters diff --git a/api/navigation-core/genivi-navigationcore-constants.xml b/api/navigation-core/genivi-navigationcore-constants.xml index 64993cc..7a8ae0b 100755 --- a/api/navigation-core/genivi-navigationcore-constants.xml +++ b/api/navigation-core/genivi-navigationcore-constants.xml @@ -1,13 +1,8 @@  - + - 3.0.0-alpha (23-10-2013) + 3.0.0 (21-01-2014) This document defines the constants used in the NavigationCore APIs @@ -60,7 +55,7 @@ - + @@ -209,4 +204,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/api/navigation-core/genivi-navigationcore-guidance.xml b/api/navigation-core/genivi-navigationcore-guidance.xml index 7217fb6..82b47a4 100755 --- a/api/navigation-core/genivi-navigationcore-guidance.xml +++ b/api/navigation-core/genivi-navigationcore-guidance.xml @@ -1,14 +1,8 @@  - - 3.0.0-alpha (23-10-2013) + 3.1.0-alpha (03-03-2014) Guidance = This interface offers functions that implement the route-guidance functionality of a navigation system @@ -243,21 +237,37 @@ Note: the number corresponds to the number of elements in the array - + - array[struct(roadNumberAfterManeuver,roadNameAfterManeuver,roadPropertyAfterManeuver,drivingSide,offsetOfNextManeuver,array[struct(offsetOfManeuver,travelTime,direction,struct(maneuver,maneuverLength),struct(maneuverDirection,exitNumber))])] + maneuversList = array[struct(roadNumberAfterManeuver,roadNameAfterManeuver,roadPropertyAfterManeuver,drivingSide,offsetOfNextManeuver,maneuverDetails)] roadNumberAfterManeuver = the number of the road after the maneuver (if a road has multiple road numbers, they will be separated by slashes ('/') and combined into one string) roadNameAfterManeuver = the name of the road after the maneuver roadPropertyAfterManeuver = enum(TOLL_ROADS, ... ,DEFAULT) drivingSide = enum(LEFT,RIGHT) offsetOfNextManeuver = the offset of the next maneuver in meters from the beginning of the route (next maneuver is the second maneuver on the route ahead) + maneuverDetails = array[struct(offsetOfManeuver,travelTime,direction,maneuver,maneuverData)] offsetOfManeuver = the offset of the current maneuver in meters from the beginning of the route (current maneuver is the first maneuver on the route ahead) travelTime = travel time to the basic maneuver in seconds direction = direction of the maneuver in degree relatively to the North. Range [0:360] - maneuver = enum(INVALID,STRAIGHT_ON,TURN,CROSSROAD,ROUNDABOUT,HIGHWAY_ENTER,HIGHWAY_EXIT,BIFURCATION,HIGHWAY_CHANGE_LANE,DESTINATION,WAYPOINT) - maneuverLength = when maneuver=ROUNDABOUT the length of the route segment between the entry to and the exit from the roundabout; 0 otherwise. - maneuverDirection = enum(INVALID,STRAIGHT_ON,LEFT,SLIGHT_LEFT,HARD_LEFT,RIGHT,SLIGHT_RIGHT,HARD_RIGHT,UTURN_RIGHT, UTURN_LEFT) - exitNumber = when maneuver=ROUNDABOUT or maneuver=HIGHWAY_EXIT the exit number; null otherwise. + maneuver = enum(INVALID,STRAIGHT_ON,TURN,CROSSROAD,ROUNDABOUT,HIGHWAY_ENTER,HIGHWAY_EXIT,BIFURCATION,FOLLOW_SPECIFIC_LANE,DESTINATION,WAYPOINT,ROAD_FORM_CHANGE) + maneuverData = array[struct(key, value)] + key = enum(LENGTH,DIRECTION,EXIT_NUMBER,ROAD_FORM,LANE_INFO,LATITUDE,LONGITUDE,ALTITUDE) + key = LENGTH, value of type 'q', when maneuver=ROUNDABOUT, expresses the length of the route segment between the entry to and the exit from the roundabout + key = DIRECTION, value of type 'q', enum(INVALID,STRAIGHT_ON,LEFT,SLIGHT_LEFT,HARD_LEFT,RIGHT,SLIGHT_RIGHT,HARD_RIGHT,UTURN_RIGHT,UTURN_LEFT) + key = EXIT_NUMBER, when maneuver=ROUNDABOUT, value of type 'q' that expresses the roundabout exit number + when maneuver=HIGHWAY_EXIT, value of type 's' that expresses the highway exit number + key = ROAD_FORM, value of type 'q', enum(INVALID,ROAD_REGULAR,ROAD_HIGHWAY_MOTORWAY,ROAD_FERRY) + key = LANE_INFO, value of type 'a(uuuq)', array[struct(laneIndex,laneDirections,directionToFollow,divider)] + laneIndex = number of the individual lane. Counting starts from zero, beginning at the left-most lane in the direction of travel (independent of the driving side) + laneDirections = bitfield where each bit corresponds to a certain direction. A 1-bit indicates that the corresponding part of the lane arrow is drawn in the lane information on the street (see the lane info bitmasks) + directionToFollow = bitfield where each bit corresponds to a certain direction. A 1-bit indicates that the corresponding part of the lane arrow matches the direction of the corresponding maneuver (see the lane info bitmasks). At most one bit of this bitmask will be set. + The bitmasks are: LANE_INFO_BITMASK_STRAIGHT,LANE_INFO_BITMASK_SLIGHTRIGHT,LANE_INFO_BITMASK_RIGHT,LANE_INFO_BITMASK_SHARPRIGHT,LANE_INFO_BITMASK_RIGHTUTURN,LANE_INFO_BITMASK_SLIGHTLEFT,LANE_INFO_BITMASK_LEFT,LANE_INFO_BITMASK_SHARPLEFT,LANE_INFO_BITMASK_LEFTUTURN + divider = indicates the type of divider between the given lane and the next one to the right, in the direction of travel + enum(DIVIDER_UNDEFINED,DIVIDER_INTERRUPTEDLONG,DIVIDER_INTERRUPTEDSHORT,DIVIDER_SOLIDSINGLE,DIVIDER_SOLIDDOUBLE,DIVIDER_SOLIDINTERRUPTED,DIVIDER_INTERRUPTEDSOLID) + Note: To describe the divider on the left side of the left-most lane, use the following entry in LANE_INFO: (laneIndex=0xffffffff,laneDirections=0x00000000,directionToFollow=0x00000000,divider=type) + key = LATITUDE, value = value of type 'd', that expresses the latitude of the starting point in format %3.6f. Range [-90:+90]. Example: 48.053250 + key = LONGITUDE, value = value of type 'd', that expresses the longitude of the starting point in format %3.6f. Range [-180:+180]. Example: 8.324500 + key = ALTITUDE, value = value of type 'i', that expresses the altitude of the starting point in meters diff --git a/api/navigation-core/genivi-navigationcore-locationinput.xml b/api/navigation-core/genivi-navigationcore-locationinput.xml index 6c57400..c4ee51f 100755 --- a/api/navigation-core/genivi-navigationcore-locationinput.xml +++ b/api/navigation-core/genivi-navigationcore-locationinput.xml @@ -1,14 +1,8 @@  - - 3.0.0-alpha (07-06-2013) + 3.0.0 (21-01-2014) LocationInput = This interface offers functions that implement the location-input functionality of a navigation system diff --git a/api/navigation-core/genivi-navigationcore-mapmatchedposition.xml b/api/navigation-core/genivi-navigationcore-mapmatchedposition.xml index e0da874..aa73b37 100755 --- a/api/navigation-core/genivi-navigationcore-mapmatchedposition.xml +++ b/api/navigation-core/genivi-navigationcore-mapmatchedposition.xml @@ -1,14 +1,8 @@  - - 3.0.0-alpha (23-10-2013) + 3.0.0 (21-01-2014) MapMatchedPosition = This interface offers functions to retrieve the map matched position and to simulate positioning diff --git a/api/navigation-core/genivi-navigationcore-routing.xml b/api/navigation-core/genivi-navigationcore-routing.xml index 841fd60..72db5c6 100755 --- a/api/navigation-core/genivi-navigationcore-routing.xml +++ b/api/navigation-core/genivi-navigationcore-routing.xml @@ -1,14 +1,8 @@  - - 3.0.0-alpha (07-06-2013) + 3.0.0 (22-01-2014) Routing = This interface offers functions that implement the routing functionality of a navigation system diff --git a/api/navigation-core/genivi-navigationcore-session.xml b/api/navigation-core/genivi-navigationcore-session.xml index 36a552a..1ebcbb7 100755 --- a/api/navigation-core/genivi-navigationcore-session.xml +++ b/api/navigation-core/genivi-navigationcore-session.xml @@ -1,14 +1,8 @@  - - 3.0.0-alpha (07-06-2013) + 3.0.0 (22-01-2014) Session = This interface offers functions to create and delete sessions diff --git a/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx b/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx index c3f6820..1a92dfe 100644 --- a/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx +++ b/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx @@ -66,8 +66,8 @@ class GuidanceObj void ResumeGuidance(uint32_t sessionHandle); void GetGuidanceStatus(uint16_t& guidanceStatus, uint32_t& routeHandle); void GetDestinationInformation(uint32_t& offset, uint32_t& TravelTime, int32_t& Direction, int16_t& TimeZone); - void GetManeuver(struct item *item, uint32_t& DistanceToManeuver, ::DBus::Struct< uint16_t, uint16_t >& Maneuver, std::string& RoadAfterManeuver, uint16_t& ManeuverDirection); - void GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const uint32_t& maneuverOffset, uint16_t& numberOfManeuvers, std::vector< ::DBus::Struct< std::string, std::string, uint16_t, uint16_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, ::DBus::Struct< uint16_t, uint16_t >, ::DBus::Struct< uint16_t, std::string > > > > >& maneuversList); + void GetManeuver(struct item *item, uint32_t& DistanceToManeuver, uint16_t& Maneuver, std::string& RoadAfterManeuver, ::DBus::Struct< uint16_t, ::DBus::Variant >& ManeuverData); + void GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const uint32_t& maneuverOffset, uint16_t& numberOfManeuvers, std::vector< ::DBus::Struct< std::string, std::string, uint16_t, uint16_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, uint16_t, std::vector< ::DBus::Struct< uint16_t, ::DBus::Variant > > > > > >& maneuversList); void GetGuidanceDetails(bool& voiceGuidance, bool& vehicleOnTheRoad, bool& isDestinationReached, uint16_t& maneuver); GuidanceObj(class Guidance *guidance, uint32_t SessionHandle, uint32_t RouteHandle); ~GuidanceObj(); @@ -134,6 +134,15 @@ get_vehicle(const char *source_prefix) return ret; } +static DBus::Variant +variant_uint16(uint16_t i) +{ + DBus::Variant variant; + DBus::MessageIter iter=variant.writer(); + iter << i; + return variant; +} + class Guidance : public org::genivi::navigationcore::Guidance_adaptor, public DBus::IntrospectableAdaptor, @@ -277,8 +286,8 @@ class Guidance throw DBus::ErrorNotSupported("Not yet supported"); } - void - GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const uint32_t& maneuverOffset, uint16_t& numberOfManeuvers, std::vector< ::DBus::Struct< std::string, std::string, uint16_t, uint16_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, ::DBus::Struct< uint16_t, uint16_t >, ::DBus::Struct< uint16_t, std::string > > > > >& maneuversList) + void + GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const uint32_t& maneuverOffset, uint16_t& numberOfManeuvers, std::vector< ::DBus::Struct< std::string, std::string, uint16_t, uint16_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, uint16_t, std::vector< ::DBus::Struct< uint16_t, ::DBus::Variant > > > > > >& maneuversList) { if (!guidance) { dbg(0,"no guidance active\n"); @@ -371,7 +380,7 @@ GuidanceObj::GetDestinationInformation(uint32_t& Distance, uint32_t& TravelTime, } void -GuidanceObj::GetManeuver(struct item *item, uint32_t& DistanceToManeuver, ::DBus::Struct< uint16_t, uint16_t >& Maneuver, std::string& RoadAfterManeuver, uint16_t& ManeuverDirection) +GuidanceObj::GetManeuver(struct item *item, uint32_t& DistanceToManeuver, uint16_t& Maneuver, std::string& RoadAfterManeuver, ::DBus::Struct< uint16_t, ::DBus::Variant >& ManeuverData) { struct attr length, street_name; if (item_attr_get(item, attr_length, &length)) { @@ -380,113 +389,114 @@ GuidanceObj::GetManeuver(struct item *item, uint32_t& DistanceToManeuver, ::DBus if (item_attr_get(item, attr_street_name, &street_name)) { RoadAfterManeuver=std::string(street_name.u.str); } + ManeuverData._1 = GENIVI_NAVIGATIONCORE_DIRECTION; switch (item->type) { case type_nav_straight: - Maneuver._1=GENIVI_NAVIGATIONCORE_CROSSROAD; - ManeuverDirection=GENIVI_NAVIGATIONCORE_STRAIGHT_ON; + Maneuver=GENIVI_NAVIGATIONCORE_CROSSROAD; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_STRAIGHT_ON); break; case type_nav_turnaround: - Maneuver._1=GENIVI_NAVIGATIONCORE_CROSSROAD; - ManeuverDirection=GENIVI_NAVIGATIONCORE_UTURN_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_CROSSROAD; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_UTURN_LEFT); break; case type_nav_right_1: - Maneuver._1=GENIVI_NAVIGATIONCORE_CROSSROAD; - ManeuverDirection=GENIVI_NAVIGATIONCORE_SLIGHT_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_CROSSROAD; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_SLIGHT_RIGHT); break; case type_nav_right_2: - Maneuver._1=GENIVI_NAVIGATIONCORE_CROSSROAD; - ManeuverDirection=GENIVI_NAVIGATIONCORE_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_CROSSROAD; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_RIGHT); break; case type_nav_right_3: - Maneuver._1=GENIVI_NAVIGATIONCORE_CROSSROAD; - ManeuverDirection=GENIVI_NAVIGATIONCORE_HARD_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_CROSSROAD; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_HARD_RIGHT); break; case type_nav_left_1: - Maneuver._1=GENIVI_NAVIGATIONCORE_CROSSROAD; - ManeuverDirection=GENIVI_NAVIGATIONCORE_SLIGHT_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_CROSSROAD; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_SLIGHT_LEFT); break; case type_nav_left_2: - Maneuver._1=GENIVI_NAVIGATIONCORE_CROSSROAD; - ManeuverDirection=GENIVI_NAVIGATIONCORE_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_CROSSROAD; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_LEFT); break; case type_nav_left_3: - Maneuver._1=GENIVI_NAVIGATIONCORE_CROSSROAD; - ManeuverDirection=GENIVI_NAVIGATIONCORE_HARD_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_CROSSROAD; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_HARD_LEFT); break; // FIXME: Are ManeuverDirection values right here? case type_nav_roundabout_r1: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_HARD_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_HARD_RIGHT); break; case type_nav_roundabout_r2: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_RIGHT); break; case type_nav_roundabout_r3: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_SLIGHT_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_SLIGHT_RIGHT); break; case type_nav_roundabout_r4: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_STRAIGHT_ON; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_STRAIGHT_ON); break; case type_nav_roundabout_r5: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_SLIGHT_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_SLIGHT_LEFT); break; case type_nav_roundabout_r6: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_LEFT); break; case type_nav_roundabout_r7: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_HARD_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_HARD_LEFT); break; case type_nav_roundabout_r8: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_UTURN_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_UTURN_LEFT); break; // FIXME: Distinguish between clockwise and counterclockwise roundabout? case type_nav_roundabout_l1: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_HARD_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_HARD_LEFT); break; case type_nav_roundabout_l2: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_LEFT); break; case type_nav_roundabout_l3: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_SLIGHT_LEFT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_SLIGHT_LEFT); break; case type_nav_roundabout_l4: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_STRAIGHT_ON; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_STRAIGHT_ON); break; case type_nav_roundabout_l5: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_SLIGHT_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_SLIGHT_RIGHT); break; case type_nav_roundabout_l6: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_RIGHT); break; case type_nav_roundabout_l7: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_HARD_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_HARD_RIGHT); break; case type_nav_roundabout_l8: - Maneuver._1=GENIVI_NAVIGATIONCORE_ROUNDABOUT; - ManeuverDirection=GENIVI_NAVIGATIONCORE_UTURN_RIGHT; + Maneuver=GENIVI_NAVIGATIONCORE_ROUNDABOUT; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_UTURN_RIGHT); break; case type_nav_destination: - Maneuver._1=GENIVI_NAVIGATIONCORE_DESTINATION; - ManeuverDirection=GENIVI_NAVIGATIONCORE_STRAIGHT_ON; + Maneuver=GENIVI_NAVIGATIONCORE_DESTINATION; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_STRAIGHT_ON); break; default: dbg(0,"Unable to convert type %s\n",item_to_name(item->type)); - Maneuver._1=GENIVI_NAVIGATIONCORE_INVALID; - ManeuverDirection=GENIVI_NAVIGATIONCORE_INVALID; + Maneuver=GENIVI_NAVIGATIONCORE_INVALID; + ManeuverData._2=variant_uint16(GENIVI_NAVIGATIONCORE_INVALID); } } @@ -497,7 +507,7 @@ GuidanceObj::GetGuidanceDetails(bool& voiceGuidance, bool& vehicleOnTheRoad, boo } void -GuidanceObj::GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const uint32_t& maneuverOffset, uint16_t& numberOfManeuvers, std::vector< ::DBus::Struct< std::string, std::string, uint16_t, uint16_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, ::DBus::Struct< uint16_t, uint16_t >, ::DBus::Struct< uint16_t, std::string > > > > >& maneuversList) +GuidanceObj::GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const uint32_t& maneuverOffset, uint16_t& numberOfManeuvers, std::vector< ::DBus::Struct< std::string, std::string, uint16_t, uint16_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, uint16_t, std::vector< ::DBus::Struct< uint16_t, ::DBus::Variant > > > > > >& maneuversList) { struct map_rect *mr=get_map_rect(); struct item *item; @@ -506,13 +516,15 @@ GuidanceObj::GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const maneuverIndex = 0; while (item=get_item(mr)) { //scan the list of maneuvers of the route if (maneuverIndex >= maneuverOffset && maneuverIndex < maneuverOffset+requestedNumberOfManeuvers) { - ::DBus::Struct< std::string, std::string, uint16_t, uint16_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, ::DBus::Struct< uint16_t, uint16_t >, ::DBus::Struct< uint16_t, std::string > > > >maneuver; - ::DBus::Struct< uint32_t, uint32_t, int32_t, ::DBus::Struct< uint16_t, uint16_t >, ::DBus::Struct< uint16_t, std::string > > sub_maneuver; + ::DBus::Struct< std::string, std::string, uint16_t, uint16_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, uint16_t, std::vector< ::DBus::Struct< uint16_t, ::DBus::Variant > > > > >maneuver; + ::DBus::Struct< uint32_t, uint32_t, int32_t, uint16_t, std::vector< ::DBus::Struct< uint16_t, ::DBus::Variant > > > sub_maneuver; + ::DBus::Struct< uint16_t, ::DBus::Variant > maneuver_data; maneuver._1 = ""; //roadNumberAfterManeuver maneuver._3 = GENIVI_NAVIGATIONCORE_DEFAULT; //roadPropertyAfterManeuver maneuver._4 = GENIVI_NAVIGATIONCORE_RIGHT; //drivingSide maneuver._5 = 0; //offsetOfNextManeuver - GetManeuver(item, sub_maneuver._1, sub_maneuver._4, maneuver._2, sub_maneuver._5._1); + GetManeuver(item, sub_maneuver._1, sub_maneuver._4, maneuver._2, maneuver_data); + sub_maneuver._5.push_back(maneuver_data); maneuver._6.push_back(sub_maneuver); if (maneuversList.size()) maneuversList.back()._5 = sub_maneuver._1; //offsetOfNextManeuver of the last record is the offsetOfManeuver of this one -- cgit v1.2.1