summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/appMain/smartDeviceLink.ini10
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h9
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc11
-rw-r--r--src/components/config_profile/include/config_profile/profile.h2
-rw-r--r--src/components/config_profile/src/profile.cc18
-rw-r--r--src/components/include/application_manager/application_manager.h3
-rw-r--r--src/components/include/application_manager/application_manager_settings.h1
-rw-r--r--src/components/include/test/application_manager/mock_application_manager.h2
-rw-r--r--src/components/include/test/application_manager/mock_application_manager_settings.h1
9 files changed, 56 insertions, 1 deletions
diff --git a/src/appMain/smartDeviceLink.ini b/src/appMain/smartDeviceLink.ini
index 90c2d94bf3..ee67e6f018 100644
--- a/src/appMain/smartDeviceLink.ini
+++ b/src/appMain/smartDeviceLink.ini
@@ -359,6 +359,16 @@ EnableAppLaunchIOS = true
;SecondaryTransportForUSB =
;SecondaryTransportForWiFi =
+[AppServices]
+; The ID to pass to app service publishers when sending a PerformAppServiceInteraction request
+;CoresOriginId = "sdl_core"
+
+; Services that exist on the module. Values are of AppServiceType in RPC Spec. These services will be used as default and app services will only become primary service publisher with direct user interaction. These services will also be a fallback if no app service publisher is registered with the system of that type.
+;EmbeddedServices = MEDIA, WEATHER, NAVIGATION, VOICE_ASSISTANT, COMMUNICATION_VOIP, MESSAGING, TTS
+
+; Additional time added to RPC timeout when passing through to App service
+RpcPassThroughTimeout = 10000
+
[ServicesMap]
; A matrix to specify which service is allowed on which transports. The transports are listed
; in preferred order. If a transport is not listed, then the service is not allowed
diff --git a/src/components/application_manager/include/application_manager/application_manager_impl.h b/src/components/application_manager/include/application_manager/application_manager_impl.h
index 07f11eddaa..6161d6bbbf 100644
--- a/src/components/application_manager/include/application_manager/application_manager_impl.h
+++ b/src/components/application_manager/include/application_manager/application_manager_impl.h
@@ -709,6 +709,15 @@ class ApplicationManagerImpl
uint32_t new_timeout_value) OVERRIDE;
/**
+ * @brief TODO
+ *
+ * @param connection_key Connection key of application
+ * @param mobile_correlation_id Correlation ID of the mobile request
+ */
+ void IncreaseForwardedRequestTimeout(uint32_t connection_key,
+ uint32_t mobile_correlation_id) OVERRIDE;
+
+ /**
* @brief AddPolicyObserver allows to subscribe needed component to events
* from policy.
*
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 7fd2bd1995..2c8f5e06b2 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -2397,6 +2397,17 @@ void ApplicationManagerImpl::updateRequestTimeout(
connection_key, mobile_correlation_id, new_timeout_value);
}
+void ApplicationManagerImpl::IncreaseForwardedRequestTimeout(
+ uint32_t connection_key, uint32_t mobile_correlation_id) {
+ LOG4CXX_DEBUG(logger_,
+ "Increasing Request Timeout by "
+ << get_settings().rpc_pass_through_timeout());
+ uint32_t new_timeout_value = get_settings().default_timeout() +
+ get_settings().rpc_pass_through_timeout();
+ request_ctrl_.updateRequestTimeout(
+ connection_key, mobile_correlation_id, new_timeout_value);
+}
+
uint32_t ApplicationManagerImpl::application_id(const int32_t correlation_id) {
// ykazakov: there is no erase for const iterator for QNX
std::map<const int32_t, const uint32_t>::iterator it =
diff --git a/src/components/config_profile/include/config_profile/profile.h b/src/components/config_profile/include/config_profile/profile.h
index 02fff3764b..ba43ec9695 100644
--- a/src/components/config_profile/include/config_profile/profile.h
+++ b/src/components/config_profile/include/config_profile/profile.h
@@ -526,6 +526,7 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
const std::vector<std::string>& audio_service_transports() const OVERRIDE;
const std::vector<std::string>& video_service_transports() const OVERRIDE;
+ uint32_t rpc_pass_through_timeout() const OVERRIDE;
const std::vector<std::string>& embedded_services() const OVERRIDE;
const std::string hmi_origin_id() const OVERRIDE;
/**
@@ -1065,6 +1066,7 @@ class Profile : public protocol_handler::ProtocolHandlerSettings,
int low_voltage_signal_offset_;
int wake_up_signal_offset_;
int ignition_off_signal_offset_;
+ uint32_t rpc_pass_through_timeout_;
std::vector<std::string> embedded_services_;
diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc
index 5a6d3b3808..e5a32f4560 100644
--- a/src/components/config_profile/src/profile.cc
+++ b/src/components/config_profile/src/profile.cc
@@ -239,6 +239,7 @@ const char* kSecondaryTransportForUSBKey = "SecondaryTransportForUSB";
const char* kSecondaryTransportForWiFiKey = "SecondaryTransportForWiFi";
const char* kAudioServiceTransportsKey = "AudioServiceTransports";
const char* kVideoServiceTransportsKey = "VideoServiceTransports";
+const char* kRpcPassThroughTimeoutKey = "RpcPassThroughTimeout";
const char* kDefaultTransportRequiredForResumptionKey =
"DefaultTransportRequiredForResumption";
@@ -394,6 +395,7 @@ const std::string kAllowedSymbols =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_.-";
const bool kDefaultMultipleTransportsEnabled = false;
const char* kDefaultLowBandwidthResumptionLevel = "NONE";
+const uint32_t kDefaultRpcPassThroughTimeout = 10000;
const char* kDefaultHMIOriginId = "HMI_ID";
} // namespace
@@ -510,7 +512,8 @@ Profile::Profile()
, error_description_()
, low_voltage_signal_offset_(kDefaultLowVoltageSignalOffset)
, wake_up_signal_offset_(kDefaultWakeUpSignalOffset)
- , ignition_off_signal_offset_(kDefaultIgnitionOffSignalOffset) {
+ , ignition_off_signal_offset_(kDefaultIgnitionOffSignalOffset)
+ , rpc_pass_through_timeout_(kDefaultRpcPassThroughTimeout) {
// SDL version
ReadStringValue(
&sdl_version_, kDefaultSDLVersion, kMainSection, kSDLVersionKey);
@@ -1082,6 +1085,10 @@ const bool Profile::multiple_transports_enabled() const {
return multiple_transports_enabled_;
}
+uint32_t Profile::rpc_pass_through_timeout() const {
+ return rpc_pass_through_timeout_;
+}
+
const std::vector<std::string>& Profile::secondary_transports_for_bluetooth()
const {
return secondary_transports_for_bluetooth_;
@@ -2247,6 +2254,15 @@ void Profile::UpdateValues() {
kMultipleTransportsEnabledKey,
kMultipleTransportsSection);
+ ReadUIntValue(&rpc_pass_through_timeout_,
+ kDefaultRpcPassThroughTimeout,
+ kAppServicesSection,
+ kRpcPassThroughTimeoutKey);
+
+ LOG_UPDATED_VALUE(rpc_pass_through_timeout_,
+ kRpcPassThroughTimeoutKey,
+ kAppServicesSection);
+
{ // Secondary Transports and ServicesMap
struct KeyPair {
std::vector<std::string>* ini_vector;
diff --git a/src/components/include/application_manager/application_manager.h b/src/components/include/application_manager/application_manager.h
index f1b17a8225..863ec093f0 100644
--- a/src/components/include/application_manager/application_manager.h
+++ b/src/components/include/application_manager/application_manager.h
@@ -560,6 +560,9 @@ class ApplicationManager {
uint32_t mobile_correlation_id,
uint32_t new_timeout_value) = 0;
+ virtual void IncreaseForwardedRequestTimeout(
+ uint32_t connection_key, uint32_t mobile_correlation_id) = 0;
+
virtual StateController& state_controller() = 0;
virtual void SetUnregisterAllApplicationsReason(
diff --git a/src/components/include/application_manager/application_manager_settings.h b/src/components/include/application_manager/application_manager_settings.h
index a48d0ecc63..b206e56125 100644
--- a/src/components/include/application_manager/application_manager_settings.h
+++ b/src/components/include/application_manager/application_manager_settings.h
@@ -85,6 +85,7 @@ class ApplicationManagerSettings : public RequestControlerSettings,
virtual const std::string& audio_stream_file() const = 0;
virtual bool use_full_app_id() const = 0;
+ virtual uint32_t rpc_pass_through_timeout() const = 0;
virtual uint32_t cloud_app_retry_timeout() const = 0;
virtual uint16_t cloud_app_max_retry_attempts() const = 0;
virtual bool use_db_for_resumption() const = 0;
diff --git a/src/components/include/test/application_manager/mock_application_manager.h b/src/components/include/test/application_manager/mock_application_manager.h
index 46b2118249..1b9fe5ed1c 100644
--- a/src/components/include/test/application_manager/mock_application_manager.h
+++ b/src/components/include/test/application_manager/mock_application_manager.h
@@ -218,6 +218,8 @@ class MockApplicationManager : public application_manager::ApplicationManager {
void(uint32_t connection_key,
uint32_t mobile_correlation_id,
uint32_t new_timeout_value));
+ MOCK_METHOD2(IncreaseForwardedRequestTimeout,
+ void(uint32_t connection_key, uint32_t mobile_correlation_id));
MOCK_METHOD0(state_controller, application_manager::StateController&());
MOCK_METHOD1(SetUnregisterAllApplicationsReason,
void(mobile_apis::AppInterfaceUnregisteredReason::eType reason));
diff --git a/src/components/include/test/application_manager/mock_application_manager_settings.h b/src/components/include/test/application_manager/mock_application_manager_settings.h
index b95a219111..a4ec7c0317 100644
--- a/src/components/include/test/application_manager/mock_application_manager_settings.h
+++ b/src/components/include/test/application_manager/mock_application_manager_settings.h
@@ -127,6 +127,7 @@ class MockApplicationManagerSettings
MOCK_CONST_METHOD0(app_time_scale, const uint32_t&());
MOCK_CONST_METHOD0(app_time_scale_max_requests, const uint32_t&());
MOCK_CONST_METHOD0(pending_requests_amount, const uint32_t&());
+ MOCK_CONST_METHOD0(rpc_pass_through_timeout, uint32_t());
// app_launch::AppLaunchSettings
MOCK_CONST_METHOD0(app_launch_wait_time, const uint16_t());