summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2019-06-21 13:22:10 -0400
committerGitHub <noreply@github.com>2019-06-21 13:22:10 -0400
commitd9ac61f77b1fb39619dc5bf0c0841684d93cff58 (patch)
tree95b3ba241489665fa9e2a7aae96bc1ca43b5d165
parentfcee681aa0e852472f7056a4a2eacff7f9413124 (diff)
parent303b05b25c5bcc2509c9065027cc11f663782c94 (diff)
downloadsdl_core-d9ac61f77b1fb39619dc5bf0c0841684d93cff58.tar.gz
Merge pull request #2920 from smartdevicelink/feature/remote_control_radio_and_climate_parameter_update
Feature/Remote Control - Radio and Climate Parameter Update
-rwxr-xr-xsrc/appMain/hmi_capabilities.json3
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h3
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc1
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc30
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc137
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc117
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc1
-rw-r--r--src/components/interfaces/HMI_API.xml28
-rw-r--r--src/components/interfaces/MOBILE_API.xml30
9 files changed, 318 insertions, 32 deletions
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json
index 873c80d32e..481c6d0c6b 100755
--- a/src/appMain/hmi_capabilities.json
+++ b/src/appMain/hmi_capabilities.json
@@ -428,6 +428,7 @@
"acMaxEnableAvailable": true,
"autoModeEnableAvailable": true,
"circulateAirEnableAvailable": true,
+ "climateEnableAvailable": true,
"currentTemperatureAvailable": true,
"defrostZone": [
"FRONT",
@@ -455,7 +456,7 @@
],
"radioControlCapabilities": [
{
- "availableHDsAvailable": true,
+ "availableHdChannelsAvailable": true,
"hdChannelAvailable": true,
"moduleName": "radio",
"radioBandAvailable": true,
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h
index 92ff7e5f01..b9f922a1be 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h
@@ -152,6 +152,7 @@ const char kBand[] = "band";
const char kRdsData[] = "rdsData";
const char kHdRadioEnable[] = "hdRadioEnable";
const char kAvailableHDs[] = "availableHDs";
+const char kAvailableHdChannels[] = "availableHdChannels";
const char kHdChannel[] = "hdChannel";
const char kSignalStrength[] = "signalStrength";
const char kSignalChangeThreshold[] = "signalChangeThreshold";
@@ -176,6 +177,8 @@ const char kHeatedSteeringWheelEnable[] = "heatedSteeringWheelEnable";
const char kHeatedWindshieldEnable[] = "heatedWindshieldEnable";
const char kHeatedRearWindowEnable[] = "heatedRearWindowEnable";
const char kHeatedMirrorsEnable[] = "heatedMirrorsEnable";
+const char kClimateEnable[] = "climateEnable";
+const char kClimateEnableAvailable[] = "climateEnableAvailable";
// ClimateControlData struct
// LightControlData
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
index 47363bddcd..ded96461f5 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc
@@ -109,6 +109,7 @@ void GetInteriorVehicleDataRequest::FilterDisabledModuleData(
module_data[message_params::kHdRadioEnable].asBool() == false) {
module_data.erase(message_params::kHdChannel);
module_data.erase(message_params::kAvailableHDs);
+ module_data.erase(message_params::kAvailableHdChannels);
module_data.erase(message_params::kSisData);
}
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
index 2bf8fbbe92..44d302276d 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc
@@ -55,6 +55,7 @@ std::vector<std::string> GetModuleReadOnlyParams(
} else if (enums_value::kRadio == module_type) {
module_ro_params.push_back(kRdsData);
module_ro_params.push_back(kAvailableHDs);
+ module_ro_params.push_back(kAvailableHdChannels);
module_ro_params.push_back(kSignalStrength);
module_ro_params.push_back(kSignalChangeThreshold);
module_ro_params.push_back(kState);
@@ -92,6 +93,8 @@ const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() {
mapping["heatedWindshieldEnable"] = "heatedWindshieldAvailable";
mapping["heatedMirrorsEnable"] = "heatedMirrorsAvailable";
mapping["heatedRearWindowEnable"] = "heatedRearWindowAvailable";
+ mapping["climateEnable"] = "climateEnableAvailable";
+ mapping["climateEnableAvailable"] = "climateEnableAvailable";
// radio
mapping["band"] = "radioBandAvailable";
@@ -99,7 +102,8 @@ const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() {
mapping["frequencyFraction"] = "radioFrequencyAvailable";
mapping["rdsData"] = "rdsDataAvailable";
mapping["availableHDs"] = "availableHDsAvailable";
- mapping["hdChannel"] = "availableHDsAvailable";
+ mapping["availableHdChannels"] = "availableHdChannelsAvailable";
+ mapping["hdChannel"] = "availableHdChannelsAvailable";
mapping["hdRadioEnable"] = "hdRadioEnableAvailable";
mapping["signalStrength"] = "signalStrengthAvailable";
mapping["signalChangeThreshold"] = "signalChangeThresholdAvailable";
@@ -716,21 +720,6 @@ void SetInteriorVehicleDataRequest::CutOffReadOnlyParams(
const smart_objects::SmartObject& module_type_params =
ControlData(module_data);
const std::string module_type = ModuleType();
- std::vector<std::string> ro_params = GetModuleReadOnlyParams(module_type);
-
- for (auto& it : ro_params) {
- if (module_type_params.keyExists(it)) {
- if (enums_value::kClimate == module_type) {
- module_data[message_params::kClimateControlData].erase(it);
- } else if (enums_value::kRadio == module_type) {
- module_data[message_params::kRadioControlData].erase(it);
- } else {
- continue;
- }
-
- LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameter: " << it);
- }
- }
if (enums_value::kAudio == module_type) {
auto& equalizer_settings = module_data[message_params::kAudioControlData]
@@ -745,6 +734,15 @@ void SetInteriorVehicleDataRequest::CutOffReadOnlyParams(
}
}
}
+
+ std::vector<std::string> ro_params = GetModuleReadOnlyParams(module_type);
+ const auto& data_mapping = RCHelpers::GetModuleTypeToDataMapping();
+ for (const auto& param : ro_params) {
+ if (module_type_params.keyExists(param)) {
+ module_data[data_mapping(module_type)].erase(param);
+ LOG4CXX_DEBUG(logger_, "Cutting-off READ ONLY parameter: " << param);
+ }
+ }
}
std::string SetInteriorVehicleDataRequest::ModuleType() {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
index 9549830cec..1adc8caf93 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
@@ -44,6 +44,7 @@
#include "rc_rpc_plugin/rc_module_constants.h"
#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include <stdint.h>
#include <chrono>
#include <thread>
@@ -205,6 +206,8 @@ TEST_F(GetInteriorVehicleDataRequestTest,
HMIResultCodeIs(hmi_apis::FunctionID::RC_GetInteriorVehicleData), _))
.WillOnce(Return(true));
// Act
+
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -232,6 +235,7 @@ TEST_F(GetInteriorVehicleDataRequestTest,
HMIResultCodeIs(hmi_apis::FunctionID::RC_GetInteriorVehicleData), _))
.WillOnce(Return(true));
// Act
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -263,6 +267,7 @@ TEST_F(
.WillOnce(DoAll(SaveArg<0>(&command_result), Return(true)));
// Act
+ ASSERT_TRUE(command->Init());
command->Run();
// Assert
@@ -314,6 +319,7 @@ TEST_F(
command = CreateRCCommand<
rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>(
mobile_message);
+ ASSERT_TRUE(command->Init());
command->Run();
application_manager::event_engine::Event event(
hmi_apis::FunctionID::RC_GetInteriorVehicleData);
@@ -358,6 +364,7 @@ TEST_F(GetInteriorVehicleDataRequestTest,
.WillOnce(DoAll(SaveArg<0>(&command_result), Return(true)));
// Act
+ ASSERT_TRUE(command->Init());
command->Run();
// Assert
@@ -393,6 +400,7 @@ TEST_F(
MobileResultCodeIs(mobile_apis::Result::UNSUPPORTED_RESOURCE), _))
.WillOnce((Return(true)));
// Act
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -418,6 +426,7 @@ TEST_F(
.WillOnce((Return(true)));
// Act
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -458,6 +467,7 @@ TEST_F(GetInteriorVehicleDataRequestTest,
application_manager::event_engine::Event event(
hmi_apis::FunctionID::RC_GetInteriorVehicleData);
event.set_smart_object(*hmi_response_message);
+ ASSERT_TRUE(command->Init());
command->Run();
command->on_event(event);
}
@@ -498,6 +508,7 @@ TEST_F(GetInteriorVehicleDataRequestTest,
hmi_apis::FunctionID::RC_GetInteriorVehicleData);
event.set_smart_object(*hmi_message);
auto command = CreateRCCommand<GetInteriorVehicleDataRequest>(mobile_message);
+ ASSERT_TRUE(command->Init());
command->Run();
command->on_event(event);
}
@@ -542,6 +553,7 @@ TEST_F(GetInteriorVehicleDataRequestTest,
command = CreateRCCommand<
rc_rpc_plugin::commands::GetInteriorVehicleDataRequest>(
mobile_message);
+ ASSERT_TRUE(command->Init());
command->Run();
application_manager::event_engine::Event event(
hmi_apis::FunctionID::RC_GetInteriorVehicleData);
@@ -583,6 +595,7 @@ TEST_F(GetInteriorVehicleDataRequestTest,
_))
.WillRepeatedly(Return(true));
// Act
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -597,6 +610,130 @@ TEST_F(GetInteriorVehicleDataRequestTest,
EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).Times(0);
// Act
+ ASSERT_TRUE(command->Init());
command->Run();
}
+
+TEST_F(GetInteriorVehicleDataRequestTest,
+ OnEvent_ValidHmiResponse_AvailableHDChanelsIsArrayWithHDChanels) {
+ using rc_rpc_plugin::commands::GetInteriorVehicleDataRequest;
+ namespace hmi_response = application_manager::hmi_response;
+ namespace strings = application_manager::strings;
+
+ const uint32_t chanel1_index = 1u;
+ const uint32_t chanel2_index = 2u;
+ const uint32_t chanel3_index = 3u;
+
+ const uint32_t expected_array_length = 3u;
+
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+
+ MessageSharedPtr hmi_response_message = CreateBasicMessage();
+ auto& hmi_response_params = (*hmi_response_message)[strings::msg_params];
+ hmi_response_params[hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
+ hmi_response_params[strings::connection_key] = kAppId;
+
+ auto& msg_params = (*hmi_response_message)[strings::msg_params];
+ msg_params[message_params::kModuleType] = module_type;
+
+ auto available_hd_chanels =
+ smart_objects::SmartObject(smart_objects::SmartType_Array);
+
+ available_hd_chanels[0] = chanel1_index;
+ available_hd_chanels[1] = chanel2_index;
+ available_hd_chanels[2] = chanel3_index;
+
+ msg_params[message_params::kModuleData][message_params::kRadioControlData]
+ [message_params::kAvailableHdChannels] = available_hd_chanels;
+
+ ON_CALL(mock_interior_data_cache_, Contains(_)).WillByDefault(Return(false));
+ ON_CALL(mock_interior_data_manager_, CheckRequestsToHMIFrequency(_))
+ .WillByDefault(Return(true));
+
+ MessageSharedPtr message_to_mob = CreateBasicMessage();
+
+ // Expectations
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
+ .WillOnce(DoAll(SaveArg<0>(&message_to_mob), Return(true)));
+
+ // Act
+ auto command = CreateRCCommand<GetInteriorVehicleDataRequest>(mobile_message);
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+
+ event.set_smart_object(*hmi_response_message);
+ command->on_event(event);
+
+ auto& hd_chanels =
+ (*message_to_mob)[strings::msg_params][message_params::kModuleData]
+ [message_params::kRadioControlData]
+ [message_params::kAvailableHdChannels];
+ const size_t array_length = hd_chanels.length();
+
+ EXPECT_EQ(expected_array_length, array_length);
+
+ EXPECT_EQ(chanel1_index, hd_chanels[0].asUInt());
+ EXPECT_EQ(chanel2_index, hd_chanels[1].asUInt());
+ EXPECT_EQ(chanel3_index, hd_chanels[2].asUInt());
+}
+
+TEST_F(GetInteriorVehicleDataRequestTest,
+ OnEvent_ValidHmiResponse_ClimateEnableAvailable) {
+ using rc_rpc_plugin::commands::GetInteriorVehicleDataRequest;
+ namespace hmi_response = application_manager::hmi_response;
+ namespace strings = application_manager::strings;
+
+ // Arrange
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+
+ MessageSharedPtr hmi_response_message = CreateBasicMessage();
+ auto& hmi_response_params = (*hmi_response_message)[strings::msg_params];
+ hmi_response_params[hmi_response::code] = hmi_apis::Common_Result::SUCCESS;
+ hmi_response_params[strings::connection_key] = kAppId;
+
+ auto& msg_params = (*hmi_response_message)[strings::msg_params];
+
+ auto climate_control_data =
+ smart_objects::SmartObject(smart_objects::SmartType_Boolean);
+ climate_control_data = true;
+
+ msg_params[message_params::kModuleData][message_params::kClimateControlData]
+ [message_params::kClimateEnableAvailable] = climate_control_data;
+
+ ON_CALL(mock_interior_data_cache_, Contains(_)).WillByDefault(Return(false));
+ ON_CALL(mock_interior_data_manager_, CheckRequestsToHMIFrequency(_))
+ .WillByDefault(Return(true));
+
+ auto message_to_mob = CreateBasicMessage();
+
+ // Expectations
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _)).WillOnce(Return(true));
+ EXPECT_CALL(mock_rpc_service_, ManageMobileCommand(_, _))
+ .WillOnce(DoAll(SaveArg<0>(&message_to_mob), Return(true)));
+
+ // Act
+ auto command = CreateRCCommand<GetInteriorVehicleDataRequest>(mobile_message);
+ application_manager::event_engine::Event event(
+ hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+
+ event.set_smart_object(*hmi_response_message);
+ command->on_event(event);
+
+ const bool climate_enable_available =
+ (*message_to_mob)[strings::msg_params][message_params::kModuleData]
+ [message_params::kClimateControlData]
+ [message_params::kClimateEnableAvailable]
+ .asBool();
+
+ EXPECT_TRUE(climate_enable_available);
+}
+
} // namespace rc_rpc_plugin_test
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
index 66280eb183..f7718a7248 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
@@ -34,7 +34,6 @@
#include "application_manager/application.h"
#include "application_manager/commands/command_request_test.h"
#include "application_manager/mock_application.h"
-#include "gtest/gtest.h"
#include "interfaces/MOBILE_API.h"
#include "rc_rpc_plugin/mock/mock_interior_data_cache.h"
#include "rc_rpc_plugin/mock/mock_interior_data_manager.h"
@@ -42,15 +41,20 @@
#include "rc_rpc_plugin/rc_module_constants.h"
#include "rc_rpc_plugin/rc_rpc_plugin.h"
+#include <stdint.h>
+#include "gtest/gtest.h"
+
using application_manager::ApplicationSet;
using application_manager::commands::MessageSharedPtr;
using test::components::application_manager_test::MockApplication;
using test::components::application_manager_test::MockApplicationManager;
using test::components::commands_test::CommandRequestTest;
using test::components::commands_test::CommandsTestMocks;
+using test::components::commands_test::HMIResultCodeIs;
using ::testing::_;
using ::testing::NiceMock;
using ::testing::Return;
+using ::testing::SaveArg;
namespace {
const uint32_t kAppId = 0u;
@@ -140,8 +144,11 @@ TEST_F(SetInteriorVehicleDataRequestTest,
(*mobile_message)[application_manager::strings::msg_params];
msg_params[message_params::kModuleData][message_params::kModuleType] =
mobile_apis::ModuleType::CLIMATE;
+ smart_objects::SmartObject climate_control_data(smart_objects::SmartType_Map);
+ climate_control_data[message_params::kFanSpeed] = 10;
+
msg_params[message_params::kModuleData][message_params::kClimateControlData] =
- smart_objects::SmartObject(smart_objects::SmartType_Map);
+ climate_control_data;
// Expectations
EXPECT_CALL(mock_policy_handler_, CheckModule(kPolicyAppId, _))
.WillOnce(Return(rc_rpc_plugin::TypeAccess::kAllowed));
@@ -151,14 +158,15 @@ TEST_F(SetInteriorVehicleDataRequestTest,
EXPECT_CALL(
mock_rpc_service_,
- ManageMobileCommand(test::components::commands_test::MobileResultCodeIs(
- mobile_apis::Result::READ_ONLY),
- application_manager::commands::Command::SOURCE_SDL));
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::RC_SetInteriorVehicleData), _))
+ .WillOnce(Return(true));
// Act
std::shared_ptr<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>
command = CreateRCCommand<
rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>(
mobile_message);
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -189,15 +197,16 @@ TEST_F(
EXPECT_CALL(
mock_rpc_service_,
- ManageMobileCommand(test::components::commands_test::MobileResultCodeIs(
- mobile_apis::Result::OUT_OF_MEMORY),
- application_manager::commands::Command::SOURCE_SDL));
+ ManageHMICommand(
+ HMIResultCodeIs(hmi_apis::FunctionID::RC_SetInteriorVehicleData), _))
+ .WillOnce(Return(true));
// Act
std::shared_ptr<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>
command = CreateRCCommand<
rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>(
mobile_message);
+ ASSERT_TRUE(command->Init());
command->Run();
}
@@ -229,7 +238,99 @@ TEST_F(
command = CreateRCCommand<
rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>(
mobile_message);
+ ASSERT_TRUE(command->Init());
command->Run();
}
+TEST_F(SetInteriorVehicleDataRequestTest,
+ Execute_ValidWithSettableParams_SUCCESSSendToHMI) {
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ auto& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleData][message_params::kModuleType] =
+ mobile_apis::ModuleType::CLIMATE;
+
+ msg_params[message_params::kModuleData][message_params::kClimateControlData] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ msg_params[message_params::kModuleData][message_params::kClimateControlData]
+ [message_params::kClimateEnable] = true;
+
+ // Expectations
+ EXPECT_CALL(mock_policy_handler_, CheckModule(kPolicyAppId, _))
+ .WillOnce(Return(rc_rpc_plugin::TypeAccess::kAllowed));
+
+ EXPECT_CALL(mock_hmi_capabilities_, rc_capability())
+ .WillOnce(Return(nullptr));
+
+ MessageSharedPtr message_from_mobile = CreateBasicMessage();
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillOnce(DoAll(SaveArg<0>(&message_from_mobile), Return(true)));
+
+ std::shared_ptr<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>
+ command = CreateRCCommand<
+ rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>(
+ mobile_message);
+
+ ASSERT_TRUE(command->Init());
+ command->Run();
+
+ auto& msg_params_from_mobile =
+ (*message_from_mobile)[application_manager::strings::msg_params];
+
+ const bool climate_enable =
+ msg_params_from_mobile[message_params::kModuleData]
+ [message_params::kClimateControlData]
+ [message_params::kClimateEnable]
+ .asBool();
+ EXPECT_TRUE(climate_enable);
+}
+
+TEST_F(SetInteriorVehicleDataRequestTest,
+ Execute_ValidWithSettableParams_SUCCESSSendToHMI_HDChannel) {
+ MessageSharedPtr mobile_message = CreateBasicMessage();
+ auto& msg_params =
+ (*mobile_message)[application_manager::strings::msg_params];
+ msg_params[message_params::kModuleData][message_params::kModuleType] =
+ mobile_apis::ModuleType::RADIO;
+
+ msg_params[message_params::kModuleData][message_params::kRadioControlData] =
+ smart_objects::SmartObject(smart_objects::SmartType_Map);
+
+ const std::uint32_t hd_channel = 2u;
+ msg_params[message_params::kModuleData][message_params::kRadioControlData]
+ [message_params::kHdChannel] = hd_channel;
+
+ // Expectations
+ EXPECT_CALL(mock_policy_handler_, CheckModule(kPolicyAppId, _))
+ .WillOnce(Return(rc_rpc_plugin::TypeAccess::kAllowed));
+
+ EXPECT_CALL(mock_hmi_capabilities_, rc_capability())
+ .WillOnce(Return(nullptr));
+
+ auto message_from_mobile = CreateBasicMessage();
+
+ EXPECT_CALL(mock_rpc_service_, ManageHMICommand(_, _))
+ .WillOnce(DoAll(SaveArg<0>(&message_from_mobile), Return(true)));
+
+ std::shared_ptr<rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>
+ command = CreateRCCommand<
+ rc_rpc_plugin::commands::SetInteriorVehicleDataRequest>(
+ mobile_message);
+
+ command->Init();
+ command->Run();
+
+ auto& msg_params_from_mobile =
+ (*message_from_mobile)[application_manager::strings::msg_params];
+
+ const uint64_t hd_channel_from_hmi =
+ msg_params_from_mobile[message_params::kModuleData]
+ [message_params::kRadioControlData]
+ [message_params::kHdChannel]
+ .asUInt();
+
+ EXPECT_EQ(hd_channel, hd_channel_from_hmi);
+}
} // namespace rc_rpc_plugin_test
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc
index d6df3e61ee..67c36dce9c 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/rc_get_capabilities_response_test.cc
@@ -139,6 +139,7 @@ TEST_F(RCGetCapabilitiesResponseTest, RUN_SUCCESSS) {
radio_control_capability["hdChannelAvailable"] = true;
radio_control_capability["rdsDataAvailable"] = true;
radio_control_capability["availableHDsAvailable"] = true;
+ radio_control_capability["availableHdChannelsAvailable"] = true;
radio_control_capability["stateAvailable"] = true;
radio_control_capability["signalStrengthAvailable"] = true;
radio_control_capability["signalChangeThresholdAvailable"] = true;
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index a69d2f05c8..488c986df5 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -1880,9 +1880,15 @@
<description> True if the hd radio is on, false is the radio is off</description>
</param>
<param name="availableHDs" type="Integer" minvalue="1" maxvalue="7" mandatory="false">
- <description>number of HD sub-channels if available</description>
+ <description>
+ Number of HD sub-channels if available.
+ Note that this parameter is deprecated in MOBILE API.
+ </description>
</param>
- <param name="hdChannel" type="Integer" minvalue="1" maxvalue="7" mandatory="false">
+ <param name="availableHdChannels" type="Integer" minvalue="0" maxvalue="7" array="true" minsize="0" maxsize="8" mandatory="false">
+ <description>The list of available hd sub-channel indexes. Empty list means no Hd channel is available. Read-only.</description>
+ </param>
+ <param name="hdChannel" type="Integer" minvalue="0" maxvalue="7" mandatory="false">
<description>Current HD sub-channel if available</description>
</param>
<param name="signalStrength" type="Integer" minvalue="0" maxvalue="100" mandatory="false">
@@ -1936,9 +1942,17 @@
</description>
</param>
<param name="availableHDsAvailable" type="Boolean" mandatory="false" >
- <description>
+ <description>
Availability of the getting the number of available HD channels.
True: Available, False: Not Available, Not present: Not Available.
+ Note that this parameter is deprecated in MOBILE API
+ </description>
+ </param>
+
+ <param name="availableHdChannelsAvailable" type="Boolean" mandatory="false">
+ <description>
+ Availability of the list of available HD sub-channel indexes.
+ True: Available, False: Not Available, Not present: Not Available.
</description>
</param>
<param name="stateAvailable" type="Boolean" mandatory="false" >
@@ -2040,6 +2054,8 @@
<param name="heatedMirrorsEnable" type="Boolean" mandatory="false">
<description>value false means disabled, value true means enabled.</description>
</param>
+ <param name="climateEnable" type="Boolean" mandatory="false">
+ </param>
</struct>
<struct name="ClimateControlCapabilities">
@@ -2141,6 +2157,12 @@
True: Available, False: Not Available, Not present: Not Available.
</description>
</param>
+ <param name="climateEnableAvailable" type="Boolean" mandatory="false">
+ <description>
+ Availability of the control of enable/disable climate control.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
</struct>
<struct name="EqualizerSettings">
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index e57d102d15..d6fe4d6cc0 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -3100,16 +3100,21 @@
<param name="hdRadioEnable" type="Boolean" mandatory="false" since="5.0">
<description> True if the hd radio is on, false if the radio is off</description>
</param>
- <param name="availableHDs" type="Integer" minvalue="1" maxvalue="7" mandatory="false" since="5.0">
- <description>number of HD sub-channels if available</description>
+ <param name="availableHDs" type="Integer" minvalue="1" maxvalue="7" mandatory="false" deprecated="true" since="6.0">
+ <description>Number of HD sub-channels if available</description>
<history>
<param name="availableHDs" type="Integer" minvalue="1" maxvalue="3" mandatory="false" since="4.5" until="5.0"/>
+ <param name="availableHDs" type="Integer" minvalue="1" maxvalue="7" mandatory="false" since="5.0" until="6.0"/>
</history>
</param>
- <param name="hdChannel" type="Integer" minvalue="1" maxvalue="7" mandatory="false" since="5.0">
+ <param name="availableHdChannels" type="Integer" minvalue="0" maxvalue="7" array="true" minsize="0" maxsize="8" mandatory="false" since="6.0">
+ <description>The list of available HD sub-channel indexes. Empty list means no Hd channel is available. Read-only. </description>
+ </param>
+ <param name="hdChannel" type="Integer" minvalue="0" maxvalue="7" mandatory="false" since="6.0">
<description>Current HD sub-channel if available</description>
<history>
<param name="hdChannel" type="Integer" minvalue="1" maxvalue="3" mandatory="false" since="4.5" until="5.0"/>
+ <param name="hdChannel" type="Integer" minvalue="1" maxvalue="7" mandatory="false" since="5.0" until="6.0"/>
</history>
</param>
<param name="signalStrength" type="Integer" minvalue="0" maxvalue="100" mandatory="false">
@@ -3160,6 +3165,8 @@
<param name="heatedMirrorsEnable" type="Boolean" mandatory="false" since="5.0">
<description>value false means disabled, value true means enabled.</description>
</param>
+ <param name="climateEnable" type="Boolean" mandatory="false" since="6.0">
+ </param>
</struct>
<struct name="RadioControlCapabilities" since="4.5">
@@ -3201,11 +3208,20 @@
True: Available, False: Not Available, Not present: Not Available.
</description>
</param>
- <param name="availableHDsAvailable" type="Boolean" mandatory="false">
+ <param name="availableHDsAvailable" type="Boolean" mandatory="false" deprecated="true" since="6.0">
<description>
Availability of the getting the number of available HD channels.
True: Available, False: Not Available, Not present: Not Available.
</description>
+ <history>
+ <param name="availableHDsAvailable" type="Boolean" mandatory="false" since="4.5" until="6.0"/>
+ </history>
+ </param>
+ <param name="availableHdChannelsAvailable" type="Boolean" mandatory="false" since="6.0">
+ <description>
+ Availability of the list of available HD sub-channel indexes.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
</param>
<param name="stateAvailable" type="Boolean" mandatory="false">
<description>
@@ -3346,6 +3362,12 @@
True: Available, False: Not Available, Not present: Not Available.
</description>
</param>
+ <param name="climateEnableAvailable" type="Boolean" mandatory="false" since="6.0">
+ <description>
+ Availability of the control of enable/disable climate control.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
</struct>
<struct name="EqualizerSettings" since="5.0">