diff options
author | Artem Nosach (GitHub) <ANosach@luxoft.com> | 2016-10-11 17:31:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-11 17:31:25 +0300 |
commit | bce24f3ee2211c27cd9c8dae4c6a7f76773a1aa2 (patch) | |
tree | 6133154b603b9ceb77b4c7740069af8f39f0fdc7 /src/components/application_manager/include/application_manager/commands | |
parent | c665222e3729b6d213df9ffe146b6c4a62ff25d8 (diff) | |
parent | 10772ba87420736ca6db279d8dcf7d04b591f8bf (diff) | |
download | sdl_core-bce24f3ee2211c27cd9c8dae4c6a7f76773a1aa2.tar.gz |
Merge pull request #768 from dtrunov/feature/Navigation_interface_SDL_behavior_in_case_HMI_does_not_respond_to_IsReady_request_or_respond_with_available_false
Navigation interface sdl behavior in case hmi does not respond to is ready request or respond with available false
Diffstat (limited to 'src/components/application_manager/include/application_manager/commands')
8 files changed, 36 insertions, 10 deletions
diff --git a/src/components/application_manager/include/application_manager/commands/command_request_impl.h b/src/components/application_manager/include/application_manager/commands/command_request_impl.h index 30859765ba..47ec32cc74 100644 --- a/src/components/application_manager/include/application_manager/commands/command_request_impl.h +++ b/src/components/application_manager/include/application_manager/commands/command_request_impl.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2014, Ford Motor Company + Copyright (c) 2016, Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without @@ -85,6 +85,23 @@ namespace NsSmart = NsSmartDeviceLink::NsSmartObjects; std::string MergeInfos(const std::string& first, const std::string& second); /** + * @brief MergeInfos merge 2 infos into one string with info + * @param first_info -contains result_code from HMI response and + * interface that returns response + * @param first_str - info string that should be first in result info + * @param second_info -contains result_code from HMI response and + * interface that returns response + * @param second_str - info string that should be second in result info + * @return if first_info is not available and second_str not empty return second + * if second_info is not available and first_str not empty return first + * other cases return result MergeInfos for 2 params + */ +std::string MergeInfos(const ResponseInfo& first_info, + const std::string& first_str, + const ResponseInfo& second_info, + const std::string& second_str); + +/** * @brief MergeInfos merge 3 infos in one string * @param first - info string that should be first in result info * @param second - info string that should be second in result info @@ -223,6 +240,7 @@ class CommandRequestImpl : public CommandImpl, */ bool PrepareResultForMobileResponse(ResponseInfo& out_first, ResponseInfo& out_second) const; + /** * @brief If message from HMI contains returns this info * or process result code from HMI and checks state of interface diff --git a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h index 9f1adaeee0..77ce48a2cc 100644 --- a/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h +++ b/src/components/application_manager/include/application_manager/commands/hmi/navi_is_ready_request.h @@ -42,7 +42,8 @@ namespace commands { /** * @brief NaviIsReadyRequest command class **/ -class NaviIsReadyRequest : public RequestToHMI { +class NaviIsReadyRequest : public RequestToHMI, + public event_engine::EventObserver { public: /** * @brief NaviIsReadyRequest class constructor @@ -60,7 +61,12 @@ class NaviIsReadyRequest : public RequestToHMI { /** * @brief Execute command **/ - virtual void Run(); + void Run() OVERRIDE; + + /** + * @brief On event callback + **/ + void on_event(const event_engine::Event& event) OVERRIDE; private: DISALLOW_COPY_AND_ASSIGN(NaviIsReadyRequest); diff --git a/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h b/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h index 9ebb5761c1..b30044fd26 100644 --- a/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h +++ b/src/components/application_manager/include/application_manager/commands/hmi/request_to_hmi.h @@ -48,6 +48,7 @@ namespace commands { */ bool CheckAvailabilityHMIInterfaces(ApplicationManager& application_manager, HmiInterfaces::InterfaceID interface); + /** * @brief Change interface state * @param application_manager contains ApplicationManager instance diff --git a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h index b0acec73b2..340a00d294 100644 --- a/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h +++ b/src/components/application_manager/include/application_manager/commands/hmi/tts_is_ready_request.h @@ -56,7 +56,7 @@ class TTSIsReadyRequest : public RequestToHMI, /** * @brief TTSIsReadyRequest class destructor **/ - ~TTSIsReadyRequest() OVERRIDE; + virtual ~TTSIsReadyRequest(); /** * @brief Execute command diff --git a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h index 33da7a67b7..49942d81a7 100644 --- a/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h +++ b/src/components/application_manager/include/application_manager/commands/hmi/ui_is_ready_request.h @@ -56,7 +56,7 @@ class UIIsReadyRequest : public RequestToHMI, /** * @brief UIIsReadyRequest class destructor **/ - ~UIIsReadyRequest() OVERRIDE; + virtual ~UIIsReadyRequest(); /** * @brief Execute command diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h index a81a8c8b7c..07ab9df605 100644 --- a/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h +++ b/src/components/application_manager/include/application_manager/commands/hmi/vi_is_ready_request.h @@ -56,7 +56,7 @@ class VIIsReadyRequest : public RequestToHMI, /** * @brief VIIsReadyRequest class destructor **/ - ~VIIsReadyRequest() OVERRIDE; + virtual ~VIIsReadyRequest(); /** * @brief Execute command diff --git a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h b/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h index 784a6e4a48..55a2101e1a 100644 --- a/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h +++ b/src/components/application_manager/include/application_manager/commands/hmi/vr_is_ready_request.h @@ -62,17 +62,17 @@ class VRIsReadyRequest : public RequestToHMI, /** * @brief Execute command **/ - virtual void Run(); + void Run() OVERRIDE; /** * @brief On event callback **/ - virtual void on_event(const event_engine::Event& event); + void on_event(const event_engine::Event& event) OVERRIDE; /** * @brief onTimeOut from requrst Controller */ - virtual void onTimeOut(); + void onTimeOut() OVERRIDE; /** * @brief Send request to HMI for fetching of cappabilities diff --git a/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h b/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h index 03d767563e..92211b54a2 100644 --- a/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h +++ b/src/components/application_manager/include/application_manager/commands/mobile/alert_maneuver_request.h @@ -77,11 +77,12 @@ class AlertManeuverRequest : public CommandRequestImpl { /** * @brief Prepare parameters for sending to mobile application * @param result_code contains result code for sending to mobile application + * @param return_info contains resulting info for sending to mobile + * application * @return result for sending to mobile application. */ bool PrepareResponseParameters(mobile_apis::Result::eType& result_code, std::string& return_info); - /** * @brief Checks alert maneuver params(ttsChunks, ...). * When type is String there is a check on the contents \t\n \\t \\n |