summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/app_service_rpc_plugin
diff options
context:
space:
mode:
authorjacobkeeler <jacob.keeler@livioradio.com>2019-04-01 16:24:58 -0400
committerjacobkeeler <jacob.keeler@livioradio.com>2019-04-01 16:29:54 -0400
commit31041084b3ded5367a97060c081976e9e3251985 (patch)
tree1544ab0fbece36e2b5d897dfc19f07bee1c6b826 /src/components/application_manager/rpc_plugins/app_service_rpc_plugin
parentabdfa1d970c9d965a1f05d0b26fa3b8d350bb265 (diff)
downloadsdl_core-31041084b3ded5367a97060c081976e9e3251985.tar.gz
Add timeout logic for HMI App Service Consumer RPCsfix/no_hmi_response_on_timeout
Diffstat (limited to 'src/components/application_manager/rpc_plugins/app_service_rpc_plugin')
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h5
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_perform_app_service_interaction_request_from_hmi.h5
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc13
4 files changed, 35 insertions, 0 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h
index 847b921502..7b175fc0d4 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_get_app_service_data_request_from_hmi.h
@@ -69,6 +69,11 @@ class ASGetAppServiceDataRequestFromHMI
virtual void Run();
/**
+ * @brief onTimeOut from request controller
+ */
+ virtual void onTimeOut();
+
+ /**
* @brief on_event allows to handle events
*
* @param event event type that current request subscribed on.
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_perform_app_service_interaction_request_from_hmi.h b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_perform_app_service_interaction_request_from_hmi.h
index 775bb9f812..36acf116f4 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_perform_app_service_interaction_request_from_hmi.h
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/include/app_service_rpc_plugin/commands/hmi/as_perform_app_service_interaction_request_from_hmi.h
@@ -83,6 +83,11 @@ class ASPerformAppServiceInteractionRequestFromHMI
*/
void on_event(const app_mngr::event_engine::MobileEvent& event) OVERRIDE;
+ /**
+ * @brief onTimeOut from request controller
+ */
+ virtual void onTimeOut();
+
private:
DISALLOW_COPY_AND_ASSIGN(ASPerformAppServiceInteractionRequestFromHMI);
};
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
index 5cdbbfc012..a339ffb9a6 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_get_app_service_data_request_from_hmi.cc
@@ -110,5 +110,17 @@ void ASGetAppServiceDataRequestFromHMI::on_event(
application_manager::commands::Command::SOURCE_SDL_TO_HMI);
}
+void ASGetAppServiceDataRequestFromHMI::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ smart_objects::SmartObject response_params;
+ response_params[strings::info] =
+ "The provider did not respond to the request";
+ SendErrorResponse(correlation_id(),
+ hmi_apis::FunctionID::AppService_GetAppServiceData,
+ hmi_apis::Common_Result::GENERIC_ERROR,
+ "The provider did not respond to the request",
+ application_manager::commands::Command::SOURCE_SDL_TO_HMI);
+}
+
} // namespace commands
} // namespace app_service_rpc_plugin
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc
index 70a5a10be0..1588845274 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/hmi/as_perform_app_service_interaction_request_from_hmi.cc
@@ -153,5 +153,18 @@ void ASPerformAppServiceInteractionRequestFromHMI::on_event(
application_manager::commands::Command::SOURCE_SDL_TO_HMI);
}
+void ASPerformAppServiceInteractionRequestFromHMI::onTimeOut() {
+ LOG4CXX_AUTO_TRACE(logger_);
+ smart_objects::SmartObject response_params;
+ response_params[strings::info] =
+ "The provider did not respond to the request";
+ SendErrorResponse(
+ correlation_id(),
+ hmi_apis::FunctionID::AppService_PerformAppServiceInteraction,
+ hmi_apis::Common_Result::GENERIC_ERROR,
+ "The provider did not respond to the request",
+ application_manager::commands::Command::SOURCE_SDL_TO_HMI);
+}
+
} // namespace commands
} // namespace app_service_rpc_plugin