diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2016-11-14 20:07:16 +0100 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2016-11-14 20:07:16 +0100 |
commit | e599b957799ba65a1512711c0e2617f8fd3c0d2b (patch) | |
tree | a8987b868387063823d8d848933508c48139cf02 | |
parent | 8f226312ea99856ce35cf2d8a1ba49ada995f507 (diff) | |
download | poi-service-e599b957799ba65a1512711c0e2617f8fd3c0d2b.tar.gz |
GT-3227: Update of guidance, mapmatchedposition and routing
6 files changed, 37 insertions, 118 deletions
diff --git a/api/franca/navigation/navigationcore/Guidance.fidl b/api/franca/navigation/navigationcore/Guidance.fidl index 79dc029..e678e7a 100644 --- a/api/franca/navigation/navigationcore/Guidance.fidl +++ b/api/franca/navigation/navigationcore/Guidance.fidl @@ -90,8 +90,8 @@ interface Guidance { }
enumeration RoadProperty extends BasicEnum {
- UNDEFINED = 256
- TOLL_ROADS = 257
+ DEFAULT = 65534
+ TOLL_ROADS = 369
}
enumeration RouteChangedCause extends BasicEnum {
TRAFFIC = 528
diff --git a/api/franca/navigation/navigationcore/MapMatchedPosition.fidl b/api/franca/navigation/navigationcore/MapMatchedPosition.fidl index 82f52f9..c7238e5 100644 --- a/api/franca/navigation/navigationcore/MapMatchedPosition.fidl +++ b/api/franca/navigation/navigationcore/MapMatchedPosition.fidl @@ -44,7 +44,9 @@ interface MapMatchedPosition { FULL_ADDRESS = 178
COUNTRYCODE = 179
HOUSENAME = 180
- POSTAL_CODE = 181
+ POSTAL_CODE = 181
+ ROAD_NUMBER = 334
+ MATCH_TYPE = 240
}
enumeration PositionStatus extends GeoLocalizedEnum { //Base 0x00e0
@@ -167,21 +169,6 @@ interface MapMatchedPosition { }
}
- <**
- @description : AddSimulationStatusListener = Add this node as a listener to Simulation Status changes.
- **>
- method addSimulationStatusListener {
- }
-
- <**
- @description : RemoveSimulationStatusListener = Remove this node as a listener to Simulation Status changes.
- **>
- method removeSimulationStatusListener {
- }
-
- <**
- @description : setSimulationSpeed = This method sets the speed factor for the simulation mode
- **>
method setSimulationSpeed {
in {
@@ -211,18 +198,6 @@ interface MapMatchedPosition { }
<**
- @description : AddSimulationSpeedListener = Add this node as a listener to simulation speed factor changes.
- **>
- method addSimulationSpeedListener {
- }
-
- <**
- @description : RemoveSimulationSpeedListener = Remove this node as a listener to simulation speed factor changes.
- **>
- method removeSimulationSpeedListener {
- }
-
- <**
@description : startSimulation = This method starts, or resumes, a Follow Active Route simulation
**>
method startSimulation {
@@ -323,7 +298,7 @@ interface MapMatchedPosition { <**
@description : simulationStatusChanged = This signal is emitted when the Simulation Status has changed
**>
- broadcast simulationStatusChanged {
+ broadcast simulationStatusChanged selective {
out {
<**
@@ -336,7 +311,7 @@ interface MapMatchedPosition { <**
@description : simulationSpeedChanged = This signal is emitted when the simulation speed factor has changed
**>
- broadcast simulationSpeedChanged {
+ broadcast simulationSpeedChanged selective {
out {
<**
diff --git a/api/franca/navigation/navigationcore/Routing.fidl b/api/franca/navigation/navigationcore/Routing.fidl index 0001dc6..2c9d773 100644 --- a/api/franca/navigation/navigationcore/Routing.fidl +++ b/api/franca/navigation/navigationcore/Routing.fidl @@ -85,7 +85,7 @@ interface Routing { PreferenceMode to RoutePreferenceSource
}
- struct RoutePreference {
+ struct RoadPreference {
PreferenceMode mode
RoutePreferenceSource source
}
@@ -330,7 +330,7 @@ interface Routing { **>
String countryCode
- RoutePreference[] roadPreferenceList
+ RoadPreference[] roadPreferenceList
ConditionPreference[] conditionPreferenceList
}
@@ -359,7 +359,7 @@ interface Routing { String countryCode
}
out {
- RoutePreference[] roadPreferenceList
+ RoadPreference[] roadPreferenceList
ConditionPreference[] conditionPreferenceList
}
}
@@ -369,7 +369,7 @@ interface Routing { **>
method getSupportedRoutePreferences {
out {
- RoutePreference[] routePreferencesList
+ RoadPreference[] routePreferencesList
ConditionPreference[] conditionPreferenceList
}
}
diff --git a/api/navigation-core/genivi-navigationcore-mapmatchedposition.xml b/api/navigation-core/genivi-navigationcore-mapmatchedposition.xml index 2d9a590..0470dd9 100644 --- a/api/navigation-core/genivi-navigationcore-mapmatchedposition.xml +++ b/api/navigation-core/genivi-navigationcore-mapmatchedposition.xml @@ -66,17 +66,6 @@ </doc> </arg> </method> - <method name="AddSimulationStatusListener"> - <doc> - <line> AddSimulationStatusListener = Add this node as a listener to Simulation Status changes.</line> - <line>Upon changes a SimulationStatusChanged signal will be received. NavigationCore will only send out a SimulationStatusChanged signal if there is at least one node listening to these changes.</line> - </doc> - </method> - <method name="RemoveSimulationStatusListener"> - <doc> - <line> RemoveSimulationStatusListener = Remove this node as a listener to Simulation Status changes.</line> - </doc> - </method> <signal name="SimulationStatusChanged"> <doc> <line>SimulationStatusChanged = This signal is emitted when the Simulation Status has changed</line> @@ -118,18 +107,6 @@ </doc> </arg> </method> - <method name="AddSimulationSpeedListener"> - <doc> - <line> AddSimulationSpeedListener = Add this node as a listener to simulation speed factor changes.</line> - <line>Upon changes a SimulationSpeedChanged signal will be received.</line> - <line>NavigationCore will only send out a SimulationSpeedChanged signal if there is at least one node listening to these changes</line> - </doc> - </method> - <method name="RemoveSimulationSpeedListener"> - <doc> - <line> RemoveSimulationSpeedListener = Remove this node as a listener to simulation speed factor changes.</line> - </doc> - </method> <signal name="SimulationSpeedChanged"> <doc> <line>SimulationSpeedChanged = This signal is emitted when the simulation speed factor has changed</line> diff --git a/src/navigation/navigation-core/mapmatchedposition-server-plugin/genivi_navigationcore_mapmatchedposition.cxx b/src/navigation/navigation-core/mapmatchedposition-server-plugin/genivi_navigationcore_mapmatchedposition.cxx index 1be2bc2..9288d68 100644 --- a/src/navigation/navigation-core/mapmatchedposition-server-plugin/genivi_navigationcore_mapmatchedposition.cxx +++ b/src/navigation/navigation-core/mapmatchedposition-server-plugin/genivi_navigationcore_mapmatchedposition.cxx @@ -131,7 +131,7 @@ class MapMatchedPositionServerStub : public MapMatchedPositionStubDefault newSimulationMode = _activate ? MapMatchedPosition::SimulationStatus::SIMULATION_STATUS_FIXED_POSITION : MapMatchedPosition::SimulationStatus::SIMULATION_STATUS_NO_SIMULATION; if (newSimulationMode != m_simulationMode) { m_simulationMode=newSimulationMode; - fireSimulationStatusChangedEvent(m_simulationMode); + fireSimulationStatusChangedSelective(m_simulationMode); } demo_update(false); struct navit *navit=get_navit(); @@ -151,29 +151,13 @@ class MapMatchedPositionServerStub : public MapMatchedPositionStubDefault } /** - * description: AddSimulationStatusListener = Add this node as a listener to Simulation Status - * changes. - */ - void addSimulationStatusListener(const std::shared_ptr<CommonAPI::ClientId> _client, addSimulationStatusListenerReply_t _reply){ - throw DBus::ErrorNotSupported("Not yet supported"); - } - - /** - * description: RemoveSimulationStatusListener = Remove this node as a listener to Simulation - * Status changes. - */ - void removeSimulationStatusListener(const std::shared_ptr<CommonAPI::ClientId> _client, removeSimulationStatusListenerReply_t _reply){ - throw DBus::ErrorNotSupported("Not yet supported"); - } - - /** * description: setSimulationSpeed = This method sets the speed factor for the simulation mode */ void setSimulationSpeed(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, uint8_t _speedFactor, setSimulationSpeedReply_t _reply){ int speed=_speedFactor*40/4; if (vehicle_speed.u.num != speed) { vehicle_speed.u.num=speed; - fireSimulationSpeedChangedEvent(_speedFactor); + fireSimulationSpeedChangedSelective(_speedFactor); if (m_simulationMode == MapMatchedPosition::SimulationStatus::SIMULATION_STATUS_RUNNING) { demo_update(true); } @@ -189,29 +173,13 @@ class MapMatchedPositionServerStub : public MapMatchedPositionStubDefault } /** - * description: AddSimulationSpeedListener = Add this node as a listener to simulation speed - * factor changes. - */ - void addSimulationSpeedListener(const std::shared_ptr<CommonAPI::ClientId> _client, addSimulationSpeedListenerReply_t _reply){ - throw DBus::ErrorNotSupported("Not yet supported"); - } - - /** - * description: RemoveSimulationSpeedListener = Remove this node as a listener to simulation - * speed factor changes. - */ - void removeSimulationSpeedListener(const std::shared_ptr<CommonAPI::ClientId> _client, removeSimulationSpeedListenerReply_t _reply){ - throw DBus::ErrorNotSupported("Not yet supported"); - } - - /** * description: startSimulation = This method starts, or resumes, a Follow Active Route * simulation */ void startSimulation(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, startSimulationReply_t _reply){ if (m_simulationMode == MapMatchedPosition::SimulationStatus::SIMULATION_STATUS_PAUSED || m_simulationMode == MapMatchedPosition::SimulationStatus::SIMULATION_STATUS_FIXED_POSITION ) { m_simulationMode=MapMatchedPosition::SimulationStatus::SIMULATION_STATUS_RUNNING; - fireSimulationStatusChangedEvent(m_simulationMode); + fireSimulationStatusChangedSelective(m_simulationMode); demo_update(true); } _reply(); @@ -223,7 +191,7 @@ class MapMatchedPositionServerStub : public MapMatchedPositionStubDefault void pauseSimulation(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, pauseSimulationReply_t _reply){ if (m_simulationMode == MapMatchedPosition::SimulationStatus::SIMULATION_STATUS_RUNNING) { m_simulationMode=MapMatchedPosition::SimulationStatus::SIMULATION_STATUS_PAUSED; - fireSimulationStatusChangedEvent(m_simulationMode); + fireSimulationStatusChangedSelective(m_simulationMode); demo_update(false); } _reply(); 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 ae10e09..3d6d0d4 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 @@ -87,8 +87,8 @@ public: void GetRouteBoundingBox(NavigationTypes::Rectangle &boundingBox); void CancelRouteCalculation(uint32_t sessionHandle); bool RoutePreference(Routing::PreferenceMode preferenceMode,Routing::RoutePreferenceSource preferenceSource); - void SetRoutePreferences(uint32_t sessionHandle, const std::string& country, const std::vector< Routing::RoutePreference >& routePreferencesList); - void GetRoutePreferences(const std::string& country, std::vector< Routing::RoutePreference >& roadPreferenceList); + void SetRoutePreferences(uint32_t sessionHandle, const std::string& country, const std::vector< Routing::RoadPreference >& routePreferencesList); + void GetRoutePreferences(const std::string& country, std::vector< Routing::RoadPreference >& roadPreferenceList); uint32_t m_handle; RoutingServerStub *mp_routing; @@ -99,7 +99,7 @@ private: struct search_list *m_sl; uint32_t m_session; Routing::CostModel m_costmodel; - std::vector< Routing::RoutePreference > m_route_preferences_list[2]; + std::vector< Routing::RoadPreference > m_route_preferences_list[2]; std::vector< Routing::WayPoint > m_waypoints; bool m_startfromcurrentposition; int m_vehicleprofile_idx; @@ -224,7 +224,7 @@ class RoutingServerStub : public RoutingStubDefault /** * description: This method sets a list of route preferences */ - void setRoutePreferences(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _routeHandle, std::string _countryCode, std::vector<Routing::RoutePreference> _roadPreferenceList, std::vector<Routing::ConditionPreference> _conditionPreferenceList, setRoutePreferencesReply_t _reply){ + void setRoutePreferences(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _sessionHandle, ::v4::org::genivi::navigation::NavigationTypes::Handle _routeHandle, std::string _countryCode, std::vector<Routing::RoadPreference> _roadPreferenceList, std::vector<Routing::ConditionPreference> _conditionPreferenceList, setRoutePreferencesReply_t _reply){ Routing::setRoutePreferencesError _error = Routing::setRoutePreferencesError::OK; RoutingObj *obj=mp_handles[_routeHandle]; if (!obj) @@ -237,8 +237,8 @@ class RoutingServerStub : public RoutingStubDefault * description: This method retrieves a list of selected route preferences */ void getRoutePreferences(const std::shared_ptr<CommonAPI::ClientId> _client, ::v4::org::genivi::navigation::NavigationTypes::Handle _routeHandle, std::string _countryCode, getRoutePreferencesReply_t _reply){ - Routing::RoutePreference routePreference; - std::vector<Routing::RoutePreference> _roadPreferenceList; + Routing::RoadPreference roadPreference; + std::vector<Routing::RoadPreference> _roadPreferenceList; Routing::ConditionPreference conditionPreference; std::vector<Routing::ConditionPreference> _conditionPreferenceList; @@ -248,9 +248,9 @@ class RoutingServerStub : public RoutingStubDefault obj->GetRoutePreferences(_countryCode, _roadPreferenceList); if (_roadPreferenceList.size() == 0) { //add a default value (bug in qml to be fixed) - routePreference.setMode(Routing::PreferenceMode::INVALID); - routePreference.setSource(Routing::RoutePreferenceSource::INVALID); - _roadPreferenceList.push_back(routePreference); + roadPreference.setMode(Routing::PreferenceMode::INVALID); + roadPreference.setSource(Routing::RoutePreferenceSource::INVALID); + _roadPreferenceList.push_back(roadPreference); } conditionPreference.setMode(Routing::PreferenceMode::USE); conditionPreference.setSource(Routing::ConditionPreferenceSource::TRAFFIC_REALTIME); @@ -262,19 +262,19 @@ class RoutingServerStub : public RoutingStubDefault * description: This method retrieves a list of supported route preferences */ void getSupportedRoutePreferences(const std::shared_ptr<CommonAPI::ClientId> _client, getSupportedRoutePreferencesReply_t _reply){ - Routing::RoutePreference routePreference; - std::vector<Routing::RoutePreference> _routePreferencesList; + Routing::RoadPreference roadPreference; + std::vector<Routing::RoadPreference> _routePreferencesList; Routing::ConditionPreference conditionPreference; std::vector<Routing::ConditionPreference> _conditionPreferenceList; - routePreference.setMode(Routing::PreferenceMode::AVOID); - routePreference.setSource(Routing::RoutePreferenceSource::HIGHWAYS_MOTORWAYS); - _routePreferencesList.push_back(routePreference); - routePreference.setMode(Routing::PreferenceMode::AVOID); - routePreference.setSource(Routing::RoutePreferenceSource::TOLL_ROADS); - _routePreferencesList.push_back(routePreference); - routePreference.setMode(Routing::PreferenceMode::AVOID); - routePreference.setSource(Routing::RoutePreferenceSource::FERRY); - _routePreferencesList.push_back(routePreference); + roadPreference.setMode(Routing::PreferenceMode::AVOID); + roadPreference.setSource(Routing::RoutePreferenceSource::HIGHWAYS_MOTORWAYS); + _routePreferencesList.push_back(roadPreference); + roadPreference.setMode(Routing::PreferenceMode::AVOID); + roadPreference.setSource(Routing::RoutePreferenceSource::TOLL_ROADS); + _routePreferencesList.push_back(roadPreference); + roadPreference.setMode(Routing::PreferenceMode::AVOID); + roadPreference.setSource(Routing::RoutePreferenceSource::FERRY); + _routePreferencesList.push_back(roadPreference); conditionPreference.setMode(Routing::PreferenceMode::USE); conditionPreference.setSource(Routing::ConditionPreferenceSource::TRAFFIC_REALTIME); _conditionPreferenceList.push_back(conditionPreference); @@ -902,9 +902,8 @@ RoutingObj::RoutePreference(Routing::PreferenceMode preferenceMode,Routing::Rout } void -RoutingObj::SetRoutePreferences(uint32_t sessionHandle, const std::string& country, const std::vector< Routing::RoutePreference >& routePreferencesList) +RoutingObj::SetRoutePreferences(uint32_t sessionHandle, const std::string& country, const std::vector< Routing::RoadPreference >& routePreferencesList) { - int idx; struct attr flags_forward_mask,flags_reverse_mask,roadprofile,item_types,route_weight; m_route_preferences_list[m_vehicleprofile_idx]=routePreferencesList; struct vehicleprofile_settings *s=&m_vehicleprofile_settings[m_vehicleprofile_idx]; @@ -963,7 +962,7 @@ RoutingObj::SetRoutePreferences(uint32_t sessionHandle, const std::string& count } void -RoutingObj::GetRoutePreferences(const std::string& country, std::vector< Routing::RoutePreference >& roadPreferenceList) +RoutingObj::GetRoutePreferences(const std::string& country, std::vector< Routing::RoadPreference >& roadPreferenceList) { roadPreferenceList=m_route_preferences_list[m_vehicleprofile_idx]; } |