From 312fedf2360633e7d76f9a70a17c5d4961964e34 Mon Sep 17 00:00:00 2001 From: asanoaozora Date: Fri, 5 May 2017 10:34:16 +0200 Subject: GT-3502 GT-3495-bis GT-3502 MapViewerControl::SetMapViewPan should accept one element for panning GT-3495-bis Complete some descriptions --- api/franca/navigation/mapviewer/MapViewerControl.fidl | 4 ++-- api/franca/navigation/navigationcore/Guidance.fidl | 6 +++--- api/franca/navigation/navigationcore/Routing.fidl | 4 ++-- api/map-viewer/genivi-mapviewer-mapviewercontrol.xml | 8 ++++---- .../genivi_mapviewer_mapviewercontrol.cxx | 17 +++++------------ .../genivi_mapviewer_mapviewercontrol.cxx | 15 ++++----------- 6 files changed, 20 insertions(+), 34 deletions(-) diff --git a/api/franca/navigation/mapviewer/MapViewerControl.fidl b/api/franca/navigation/mapviewer/MapViewerControl.fidl index 0e297ed..f1f678e 100755 --- a/api/franca/navigation/mapviewer/MapViewerControl.fidl +++ b/api/franca/navigation/mapviewer/MapViewerControl.fidl @@ -1322,7 +1322,7 @@ interface MapViewerControl { **> PanAction panningAction - Pixel [] pixelCoordinates + Pixel pixelCoordinates } } @@ -1344,7 +1344,7 @@ interface MapViewerControl { } out { - Pixel [] pixelCoordinates + Pixel pixelCoordinates } } diff --git a/api/franca/navigation/navigationcore/Guidance.fidl b/api/franca/navigation/navigationcore/Guidance.fidl index 5fedd18..fa75c12 100644 --- a/api/franca/navigation/navigationcore/Guidance.fidl +++ b/api/franca/navigation/navigationcore/Guidance.fidl @@ -166,8 +166,8 @@ interface Guidance { @description : struct generated for DBus argument GetManeuversList_maneuversListElem6 **> struct ManeuverItem { - UInt32 offsetOfManeuver - UInt32 travelTime + UInt32 offsetOfManeuver //the offset of the maneuver in meters from the beginning of the route + UInt32 travelTime //time to reach the maneuver in second from the current position. Value 0 is returned If the maneuver is already passed ManeuverDirectionType direction ManeuverType maneuver ManeuverData maneuverData @@ -323,7 +323,7 @@ interface Guidance { UInt32 offset <** - @description : travelTime = time to reach the destination in second + @description : travelTime = time to reach the destination in second from the current position **> UInt32 travelTime diff --git a/api/franca/navigation/navigationcore/Routing.fidl b/api/franca/navigation/navigationcore/Routing.fidl index d9ccbe0..98f12e2 100644 --- a/api/franca/navigation/navigationcore/Routing.fidl +++ b/api/franca/navigation/navigationcore/Routing.fidl @@ -119,8 +119,8 @@ interface Routing { } enumeration RouteOverviewType extends Schedule { - TOTAL_TIME = 398 //value of type UInt32, that represents the total time in seconds - TOTAL_DISTANCE = 399 //value of type UInt32, that represents the total distance in m + TOTAL_TIME = 398 //value of type UInt32, represents the total time (in seconds) takes to navigate from the beginning of the route till destination + TOTAL_DISTANCE = 399 //value of type UInt32, that represents the total distance (in m) from the beginning of the route till destination } union RouteOverviewItem { diff --git a/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml b/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml index 738a787..db6eb63 100644 --- a/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml +++ b/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml @@ -1044,9 +1044,9 @@ cover with other windows or user interface elements PAN_END, pan the map to the specified screen coordinate identified by the arguments 'x' and 'y' and end panning; it has no effect before PAN_START - + - pixelCoordinates = array[struct(x,y)] + pixelCoordinates = struct(x,y) x = x-coordinate (x=0 indicates the first left pixel of the map view) y = y-coordinate (y=0 indicates the first top pixel of the map view) @@ -1067,9 +1067,9 @@ cover with other windows or user interface elements valueToReturn = enum(PAN_START,PAN_TO,PAN_END) - + - pixelCoordinates = array[struct(x,y)] + pixelCoordinates = struct(x,y) x = x-coordinate (x=0 indicates the first left pixel of the map view) y = y-coordinate (y=0 indicates the first top pixel of the map view) diff --git a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx index 5929cba..6093567 100644 --- a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx +++ b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx @@ -447,31 +447,24 @@ class MapViewerControl } void - SetMapViewPan(const uint32_t& sessionHandle, const uint32_t& mapViewInstanceHandle, const DBusCommonAPIEnumeration& panningAction, const std::vector< ::DBus::Struct< uint16_t, uint16_t > >& pixelCoordinates) + SetMapViewPan(const uint32_t& sessionHandle, const uint32_t& mapViewInstanceHandle, const DBusCommonAPIEnumeration& panningAction, const ::DBus::Struct< uint16_t, uint16_t >& pixelCoordinates) { - ::DBus::Struct< uint16_t, uint16_t > pixel; MapViewerControlObj *obj=handles[mapViewInstanceHandle]; if (!obj) throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle"); else { - if (pixelCoordinates.size()) - { - pixel = pixelCoordinates.at(0); - obj->SetMapViewPan(sessionHandle, panningAction, pixel); - } + obj->SetMapViewPan(sessionHandle, panningAction, pixelCoordinates); } } - std::vector< ::DBus::Struct< uint16_t, uint16_t > > + ::DBus::Struct< uint16_t, uint16_t > GetMapViewPan(const uint32_t& mapViewInstanceHandle, const int32_t& valueToReturn) { - std::vector< ::DBus::Struct< uint16_t, uint16_t > > pixelCoordinates; - ::DBus::Struct< uint16_t, uint16_t > pixel; + ::DBus::Struct< uint16_t, uint16_t > pixelCoordinates; MapViewerControlObj *obj=handles[mapViewInstanceHandle]; if (!obj) throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle"); - else obj->GetMapViewPan(valueToReturn, pixel); //limited to one pixel coordinate - pixelCoordinates.push_back(pixel); + else obj->GetMapViewPan(valueToReturn, pixelCoordinates); //limited to one pixel coordinate return pixelCoordinates; } diff --git a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx index be56f53..c818db1 100644 --- a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx +++ b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx @@ -802,17 +802,12 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault /** * description: setMapViewPan = This method pans a given map instance */ - void setMapViewPan(const std::shared_ptr _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, MapViewerControl::PanAction _panningAction, std::vector _pixelCoordinates, setMapViewPanReply_t _reply){ - MapViewerControl::Pixel pixel; + void setMapViewPan(const std::shared_ptr _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, MapViewerControl::PanAction _panningAction, MapViewerControl::Pixel _pixelCoordinates, setMapViewPanReply_t _reply){ MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle]; if (!obj) throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle"); else { - if (_pixelCoordinates.size()) - { - pixel = _pixelCoordinates.at(0); - obj->SetMapViewPan(_sessionHandle, _panningAction, pixel); - } + obj->SetMapViewPan(_sessionHandle, _panningAction, _pixelCoordinates); } _reply(); } @@ -821,13 +816,11 @@ class MapViewerControlServerStub : public MapViewerControlStubDefault * description: getMapViewPan */ void getMapViewPan(const std::shared_ptr _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _mapViewInstanceHandle, MapViewerControl::PanAction _valueToReturn, getMapViewPanReply_t _reply){ - MapViewerControl::Pixel pixel; - std::vector _pixelCoordinates; + MapViewerControl::Pixel _pixelCoordinates; MapViewerControlObj *obj=mp_handles[_mapViewInstanceHandle]; if (!obj) throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle"); - else obj->GetMapViewPan(_valueToReturn, pixel); //limited to one pixel coordinate - _pixelCoordinates.push_back(pixel); + else obj->GetMapViewPan(_valueToReturn, _pixelCoordinates); //limited to one pixel coordinate _reply(_pixelCoordinates); } -- cgit v1.2.1