summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2018-08-17 05:52:50 -0700
committerGitHub <noreply@github.com>2018-08-17 05:52:50 -0700
commit9bdf1c823482e9bc8db0756b33826551ffd7a640 (patch)
tree3f47255f955507abc0a231b2a1a35ba570cd15ae
parentc0894b5ac6e0b7bd82102f46a02b06b093859d11 (diff)
parent80b868ed6d1b0c7b488729c8c1ddafe04614fbea (diff)
downloadsdl_core-9bdf1c823482e9bc8db0756b33826551ffd7a640.tar.gz
Merge pull request #2207 from smartdevicelink/feature/rc_new_modules
Feature/New remote control modules and parameters
-rwxr-xr-xsrc/appMain/hmi_capabilities.json233
-rw-r--r--src/components/application_manager/include/application_manager/application.h6
-rw-r--r--src/components/application_manager/include/application_manager/application_impl.h6
-rw-r--r--src/components/application_manager/include/application_manager/application_manager_impl.h5
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h9
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/rc_module_constants.h36
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc12
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/get_interior_vehicle_data_request.cc5
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/mobile/set_interior_vehicle_data_request.cc197
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc3
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc2
-rw-r--r--src/components/application_manager/src/application_impl.cc7
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc8
-rw-r--r--src/components/application_manager/src/hmi_state.cc3
-rw-r--r--src/components/application_manager/src/rpc_handler_impl.cc3
-rw-r--r--src/components/application_manager/test/include/application_manager/mock_application.h1
-rw-r--r--src/components/application_manager/test/state_controller/state_controller_test.cc73
-rw-r--r--src/components/include/application_manager/application_manager.h12
-rw-r--r--src/components/include/test/application_manager/mock_application_manager.h2
-rw-r--r--src/components/interfaces/HMI_API.xml457
-rw-r--r--src/components/interfaces/MOBILE_API.xml358
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table/enums.h9
-rw-r--r--src/components/policy/policy_external/src/policy_table/enums.cc21
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/enums.h9
-rw-r--r--src/components/policy/policy_regular/src/policy_table/enums.cc24
26 files changed, 1400 insertions, 113 deletions
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json
index 4eedd6b17a..dbbb42637c 100755
--- a/src/appMain/hmi_capabilities.json
+++ b/src/appMain/hmi_capabilities.json
@@ -438,6 +438,10 @@
"defrostZoneAvailable": true,
"desiredTemperatureAvailable": true,
"dualModeEnableAvailable": true,
+ "heatedMirrorsAvailable":true,
+ "heatedRearWindowAvailable":true,
+ "heatedSteeringWheelAvailable":true,
+ "heatedWindshieldAvailable":true,
"fanSpeedAvailable": true,
"moduleName": "primary_climate",
"ventilationMode": [
@@ -460,11 +464,22 @@
"rdsDataAvailable": true,
"signalChangeThresholdAvailable": true,
"signalStrengthAvailable": true,
+ "sisDataAvailable":true,
"stateAvailable": true
}
],
- "seatControlCapabilities": [
- {
+ "audioControlCapabilities": [
+ {
+ "moduleName": "audio",
+ "sourceAvailable": true,
+ "volumeAvailable": true,
+ "equalizerAvailable": true,
+ "keepContextAvailable" : true,
+ "equalizerMaxChannelId": 10
+ }
+ ],
+ "seatControlCapabilities": [
+ {
"moduleName": "driver_seat",
"heatingEnabledAvailable" : true,
"coolingEnabledAvailable": true,
@@ -482,7 +497,219 @@
"massageCushionFirmnessAvailable": true,
"memoryAvailable": true
}
- ]
+ ],
+ "lightControlCapabilities": {
+ "moduleName": "light",
+ "supportedLights":[
+ {
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_HIGH_BEAM",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_HIGH_BEAM",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_LOW_BEAM",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_LOW_BEAM",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_PARKING_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_PARKING_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_FOG_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_FOG_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_DAYTIME_RUNNING_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_DAYTIME_RUNNING_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_LEFT_TURN_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FRONT_RIGHT_TURN_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_LEFT_FOG_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_RIGHT_FOG_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_LEFT_TAIL_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_RIGHT_TAIL_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_LEFT_BREAK_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_RIGHT_BREAK_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_LEFT_TURN_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_RIGHT_TURN_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_REGISTRATION_PLATE_LIGHT",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"HIGH_BEAMS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"LOW_BEAMS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"FOG_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"RUNNING_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"PARKING_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"BRAKE_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"REAR_REVERSING_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"SIDE_MARKER_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"LEFT_TURN_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"RIGHT_TURN_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"HAZARD_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"AMBIENT_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"OVERHEAD_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"READING_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"TRUNK_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"EXTERIOR_FRONT_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"EXTERIOR_REAR_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"EXTERIOR_LEFT_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ },
+ {
+ "densityAvailable":true,
+ "name":"EXTERIOR_RIGHT_LIGHTS",
+ "rgbColorSpaceAvailable":true
+ }
+ ]
+
+ },
+ "hmiSettingsControlCapabilities": {
+ "moduleName": "hmiSettings",
+ "distanceUnitAvailable": true,
+ "temperatureUnitAvailable": true,
+ "displayModeUnitAvailable": true
+ }
}
}
},
diff --git a/src/components/application_manager/include/application_manager/application.h b/src/components/application_manager/include/application_manager/application.h
index da5860f06b..31fd04b1a2 100644
--- a/src/components/application_manager/include/application_manager/application.h
+++ b/src/components/application_manager/include/application_manager/application.h
@@ -738,6 +738,12 @@ class Application : public virtual InitialApplicationData,
virtual const HmiStatePtr RegularHmiState() const = 0;
/**
+ * @brief Checks if app is allowed to change audio source
+ * @return True - if allowed, otherwise - False
+ */
+ virtual bool IsAllowedToChangeAudioSource() const = 0;
+
+ /**
* @brief PostponedHmiState returns postponed hmi state of application
* if it's present
*
diff --git a/src/components/application_manager/include/application_manager/application_impl.h b/src/components/application_manager/include/application_manager/application_impl.h
index 549ccc6d0d..f5cf353c75 100644
--- a/src/components/application_manager/include/application_manager/application_impl.h
+++ b/src/components/application_manager/include/application_manager/application_impl.h
@@ -353,6 +353,12 @@ class ApplicationImpl : public virtual Application,
virtual const HmiStatePtr CurrentHmiState() const;
/**
+ * @brief Checks if app is allowed to change audio source
+ * @return True - if allowed, otherwise - False
+ */
+ virtual bool IsAllowedToChangeAudioSource() const;
+
+ /**
* @brief RegularHmiState of application without active events VR, TTS etc ...
* @return HmiState of application
*/
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 87a6c521e8..5f485b76eb 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
@@ -181,6 +181,10 @@ class ApplicationManagerImpl
void set_application_id(const int32_t correlation_id,
const uint32_t app_id) OVERRIDE;
+ uint32_t get_current_audio_source() const OVERRIDE;
+
+ void set_current_audio_source(const uint32_t source) OVERRIDE;
+
void OnHMILevelChanged(uint32_t app_id,
mobile_apis::HMILevel::eType from,
mobile_apis::HMILevel::eType to) OVERRIDE;
@@ -1480,6 +1484,7 @@ class ApplicationManagerImpl
bool is_vr_session_strated_;
bool hmi_cooperating_;
bool is_all_apps_allowed_;
+ uint32_t current_audio_source_;
event_engine::EventDispatcherImpl event_dispatcher_;
media_manager::MediaManager* media_manager_;
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h
index 83a8dfdd75..6e7cf05d90 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/commands/mobile/set_interior_vehicle_data_request.h
@@ -118,6 +118,15 @@ class SetInteriorVehicleDataRequest : public RCCommandRequest {
*/
const smart_objects::SmartObject& ControlData(
const smart_objects::SmartObject& module_data);
+
+ /**
+ * @brief CheckAudioSource check that if app wants to change
+ * the audio source from MOBILE_APP to other types of audio
+ * source without keepContext parameter or with keepContext=false
+ * then this app will go to HMI level 'BACKGROUND'
+ * @param module_data received params
+ */
+ void CheckAudioSource(const smart_objects::SmartObject& audio_data);
};
} // namespace commands
} // namespace rc_rpc_plugin
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 f2037aabbb..22db12c68b 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
@@ -40,7 +40,20 @@ namespace strings {
const char kclimateControlCapabilities[] = "climateControlCapabilities";
const char kradioControlCapabilities[] = "radioControlCapabilities";
const char kbuttonCapabilities[] = "buttonCapabilities";
+const char kaudioControlCapabilities[] = "audioControlCapabilities";
+const char klightControlCapabilities[] = "lightControlCapabilities";
+const char khmiSettingsControlCapabilities[] = "hmiSettingsControlCapabilities";
const char kseatControlCapabilities[] = "seatControlCapabilities";
+// RemoteControlCapabilities constants
+
+const char kRadioControlData[] = "radioControlData";
+const char kClimateControlData[] = "climateControlData";
+const char kSupportedLights[] = "supportedLights";
+
+// LightControlCapabilities
+const char kName[] = "name";
+const char kDensityAvailable[] = "densityAvailable";
+const char kRGBColorSpaceAvailable[] = "rgbColorSpaceAvailable";
} // strings
namespace result_codes {
@@ -139,6 +152,7 @@ const char kSignalStrength[] = "signalStrength";
const char kSignalChangeThreshold[] = "signalChangeThreshold";
const char kRadioEnable[] = "radioEnable";
const char kState[] = "state";
+const char kSisData[] = "sisData";
// RadioControlData struct
// ClimateControlData struct
@@ -153,11 +167,30 @@ const char kDefrostZone[] = "defrostZone";
const char kDualModeEnable[] = "dualModeEnable";
const char kACMaxEnable[] = "acMaxEnable";
const char kVentilationMode[] = "ventilationMode";
+const char kHeatedSteeringWheelEnable[] = "heatedSteeringWheelEnable";
+const char kHeatedWindshieldEnable[] = "heatedWindshieldEnable";
+const char kHeatedRearWindowEnable[] = "heatedRearWindowEnable";
+const char kHeatedMirrorsEnable[] = "heatedMirrorsEnable";
// ClimateControlData struct
+// LightControlData
+const char kLightState[] = "lightState";
+const char kStatus[] = "status";
+const char kDensity[] = "density";
+const char kColor[] = "color";
+
+// AudioControlData
+const char kSource[] = "source";
+const char kKeepContext[] = "keepContext";
+const char kEqualizerSettings[] = "equalizerSettings";
+const char kChannelName[] = "channelName";
+
// ModuleData struct
const char kRadioControlData[] = "radioControlData";
const char kClimateControlData[] = "climateControlData";
+const char kAudioControlData[] = "audioControlData";
+const char kLightControlData[] = "lightControlData";
+const char kHmiSettingsControlData[] = "hmiSettingsControlData";
const char kSeatControlData[] = "seatControlData";
// ModuleData struct
@@ -173,6 +206,9 @@ namespace enums_value {
const char kClimate[] = "CLIMATE";
const char kRadio[] = "RADIO";
const char kSeat[] = "SEAT";
+const char kAudio[] = "AUDIO";
+const char kLight[] = "LIGHT";
+const char kHmiSettings[] = "HMI_SETTINGS";
// ModuleType enum
// RadioBand enum
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc
index f12512a38d..ab9fe0cc89 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_get_interior_vehicle_data_response.cc
@@ -31,6 +31,7 @@
*/
#include "rc_rpc_plugin/commands/hmi/rc_get_interior_vehicle_data_response.h"
+#include "rc_rpc_plugin/rc_module_constants.h"
#include "application_manager/event_engine/event.h"
namespace rc_rpc_plugin {
@@ -56,6 +57,17 @@ void RCGetInteriorVehicleDataResponse::Run() {
app_mngr::event_engine::Event event(
hmi_apis::FunctionID::RC_GetInteriorVehicleData);
+
+ smart_objects::SmartObject& module_data = (*message_)
+ [application_manager::strings::msg_params][message_params::kModuleData];
+ if (module_data.keyExists(message_params::kAudioControlData)) {
+ smart_objects::SmartObject& audio_control_data =
+ module_data[message_params::kAudioControlData];
+ if (audio_control_data.keyExists(message_params::kKeepContext)) {
+ audio_control_data.erase(message_params::kKeepContext);
+ }
+ }
+
event.set_smart_object(*message_);
event.raise(application_manager_.event_dispatcher());
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc
index 487193bc4d..3f757fab2e 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/commands/hmi/rc_on_interior_vehicle_data_notification.cc
@@ -30,6 +30,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
+#include "rc_rpc_plugin/rc_module_constants.h"
#include "rc_rpc_plugin/commands/hmi/rc_on_interior_vehicle_data_notification.h"
#include "utils/macro.h"
@@ -57,6 +58,17 @@ void RCOnInteriorVehicleDataNotification::Run() {
LOG4CXX_AUTO_TRACE(logger_);
(*message_)[app_mngr::strings::params][app_mngr::strings::function_id] =
static_cast<int>(mobile_apis::FunctionID::eType::OnInteriorVehicleDataID);
+
+ smart_objects::SmartObject& module_data = (*message_)
+ [application_manager::strings::msg_params][message_params::kModuleData];
+ if (module_data.keyExists(rc_rpc_plugin::message_params::kAudioControlData)) {
+ smart_objects::SmartObject& audio_control_data =
+ module_data[message_params::kAudioControlData];
+ if (audio_control_data.keyExists(message_params::kKeepContext)) {
+ audio_control_data.erase(message_params::kKeepContext);
+ }
+ }
+
SendNotificationToMobile(message_);
}
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 06c44d2ff3..f9d65a2635 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
@@ -66,7 +66,10 @@ bool CheckIfModuleTypeExistInCapabilities(
const std::map<std::string, std::string> params = {
{enums_value::kRadio, strings::kradioControlCapabilities},
{enums_value::kClimate, strings::kclimateControlCapabilities},
- {enums_value::kSeat, strings::kseatControlCapabilities}};
+ {enums_value::kAudio, strings::kaudioControlCapabilities},
+ {enums_value::kLight, strings::klightControlCapabilities},
+ {enums_value::kSeat, strings::kseatControlCapabilities},
+ {enums_value::kHmiSettings, strings::khmiSettingsControlCapabilities}};
bool is_module_type_valid = false;
for (const auto& param : params) {
if (param.first == module_type) {
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 83bb526076..0da1e4c6e7 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
@@ -57,6 +57,7 @@ std::vector<std::string> GetModuleReadOnlyParams(
module_ro_params.push_back(kSignalStrength);
module_ro_params.push_back(kSignalChangeThreshold);
module_ro_params.push_back(kState);
+ module_ro_params.push_back(kSisData);
}
return module_ro_params;
}
@@ -65,6 +66,9 @@ const std::map<std::string, std::string> GetModuleTypeToDataMapping() {
std::map<std::string, std::string> mapping = {
{enums_value::kRadio, message_params::kRadioControlData},
{enums_value::kClimate, message_params::kClimateControlData},
+ {enums_value::kAudio, message_params::kAudioControlData},
+ {enums_value::kLight, message_params::kLightControlData},
+ {enums_value::kHmiSettings, message_params::kHmiSettingsControlData},
{enums_value::kSeat, message_params::kSeatControlData}};
return mapping;
}
@@ -82,6 +86,10 @@ const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() {
mapping["dualModeEnable"] = "dualModeEnableAvailable";
mapping["acMaxEnable"] = "acMaxEnableAvailable";
mapping["ventilationMode"] = "ventilationModeAvailable";
+ mapping["heatedSteeringWheelEnable"] = "heatedSteeringWheelAvailable";
+ mapping["heatedWindshieldEnable"] = "heatedWindshieldAvailable";
+ mapping["heatedMirrorsEnable"] = "heatedMirrorsAvailable";
+ mapping["heatedRearWindowEnable"] = "heatedRearWindowAvailable";
// radio
mapping["band"] = "radioBandAvailable";
@@ -94,6 +102,7 @@ const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() {
mapping["signalChangeThreshold"] = "signalChangeThresholdAvailable";
mapping["radioEnable"] = "radioEnableAvailable";
mapping["state"] = "stateAvailable";
+ mapping["sisData"] = "sisDataAvailable";
// seat
mapping["heatingEnabled"] = "heatingEnabledAvailable";
@@ -113,6 +122,16 @@ const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() {
mapping["massageMode"] = "massageModeAvailable";
mapping["massageCushionFirmness"] = "massageCushionFirmnessAvailable";
mapping["memory"] = "memoryAvailable";
+ // audio
+ mapping["source"] = "sourceAvailable";
+ mapping["keepContext"] = "keepContextAvailable";
+ mapping["volume"] = "volumeAvailable";
+ mapping["equalizerSettings"] = "equalizerAvailable";
+
+ // hmi settings
+ mapping["distanceUnit"] = "distanceUnitAvailable";
+ mapping["temperatureUnit"] = "temperatureUnitAvailable";
+ mapping["displayMode"] = "displayModeUnitAvailable";
return mapping;
}
@@ -136,23 +155,95 @@ SetInteriorVehicleDataRequest::SetInteriorVehicleDataRequest(
SetInteriorVehicleDataRequest::~SetInteriorVehicleDataRequest() {}
+const std::string LightName(const smart_objects::SmartObject& light_name) {
+ const char* name;
+ const bool ok = NsSmartDeviceLink::NsSmartObjects::
+ EnumConversionHelper<mobile_apis::LightName::eType>::EnumToCString(
+ static_cast<mobile_apis::LightName::eType>(light_name.asUInt()),
+ &name);
+ return ok ? name : "unknown";
+}
+
+bool CheckLightDataByCapabilities(
+ const smart_objects::SmartObject& capabilities,
+ const smart_objects::SmartObject& light_data) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ std::map<std::string, std::string> lightCapsMapping = {
+ {message_params::kId, strings::kName},
+ {message_params::kDensity, strings::kDensityAvailable},
+ {message_params::kColor, strings::kRGBColorSpaceAvailable}};
+ auto it = light_data.map_begin();
+ for (; it != light_data.map_end(); ++it) {
+ if (message_params::kStatus == it->first ||
+ message_params::kId == it->first) {
+ continue;
+ }
+ const std::string& caps_key = lightCapsMapping[it->first];
+ LOG4CXX_DEBUG(logger_,
+ "Checking request parameter "
+ << it->first << " with capabilities. Appropriate key is "
+ << caps_key);
+
+ if (!capabilities.keyExists(caps_key)) {
+ LOG4CXX_DEBUG(logger_,
+ "Capability "
+ << caps_key
+ << " is missed in RemoteControl capabilities");
+ return false;
+ }
+ if (!capabilities[caps_key].asBool()) {
+ LOG4CXX_DEBUG(logger_,
+ "Capability "
+ << caps_key
+ << " is switched off in RemoteControl capabilities");
+ return false;
+ }
+ }
+ return true;
+}
+
+bool CheckLightNameByCapabilities(
+ const smart_objects::SmartObject& capabilities_status,
+ const smart_objects::SmartObject& light_data) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ auto it = capabilities_status.asArray()->begin();
+ for (; it != capabilities_status.asArray()->end(); ++it) {
+ const smart_objects::SmartObject& so = *it;
+ const int64_t current_id = so[message_params::kName].asInt();
+ if (current_id == light_data[message_params::kId].asInt()) {
+ return CheckLightDataByCapabilities(so, light_data);
+ }
+ }
+ LOG4CXX_DEBUG(logger_, "There is no such light name in capabilities");
+ return false;
+}
+
bool CheckControlDataByCapabilities(
- const smart_objects::SmartObject& module_caps,
+ const smart_objects::SmartObject& capabilities_status,
const smart_objects::SmartObject& control_data) {
+ LOG4CXX_AUTO_TRACE(logger_);
std::map<std::string, std::string> mapping =
GetModuleDataToCapabilitiesMapping();
- const smart_objects::SmartObject& capabilities_status = module_caps[0];
auto it = control_data.map_begin();
for (; it != control_data.map_end(); ++it) {
const std::string& request_parameter = it->first;
- if (message_params::kId == request_parameter) {
- continue;
+ if (message_params::kLightState == request_parameter) {
+ auto light_data = control_data[request_parameter].asArray()->begin();
+ for (; light_data != control_data[request_parameter].asArray()->end();
+ ++light_data) {
+ if (!CheckLightNameByCapabilities(
+ capabilities_status[strings::kSupportedLights], *light_data)) {
+ return false;
+ }
+ }
+ return true;
}
const std::string& caps_key = mapping[request_parameter];
LOG4CXX_DEBUG(logger_,
"Checking request parameter "
<< request_parameter
<< " with capabilities. Appropriate key is " << caps_key);
+
if (!capabilities_status.keyExists(caps_key)) {
LOG4CXX_DEBUG(logger_,
"Capability "
@@ -179,7 +270,11 @@ bool CheckIfModuleDataExistInCapabilities(
{message_params::kRadioControlData, strings::kradioControlCapabilities},
{message_params::kClimateControlData,
strings::kclimateControlCapabilities},
- {message_params::kSeatControlData, strings::kseatControlCapabilities}};
+ {message_params::kAudioControlData, strings::kaudioControlCapabilities},
+ {message_params::kLightControlData, strings::klightControlCapabilities},
+ {message_params::kSeatControlData, strings::kseatControlCapabilities},
+ {message_params::kHmiSettingsControlData,
+ strings::khmiSettingsControlCapabilities}};
bool is_module_data_valid = false;
for (const auto& param : params) {
if (module_data.keyExists(param.first)) {
@@ -188,8 +283,14 @@ bool CheckIfModuleDataExistInCapabilities(
return false;
}
const smart_objects::SmartObject& caps = rc_capabilities[param.second];
- is_module_data_valid =
- CheckControlDataByCapabilities(caps, module_data[param.first]);
+ if (message_params::kHmiSettingsControlData == param.first ||
+ message_params::kLightControlData == param.first) {
+ is_module_data_valid =
+ CheckControlDataByCapabilities(caps, module_data[param.first]);
+ } else {
+ is_module_data_valid =
+ CheckControlDataByCapabilities(caps[0], module_data[param.first]);
+ }
}
}
return is_module_data_valid;
@@ -249,6 +350,20 @@ void SetInteriorVehicleDataRequest::Execute() {
(*message_)[app_mngr::strings::msg_params][app_mngr::strings::app_id] =
app->app_id();
+ const bool app_wants_to_set_audio_src =
+ module_data.keyExists(message_params::kAudioControlData) &&
+ module_data[message_params::kAudioControlData].keyExists(
+ message_params::kSource);
+
+ if (app_wants_to_set_audio_src && !app->IsAllowedToChangeAudioSource()) {
+ LOG4CXX_WARN(logger_, "App is not allowed to change audio source");
+ SetResourceState(ModuleType(), ResourceState::FREE);
+ SendResponse(false,
+ mobile_apis::Result::REJECTED,
+ "App is not allowed to change audio source");
+ return;
+ }
+
SendHMIRequest(hmi_apis::FunctionID::RC_SetInteriorVehicleData,
&(*message_)[app_mngr::strings::msg_params],
true);
@@ -284,6 +399,11 @@ void SetInteriorVehicleDataRequest::on_event(
smart_objects::SmartObject response_params;
if (result) {
response_params = hmi_response[app_mngr::strings::msg_params];
+ if (enums_value::kAudio == ModuleType()) {
+ CheckAudioSource((
+ *message_)[app_mngr::strings::msg_params][message_params::kModuleData]
+ [message_params::kAudioControlData]);
+ }
}
std::string info;
GetInfo(hmi_response, info);
@@ -305,6 +425,32 @@ const smart_objects::SmartObject& SetInteriorVehicleDataRequest::ControlData(
return module_data[0];
}
+void SetInteriorVehicleDataRequest::CheckAudioSource(
+ const smart_objects::SmartObject& audio_data) {
+ LOG4CXX_AUTO_TRACE(logger_);
+ const bool should_keep_context =
+ audio_data.keyExists(message_params::kKeepContext) &&
+ audio_data[message_params::kKeepContext].asBool();
+ const bool switch_source_from_app =
+ mobile_apis::PrimaryAudioSource::MOBILE_APP ==
+ application_manager_.get_current_audio_source() &&
+ mobile_apis::PrimaryAudioSource::MOBILE_APP !=
+ audio_data[message_params::kSource].asInt();
+ if (!should_keep_context && switch_source_from_app) {
+ app_mngr::ApplicationSharedPtr app =
+ application_manager_.application(connection_key());
+ if (app->mobile_projection_enabled()) {
+ application_manager_.ChangeAppsHMILevel(
+ app->app_id(), mobile_apis::HMILevel::eType::HMI_LIMITED);
+ } else {
+ application_manager_.ChangeAppsHMILevel(
+ app->app_id(), mobile_apis::HMILevel::eType::HMI_BACKGROUND);
+ }
+ }
+ application_manager_.set_current_audio_source(
+ audio_data[message_params::kSource].asUInt());
+}
+
bool SetInteriorVehicleDataRequest::AreAllParamsReadOnly(
const smart_objects::SmartObject& module_data) {
LOG4CXX_AUTO_TRACE(logger_);
@@ -320,13 +466,34 @@ bool SetInteriorVehicleDataRequest::AreAllParamsReadOnly(
return true;
}
+bool CheckReadOnlyParamsForAudio(
+ const smart_objects::SmartObject& module_type_params) {
+ if (module_type_params.keyExists(message_params::kEqualizerSettings)) {
+ const auto& equalizer_settings =
+ module_type_params[message_params::kEqualizerSettings];
+ auto it = equalizer_settings.asArray()->begin();
+ for (; it != equalizer_settings.asArray()->end(); ++it) {
+ if (it->keyExists(message_params::kChannelName)) {
+ LOG4CXX_DEBUG(logger_,
+ " READ ONLY parameter: " << message_params::kChannelName);
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
bool SetInteriorVehicleDataRequest::AreReadOnlyParamsPresent(
const smart_objects::SmartObject& module_data) {
LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& module_type_params =
ControlData(module_data);
auto it = module_type_params.map_begin();
- std::vector<std::string> ro_params = GetModuleReadOnlyParams(ModuleType());
+ const std::string module_type = ModuleType();
+ std::vector<std::string> ro_params = GetModuleReadOnlyParams(module_type);
+ if (enums_value::kAudio == module_type) {
+ return CheckReadOnlyParamsForAudio(module_type_params);
+ }
for (; it != module_type_params.map_end(); ++it) {
if (helpers::in_range(ro_params, it->first)) {
return true;
@@ -354,6 +521,20 @@ void SetInteriorVehicleDataRequest::CutOffReadOnlyParams(
}
}
}
+
+ if (enums_value::kAudio == module_type) {
+ auto& equalizer_settings = module_data[message_params::kAudioControlData]
+ [message_params::kEqualizerSettings];
+ auto it = equalizer_settings.asArray()->begin();
+ for (; it != equalizer_settings.asArray()->end(); ++it) {
+ if (it->keyExists(message_params::kChannelName)) {
+ it->erase(message_params::kChannelName);
+ LOG4CXX_DEBUG(logger_,
+ "Cutting-off READ ONLY parameter: "
+ << message_params::kChannelName);
+ }
+ }
+ }
}
std::string SetInteriorVehicleDataRequest::ModuleType() {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
index 011950b35a..59d1919bb5 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc
@@ -367,6 +367,9 @@ ResourceAllocationManagerImpl::all_supported_modules() {
result.push_back(enums_value::kClimate);
result.push_back(enums_value::kRadio);
result.push_back(enums_value::kSeat);
+ result.push_back(enums_value::kAudio);
+ result.push_back(enums_value::kLight);
+ result.push_back(enums_value::kHmiSettings);
return result;
}
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
index 4e2e4d7895..7eb298f024 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/resource_allocation_manager_impl_test.cc
@@ -71,7 +71,7 @@ const uint32_t kAppId1 = 11u;
const uint32_t kHMIAppId1 = 1u;
const uint32_t kAppId2 = 22u;
const std::string policy_app_id_1_ = "policy_id_1";
-const uint32_t kSizeOfModules = 3u;
+const uint32_t kSizeOfModules = 6u;
}
namespace rc_rpc_plugin_test {
diff --git a/src/components/application_manager/src/application_impl.cc b/src/components/application_manager/src/application_impl.cc
index a26418d917..bebf923234 100644
--- a/src/components/application_manager/src/application_impl.cc
+++ b/src/components/application_manager/src/application_impl.cc
@@ -314,6 +314,13 @@ const HmiStatePtr ApplicationImpl::RegularHmiState() const {
return state_.GetState(HmiState::STATE_ID_REGULAR);
}
+bool ApplicationImpl::IsAllowedToChangeAudioSource() const {
+ if (is_remote_control_supported() && is_media_application()) {
+ return true;
+ }
+ return false;
+}
+
const HmiStatePtr ApplicationImpl::PostponedHmiState() const {
return state_.GetState(HmiState::STATE_ID_POSTPONED);
}
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 9b936bdf41..ddb2a57862 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -2327,6 +2327,14 @@ void ApplicationManagerImpl::set_application_id(const int32_t correlation_id,
std::pair<const int32_t, const uint32_t>(correlation_id, app_id));
}
+uint32_t ApplicationManagerImpl::get_current_audio_source() const {
+ return current_audio_source_;
+}
+
+void ApplicationManagerImpl::set_current_audio_source(const uint32_t source) {
+ current_audio_source_ = source;
+}
+
void ApplicationManagerImpl::AddPolicyObserver(
policy::PolicyHandlerObserver* listener) {
GetPolicyHandler().add_listener(listener);
diff --git a/src/components/application_manager/src/hmi_state.cc b/src/components/application_manager/src/hmi_state.cc
index 0033fe4fb6..0e67967610 100644
--- a/src/components/application_manager/src/hmi_state.cc
+++ b/src/components/application_manager/src/hmi_state.cc
@@ -252,6 +252,9 @@ mobile_apis::HMILevel::eType AudioSource::hmi_level() const {
if (mobile_apis::HMILevel::HMI_NONE == parent()->hmi_level()) {
return mobile_apis::HMILevel::HMI_NONE;
}
+ if (mobile_apis::HMILevel::HMI_FULL == parent()->hmi_level()) {
+ return mobile_apis::HMILevel::HMI_FULL;
+ }
return mobile_apis::HMILevel::HMI_BACKGROUND;
}
diff --git a/src/components/application_manager/src/rpc_handler_impl.cc b/src/components/application_manager/src/rpc_handler_impl.cc
index bf1ff78d36..9c2aa497d6 100644
--- a/src/components/application_manager/src/rpc_handler_impl.cc
+++ b/src/components/application_manager/src/rpc_handler_impl.cc
@@ -267,7 +267,8 @@ bool RPCHandlerImpl::ConvertMessageToSO(
((output.validate(&report, msg_version) !=
smart_objects::Errors::OK))) {
LOG4CXX_WARN(logger_,
- "Failed to parse string to smart object :"
+ "Failed to parse string to smart object with API version "
+ << msg_version.toString() << " : "
<< message.json_message());
std::shared_ptr<smart_objects::SmartObject> response(
MessageHelper::CreateNegativeResponse(
diff --git a/src/components/application_manager/test/include/application_manager/mock_application.h b/src/components/application_manager/test/include/application_manager/mock_application.h
index 602d228147..ef27797e29 100644
--- a/src/components/application_manager/test/include/application_manager/mock_application.h
+++ b/src/components/application_manager/test/include/application_manager/mock_application.h
@@ -114,6 +114,7 @@ class MockApplication : public ::application_manager::Application {
MOCK_CONST_METHOD0(secondary_device, connection_handler::DeviceHandle());
MOCK_CONST_METHOD0(CurrentHmiState, const application_manager::HmiStatePtr());
MOCK_CONST_METHOD0(RegularHmiState, const application_manager::HmiStatePtr());
+ MOCK_CONST_METHOD0(IsAllowedToChangeAudioSource, bool());
MOCK_CONST_METHOD0(PostponedHmiState,
const application_manager::HmiStatePtr());
MOCK_METHOD1(set_tts_properties_in_none, void(bool active));
diff --git a/src/components/application_manager/test/state_controller/state_controller_test.cc b/src/components/application_manager/test/state_controller/state_controller_test.cc
index fd2503da33..3731848d89 100644
--- a/src/components/application_manager/test/state_controller/state_controller_test.cc
+++ b/src/components/application_manager/test/state_controller/state_controller_test.cc
@@ -64,6 +64,7 @@ using ::testing::_;
using ::testing::Return;
using ::testing::ReturnRef;
using ::testing::ReturnPointee;
+using ::testing::SaveArg;
using ::testing::Mock;
using ::testing::NiceMock;
using ::testing::InSequence;
@@ -2829,6 +2830,78 @@ TEST_F(StateControllerImplTest,
state_ctrl_->SetRegularState(navi_app_, hmi_state, true);
}
+TEST_F(StateControllerImplTest, OnEventChangedAudioSourceAppRemainInFull) {
+ const uint32_t app_id = simple_app_->app_id();
+ InsertApplication(simple_app_);
+ smart_objects::SmartObject msg;
+ msg[am::strings::msg_params][am::strings::app_id] = app_id;
+ msg[am::strings::msg_params][am::hmi_notification::is_active] = true;
+ msg[am::strings::msg_params][am::hmi_notification::event_name] =
+ hmi_apis::Common_EventTypes::AUDIO_SOURCE;
+
+ const hmi_apis::FunctionID::eType event_id =
+ hmi_apis::FunctionID::BasicCommunication_OnEventChanged;
+ am::event_engine::Event event(event_id);
+ event.set_smart_object(msg);
+
+ const HmiStatePtr state =
+ createHmiState(mobile_apis::HMILevel::HMI_FULL,
+ mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
+ mobile_apis::SystemContext::SYSCTXT_MAIN);
+ EXPECT_CALL(*simple_app_ptr_, RegularHmiState()).WillOnce(Return(state));
+ EXPECT_CALL(*simple_app_ptr_, IsAudioApplication())
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(*simple_app_ptr_, CurrentHmiState())
+ .WillOnce(Return(FullAudibleState()));
+
+ HmiStatePtr new_state;
+ EXPECT_CALL(*simple_app_ptr_, AddHMIState(_))
+ .WillOnce(SaveArg<0>(&new_state));
+
+ state_ctrl_->on_event(event);
+
+ EXPECT_EQ(new_state->hmi_level(), mobile_apis::HMILevel::HMI_FULL);
+ EXPECT_EQ(new_state->audio_streaming_state(),
+ mobile_apis::AudioStreamingState::NOT_AUDIBLE);
+}
+
+TEST_F(StateControllerImplTest, OnEventChangedAudioSourceAppToBackground) {
+ const uint32_t app_id = simple_app_->app_id();
+ InsertApplication(simple_app_);
+ smart_objects::SmartObject msg;
+ msg[am::strings::msg_params][am::strings::app_id] = app_id;
+ msg[am::strings::msg_params][am::hmi_notification::is_active] = true;
+ msg[am::strings::msg_params][am::hmi_notification::event_name] =
+ hmi_apis::Common_EventTypes::AUDIO_SOURCE;
+
+ const hmi_apis::FunctionID::eType event_id =
+ hmi_apis::FunctionID::BasicCommunication_OnEventChanged;
+ am::event_engine::Event event(event_id);
+ event.set_smart_object(msg);
+
+ const HmiStatePtr state =
+ createHmiState(mobile_apis::HMILevel::HMI_LIMITED,
+ mobile_apis::AudioStreamingState::AUDIBLE,
+ mobile_apis::VideoStreamingState::NOT_STREAMABLE,
+ mobile_apis::SystemContext::SYSCTXT_MAIN);
+ EXPECT_CALL(*simple_app_ptr_, RegularHmiState()).WillOnce(Return(state));
+ EXPECT_CALL(*simple_app_ptr_, IsAudioApplication())
+ .WillRepeatedly(Return(true));
+ EXPECT_CALL(*simple_app_ptr_, CurrentHmiState())
+ .WillOnce(Return(LimitedState()));
+
+ HmiStatePtr new_state;
+ EXPECT_CALL(*simple_app_ptr_, AddHMIState(_))
+ .WillOnce(SaveArg<0>(&new_state));
+
+ state_ctrl_->on_event(event);
+
+ EXPECT_EQ(new_state->hmi_level(), mobile_apis::HMILevel::HMI_BACKGROUND);
+ EXPECT_EQ(new_state->audio_streaming_state(),
+ mobile_apis::AudioStreamingState::NOT_AUDIBLE);
+}
+
TEST_F(StateControllerImplTest, OnEventOnAppDeactivatedIncorrectHmiLevel) {
smart_objects::SmartObject msg;
const uint32_t app_id = simple_app_->app_id();
diff --git a/src/components/include/application_manager/application_manager.h b/src/components/include/application_manager/application_manager.h
index 61095e388a..8397fbf790 100644
--- a/src/components/include/application_manager/application_manager.h
+++ b/src/components/include/application_manager/application_manager.h
@@ -239,6 +239,18 @@ class ApplicationManager {
*/
virtual void set_application_id(const int32_t correlation_id,
const uint32_t app_id) = 0;
+ /**
+ * @brief get_current_audio_source
+ * @return current audio source
+ */
+ virtual uint32_t get_current_audio_source() const = 0;
+
+ /**
+ * @brief set_current_audio_source
+ * @param source
+ * set current audio source
+ */
+ virtual void set_current_audio_source(const uint32_t source) = 0;
/**
* @brief OnHMILevelChanged the callback that allows SDL to react when
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 4a86c17f39..5900b760a6 100644
--- a/src/components/include/test/application_manager/mock_application_manager.h
+++ b/src/components/include/test/application_manager/mock_application_manager.h
@@ -318,6 +318,8 @@ class MockApplicationManager : public application_manager::ApplicationManager {
MOCK_CONST_METHOD1(IsAppInReconnectMode,
bool(const std::string& policy_app_id));
MOCK_CONST_METHOD0(GetCommandFactory, application_manager::CommandFactory&());
+ MOCK_CONST_METHOD0(get_current_audio_source, uint32_t());
+ MOCK_METHOD1(set_current_audio_source, void(const uint32_t));
};
} // namespace application_manager_test
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index da25d28369..47be1f5c6d 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -971,6 +971,8 @@
<description>Reflects the current primary audio source (if selected).</description>
<element name="NO_SOURCE_SELECTED">
</element>
+ <element name="CD">
+ </element>
<element name="USB">
</element>
<element name="USB2">
@@ -983,6 +985,9 @@
</element>
<element name="MOBILE_APP">
</element>
+ <element name="RADIO_TUNER">
+ <description>Radio may be on AM, FM or XM</description>
+ </element>
</enum>
<enum name="CompassDirection">
@@ -1581,6 +1586,9 @@
<element name="CLIMATE"/>
<element name="RADIO"/>
<element name="SEAT"/>
+ <element name="AUDIO"/>
+ <element name="LIGHT"/>
+ <element name="HMI_SETTINGS"/>
</enum>
<enum name="MassageZone">
@@ -1748,6 +1756,92 @@
<element name="NOT_FOUND"/>
</enum>
+ <struct name="StationIDNumber">
+ <param name="countryCode" type="Integer" minvalue="0" maxvalue="999" mandatory="false">
+ <description>Binary Representation of ITU Country Code. USA Code is 001.</description>
+ </param>
+ <param name="fccFacilityId" type="Integer" minvalue="0" maxvalue="999999" mandatory="false">
+ <description>Binary representation of unique facility ID assigned by the FCC; FCC controlled for U.S. territory</description>
+ </param>
+ </struct>
+
+ <struct name="GPSData">
+ <description>Struct with the GPS data.</description>
+ <param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180" mandatory="true">
+ </param>
+ <param name="latitudeDegrees" type="Float" minvalue="-90" maxvalue="90" mandatory="true">
+ </param>
+ <param name="utcYear" type="Integer" minvalue="2010" maxvalue="2100" mandatory="false">
+ <description>The current UTC year.</description>
+ </param>
+ <param name="utcMonth" type="Integer" minvalue="1" maxvalue="12" mandatory="false">
+ <description>The current UTC month.</description>
+ </param>
+ <param name="utcDay" type="Integer" minvalue="1" maxvalue="31" mandatory="false">
+ <description>The current UTC day.</description>
+ </param>
+ <param name="utcHours" type="Integer" minvalue="0" maxvalue="23" mandatory="false">
+ <description>The current UTC hour.</description>
+ </param>
+ <param name="utcMinutes" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
+ <description>The current UTC minute.</description>
+ </param>
+ <param name="utcSeconds" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
+ <description>The current UTC second.</description>
+ </param>
+ <param name="compassDirection" type="Common.CompassDirection" mandatory="false">
+ <description>See CompassDirection.</description>
+ </param>
+ <param name="pdop" type="Float" minvalue="0" maxvalue="1000" mandatory="false">
+ <description>PDOP.</description>
+ </param>
+ <param name="hdop" type="Float" minvalue="0" maxvalue="1000" mandatory="false">
+ <description>HDOP.</description>
+ </param>
+ <param name="vdop" type="Float" minvalue="0" maxvalue="1000" mandatory="false">
+ <description>VDOP.</description>
+ </param>
+ <param name="actual" type="Boolean" mandatory="false">
+ <description>
+ True, if actual.
+ False, if infered.
+ </description>
+ </param>
+ <param name="satellites" type="Integer" minvalue="0" maxvalue="31" mandatory="false">
+ <description>Number of satellites in view</description>
+ </param>
+ <param name="dimension" type="Common.Dimension" mandatory="false">
+ <description>See Dimension</description>
+ </param>
+ <param name="altitude" type="Float" minvalue="-10000" maxvalue="10000" mandatory="false">
+ <description>Altitude in meters</description>
+ </param>
+ <param name="heading" type="Float" minvalue="0" maxvalue="359.99" mandatory="false">
+ <description>The heading. North is 0. Resolution is 0.01</description>
+ </param>
+ <param name="speed" type="Float" minvalue="0" maxvalue="500" mandatory="false">
+ <description>The speed in KPH</description>
+ </param>
+ </struct>
+
+ <struct name="SisData">
+ <param name="stationShortName" type="String" minlength="4" maxlength="7" mandatory="false">
+ <description>Identifies the 4-alpha-character station call sign plus an optional (-FM) extension</description>
+ </param>
+ <param name="stationIDNumber" type="StationIDNumber" mandatory="false">
+ <description>Used for network Application. Consists of Country Code and FCC Facility ID.</description>
+ </param>
+ <param name="stationLongName" type="String" minlength="0" maxlength="56" mandatory="false">
+ <description>Identifies the station call sign or other identifying information in the long format.</description>
+ </param>
+ <param name="stationLocation" type="GPSData" mandatory="false">
+ <description>Provides the 3-dimensional geographic station location.</description>
+ </param>
+ <param name="stationMessage" type="String" minlength="0" maxlength="56" mandatory="false">
+ <description>May be used to convey textual information of general interest to the consumer such as weather forecasts or public service announcements. Includes a high priority delivery feature to convey emergencies that may be in the listening area.</description>
+ </param>
+ </struct>
+
<struct name="RadioControlData">
<param name="frequencyInteger" type="Integer" minvalue="0" maxvalue="1710" mandatory="false">
<description>The integer part of the frequency ie for 101.7 this value should be 101</description>
@@ -1775,6 +1869,9 @@
</param>
<param name="state" type="Common.RadioState" mandatory="false">
</param>
+ <param name="sisData" type="SisData" mandatory="false">
+ <description>Read-only Station Information Service (SIS) data provides basic information about the station such as call sign, as well as information not displayable to the consumer such as the station identification number</description>
+ </param>
</struct>
<struct name="RadioControlCapabilities">
@@ -1836,6 +1933,12 @@
True: Available, False: Not Available, Not present: Not Available.
</description>
</param>
+ <param name="sisDataAvailable" type="Boolean" mandatory="false">
+ <description>
+ Availability of the getting HD radio Station Information Service (SIS) data.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
</struct>
<enum name="DefrostZone">
@@ -1887,6 +1990,18 @@
</param>
<param name="ventilationMode" type="Common.VentilationMode" mandatory="false">
</param>
+ <param name="heatedSteeringWheelEnable" type="Boolean" mandatory="false">
+ <description>value false means disabled/turn off, value true means enabled/turn on.</description>
+ </param>
+ <param name="heatedWindshieldEnable" type="Boolean" mandatory="false">
+ <description>value false means disabled, value true means enabled.</description>
+ </param>
+ <param name="heatedRearWindowEnable" type="Boolean" mandatory="false">
+ <description>value false means disabled, value true means enabled.</description>
+ </param>
+ <param name="heatedMirrorsEnable" type="Boolean" mandatory="false">
+ <description>value false means disabled, value true means enabled.</description>
+ </param>
</struct>
<struct name="ClimateControlCapabilities">
@@ -1964,6 +2079,253 @@
A set of all ventilation modes that are controllable.
</description>
</param>
+ <param name="heatedSteeringWheelAvailable" type="Boolean" mandatory="false">
+ <description>
+ Availability of the control (enable/disable) of heated Steering Wheel.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
+ <param name="heatedWindshieldAvailable" type="Boolean" mandatory="false">
+ <description>
+ Availability of the control (enable/disable) of heated Windshield.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
+ <param name="heatedRearWindowAvailable" type="Boolean" mandatory="false">
+ <description>
+ Availability of the control (enable/disable) of heated Rear Window.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
+ <param name="heatedMirrorsAvailable" type="Boolean" mandatory="false">
+ <description>
+ Availability of the control (enable/disable) of heated Mirrors.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
+ </struct>
+
+ <struct name="EqualizerSettings">
+ <description>Defines the each Equalizer channel settings.</description>
+ <param name="channelId" type="Integer" minvalue="1" maxvalue="100" mandatory="true"></param>
+ <param name="channelName" type="String" mandatory="false" maxlength="50">
+ <description>read-only channel / frequency name (e.i. "Treble, Midrange, Bass" or "125 Hz")</description>
+ </param>
+ <param name="channelSetting" type="Integer" minvalue="0" maxvalue="100" mandatory="true"></param>
+ </struct>
+
+ <struct name="AudioControlData">
+ <param name="source" type="PrimaryAudioSource" mandatory="false">
+ <description>
+ In a getter response or a notification, it is the current primary audio source of the system.
+ In a setter request, it is the target audio source that the system shall switch to.
+ If the value is MOBILE_APP, the system shall switch to the mobile media app that issues the setter RPC.
+ </description>
+ </param>
+ <param name="keepContext" type="Boolean" mandatory="false">
+ <description>
+ This parameter shall not be present in any getter responses or notifications.
+ This parameter is optional in a setter request. The default value is false.
+ If it is false, the system not only changes the audio source but also brings the default application
+ or system UI associated with the audio source to foreground.
+ If it is true, the system changes the audio source, but still keeps the current application in foreground.
+ </description>
+ </param>
+ <param name="volume" type="Integer" mandatory="false" minvalue="0" maxvalue="100">
+ <description>Reflects the volume of audio, from 0%-100%.</description>
+ </param>
+ <param name="equalizerSettings" type="EqualizerSettings" minsize="1" maxsize="100" mandatory="false" array="true">
+ <description>Defines the list of supported channels (band) and their current/desired settings on HMI</description>
+ </param>
+ </struct>
+
+ <struct name="AudioControlCapabilities">
+ <param name="moduleName" type="String" maxlength="100" mandatory="true">
+ <description>
+ The short friendly name of the light control module.
+ It should not be used to identify a module by mobile application.
+ </description>
+ </param>
+ <param name="sourceAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of audio source. </description>
+ </param>
+ <param name="keepContextAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the keepContext paramter. </description>
+ </param>
+ <param name="volumeAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of audio volume.</description>
+ </param>
+ <param name="equalizerAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of Equalizer Settings.</description>
+ </param>
+ <param name="equalizerMaxChannelId" type="Integer" minvalue="1" maxvalue="100" mandatory="false">
+ <description>Must be included if equalizerAvailable=true, and assume all IDs starting from 1 to this value are valid</description>
+ </param>
+ </struct>
+
+
+ <struct name="RGBColor">
+ <param name="red" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ <param name="green" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ <param name="blue" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ </struct>
+
+ <enum name="LightName">
+ <!-- Common Single Light 0~500 -->
+ <element name="FRONT_LEFT_HIGH_BEAM" value="0"/>
+ <element name="FRONT_RIGHT_HIGH_BEAM" value="1"/>
+ <element name="FRONT_LEFT_LOW_BEAM" value="2"/>
+ <element name="FRONT_RIGHT_LOW_BEAM" value="3"/>
+ <element name="FRONT_LEFT_PARKING_LIGHT" value="4"/>
+ <element name="FRONT_RIGHT_PARKING_LIGHT" value="5"/>
+ <element name="FRONT_LEFT_FOG_LIGHT" value="6"/>
+ <element name="FRONT_RIGHT_FOG_LIGHT" value="7"/>
+ <element name="FRONT_LEFT_DAYTIME_RUNNING_LIGHT" value="8"/>
+ <element name="FRONT_RIGHT_DAYTIME_RUNNING_LIGHT" value="9"/>
+ <element name="FRONT_LEFT_TURN_LIGHT" value="10"/>
+ <element name="FRONT_RIGHT_TURN_LIGHT" value="11"/>
+ <element name="REAR_LEFT_FOG_LIGHT" value="12"/>
+ <element name="REAR_RIGHT_FOG_LIGHT" value="13"/>
+ <element name="REAR_LEFT_TAIL_LIGHT" value="14"/>
+ <element name="REAR_RIGHT_TAIL_LIGHT" value="15"/>
+ <element name="REAR_LEFT_BRAKE_LIGHT" value="16"/>
+ <element name="REAR_RIGHT_BRAKE_LIGHT" value="17"/>
+ <element name="REAR_LEFT_TURN_LIGHT" value="18"/>
+ <element name="REAR_RIGHT_TURN_LIGHT" value="19"/>
+ <element name="REAR_REGISTRATION_PLATE_LIGHT" value="20"/>
+
+ <!-- Exterior Lights by common function groups 501~800 -->
+ <element name="HIGH_BEAMS" value="501">
+ <description>Include all high beam lights: front_left and front_right.</description>
+ </element>
+ <element name="LOW_BEAMS" value="502">
+ <description>Include all low beam lights: front_left and front_right.</description>
+ </element>
+ <element name="FOG_LIGHTS" value="503">
+ <description>Include all fog lights: front_left, front_right, rear_left and rear_right.</description>
+ </element>
+ <element name="RUNNING_LIGHTS" value="504">
+ <description>Include all daytime running lights: front, left and right.</description>
+ </element>
+ <element name="PARKING_LIGHTS" value="505">
+ <description>Include all parking lights: front_left and front_right.</description>
+ </element>
+ <element name="BRAKE_LIGHTS" value="506">
+ <description>Include all brake lights: rear_left and rear_right.</description>
+ </element>
+ <element name="REAR_REVERSING_LIGHTS" value="507"/>
+ <element name="SIDE_MARKER_LIGHTS" value="508"/>
+ <element name="LEFT_TURN_LIGHTS" value="509">
+ <description>Include all left turn signal lights: front_left, rear_left, left_side and mirror_mounted.</description>
+ </element>
+ <element name="RIGHT_TURN_LIGHTS" value="510">
+ <description>Include all right turn signal lights: front_right, rear_right, right_side and mirror_mounted.</description>
+ </element>
+ <element name="HAZARD_LIGHTS" value="511">
+ <description>Include all hazard lights: front_left, front_right, rear_left and rear_right.</description>
+ </element>
+
+ <!-- Interior Lights by common function groups 801~900 -->
+ <element name="AMBIENT_LIGHTS" value="801"/>
+ <element name="OVERHEAD_LIGHTS" value="802"/>
+ <element name="READING_LIGHTS" value="803"/>
+ <element name="TRUNK_LIGHTS" value="804"/>
+
+ <!-- Lights by location 901~1000-->
+ <element name="EXTERIOR_FRONT_LIGHTS" value="901">
+ <description>Include exterior lights located in front of the vehicle. For example, fog lights and low beams.</description>
+ </element>
+ <element name="EXTERIOR_REAR_LIGHTS" value="902">
+ <description>Include exterior lights located at the back of the vehicle. For example, license plate lights, reverse lights, cargo lights, bed lights an trailer assist lights.</description>
+ </element>
+ <element name="EXTERIOR_LEFT_LIGHTS" value="903">
+ <description>Include exterior lights located at the left side of the vehicle. For example, left puddle lights and spot lights.</description>
+ </element>
+ <element name="EXTERIOR_RIGHT_LIGHTS" value="904">
+ <description>Include exterior lights located at the right side of the vehicle. For example, right puddle lights and spot lights.</description>
+ </element>
+ </enum>
+
+ <enum name="LightStatus">
+ <element name="ON"/>
+ <element name="OFF"/>
+ </enum>
+
+ <struct name="LightCapabilities">
+ <param name="name" type="LightName" mandatory="true" />
+ <!-- Assuming light ON/OFF status is always available -->
+ <param name="densityAvailable" type="Boolean" mandatory="false">
+ <description>
+ Indicates if the light's density can be set remotely (similar to a dimmer).
+ </description>
+ </param>
+ <param name="rgbColorSpaceAvailable" type="Boolean" mandatory="false">
+ <description>
+ Indicates if the light's color can be set remotely by using the RGB color space.
+ </description>
+ </param>
+ </struct>
+
+ <struct name="LightControlCapabilities">
+ <param name="moduleName" type="String" maxlength="100" mandatory="true">
+ <description>
+ The short friendly name of the light control module.
+ It should not be used to identify a module by mobile application.
+ </description>
+ </param>
+ <param name="supportedLights" type="LightCapabilities" minsize="1" maxsize="100" array="true" mandatory="true">
+ <description> An array of available light names that are controllable. </description>
+ </param>
+ </struct>
+
+ <struct name="LightState">
+ <param name="id" type="LightName" mandatory="true">
+ <description>The name of a light or a group of lights. </description>
+ </param>
+ <param name="status" type="LightStatus" mandatory="true"/>
+ <param name="density" type="Float" minvalue="0" maxvalue="1" mandatory="false" />
+ <param name="color" type="RGBColor" mandatory="false" />
+ </struct>
+
+ <struct name="LightControlData">
+ <param name="lightState" type="LightState" mandatory="true" minsize="1" maxsize="100" array="true">
+ <description>An array of LightNames and their current or desired status. No change to the status of the LightNames that are not listed in the array.</description>
+ </param>
+ </struct>
+
+ <enum name="DisplayMode">
+ <element name="DAY"/>
+ <element name="NIGHT"/>
+ <element name="AUTO"/>
+ </enum>
+ <enum name="DistanceUnit">
+ <element name="MILES"/>
+ <element name="KILOMETERS"/>
+ </enum>
+
+ <struct name="HMISettingsControlData">
+ <description>Corresponds to "HMI_SETTINGS" ModuleType</description>
+ <param name="displayMode" type="DisplayMode" mandatory="false"></param>
+ <param name="temperatureUnit" type="TemperatureUnit" mandatory="false"></param>
+ <param name="distanceUnit" type="DistanceUnit" mandatory="false"></param>
+ </struct>
+
+ <struct name="HMISettingsControlCapabilities">
+ <param name="moduleName" type="String" maxlength="100" mandatory="true">
+ <description>
+ The short friendly name of the hmi setting module.
+ It should not be used to identify a module by mobile application.
+ </description>
+ </param>
+ <param name="distanceUnitAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of distance unit. </description>
+ </param>
+ <param name="temperatureUnitAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of temperature unit. </description>
+ </param>
+ <param name="displayModeUnitAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of HMI display mode. </description>
+ </param>
</struct>
<struct name="ModuleData">
@@ -1976,13 +2338,19 @@
</param>
<param name="seatControlData" type="SeatControlData" mandatory="false">
</param>
+ <param name="audioControlData" type="AudioControlData" mandatory="false">
+ </param>
+ <param name="lightControlData" type="LightControlData" mandatory="false">
+ </param>
+ <param name="hmiSettingsControlData" type="HMISettingsControlData" mandatory="false">
+ </param>
</struct>
<enum name="RCAccessMode">
- <description>Enumeration that describes possible remote control access mode the application might be in on HU.</description>
- <element name="AUTO_ALLOW"/>
- <element name="AUTO_DENY"/>
- <element name="ASK_DRIVER"/>
+ <description>Enumeration that describes possible remote control access mode the application might be in on HU.</description>
+ <element name="AUTO_ALLOW"/>
+ <element name="AUTO_DENY"/>
+ <element name="ASK_DRIVER"/>
</enum>
<!-- End Remote Control -->
@@ -2122,11 +2490,6 @@
</param>
</struct>
-<struct name="RGBColor">
- <param name="red" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
- <param name="green" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
- <param name="blue" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
-</struct>
<struct name="TemplateColorScheme">
<description>
@@ -2497,65 +2860,6 @@
</element>
</enum>
-<struct name="GPSData">
- <description>Struct with the GPS data.</description>
- <param name="longitudeDegrees" type="Float" minvalue="-180" maxvalue="180" mandatory="true">
- </param>
- <param name="latitudeDegrees" type="Float" minvalue="-90" maxvalue="90" mandatory="true">
- </param>
- <param name="utcYear" type="Integer" minvalue="2010" maxvalue="2100" mandatory="false">
- <description>The current UTC year.</description>
- </param>
- <param name="utcMonth" type="Integer" minvalue="1" maxvalue="12" mandatory="false">
- <description>The current UTC month.</description>
- </param>
- <param name="utcDay" type="Integer" minvalue="1" maxvalue="31" mandatory="false">
- <description>The current UTC day.</description>
- </param>
- <param name="utcHours" type="Integer" minvalue="0" maxvalue="23" mandatory="false">
- <description>The current UTC hour.</description>
- </param>
- <param name="utcMinutes" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
- <description>The current UTC minute.</description>
- </param>
- <param name="utcSeconds" type="Integer" minvalue="0" maxvalue="59" mandatory="false">
- <description>The current UTC second.</description>
- </param>
- <param name="compassDirection" type="Common.CompassDirection" mandatory="false">
- <description>See CompassDirection.</description>
- </param>
- <param name="pdop" type="Float" minvalue="0" maxvalue="1000" mandatory="false">
- <description>PDOP.</description>
- </param>
- <param name="hdop" type="Float" minvalue="0" maxvalue="1000" mandatory="false">
- <description>HDOP.</description>
- </param>
- <param name="vdop" type="Float" minvalue="0" maxvalue="1000" mandatory="false">
- <description>VDOP.</description>
- </param>
- <param name="actual" type="Boolean" mandatory="false">
- <description>
- True, if actual.
- False, if infered.
- </description>
- </param>
- <param name="satellites" type="Integer" minvalue="0" maxvalue="31" mandatory="false">
- <description>Number of satellites in view</description>
- </param>
- <param name="dimension" type="Common.Dimension" mandatory="false">
- <description>See Dimension</description>
- </param>
- <param name="altitude" type="Float" minvalue="-10000" maxvalue="10000" mandatory="false">
- <description>Altitude in meters</description>
- </param>
- <param name="heading" type="Float" minvalue="0" maxvalue="359.99" mandatory="false">
- <description>The heading. North is 0. Resolution is 0.01</description>
- </param>
- <param name="speed" type="Float" minvalue="0" maxvalue="500" mandatory="false">
- <description>The speed in KPH</description>
- </param>
-</struct>
-
<struct name="SingleTireStatus">
<param name="status" type="Common.ComponentVolumeStatus" mandatory="true">
<description>The status of component volume. See ComponentVolumeStatus.</description>
@@ -2945,10 +3249,19 @@
<param name="buttonCapabilities" type="ButtonCapabilities" mandatory="false" minsize="1" maxsize="100" array="true" >
<description>If included, the platform supports RC button controls with the included button names.</description >
</param>
- <param name="seatControlCapabilities" type="SeatControlCapabilities" mandatory="false" minsize="1" maxsize="100" array="true">
- <description>
- If included, the platform supports seat controls.
- </description >
+ <param name="seatControlCapabilities" type="SeatControlCapabilities" mandatory="false" minsize="1" maxsize="100" array="true">
+ <description>
+ If included, the platform supports seat controls.
+ </description >
+ </param>
+ <param name="audioControlCapabilities" type="AudioControlCapabilities" mandatory="false" minsize="1" maxsize="100" array="true">
+ <description> If included, the platform supports audio controls. </description >
+ </param>
+ <param name="hmiSettingsControlCapabilities" type="HMISettingsControlCapabilities" mandatory="false">
+ <description> If included, the platform supports hmi setting controls. </description >
+ </param>
+ <param name="lightControlCapabilities" type="LightControlCapabilities" mandatory="false">
+ <description> If included, the platform supports light controls. </description >
</param>
</struct>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index fa4df2dd4a..ec8e1f1847 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -1322,6 +1322,8 @@
<description>Reflects the current primary audio source (if selected).</description>
<element name="NO_SOURCE_SELECTED">
</element>
+ <element name="CD" since="5.0">
+ </element>
<element name="USB">
</element>
<element name="USB2">
@@ -1334,6 +1336,9 @@
</element>
<element name="MOBILE_APP">
</element>
+ <element name="RADIO_TUNER" since="5.0">
+ <description>Radio may be on AM, FM or XM</description>
+ </element>
</enum>
<enum name="WiperStatus" since="2.0">
@@ -1407,6 +1412,9 @@
<element name="CLIMATE"/>
<element name="RADIO"/>
<element name="SEAT" since="5.0"/>
+ <element name="AUDIO" since="5.0"/>
+ <element name="LIGHT" since="5.0"/>
+ <element name="HMI_SETTINGS" since="5.0"/>
</enum>
<enum name="DefrostZone" since="4.5">
@@ -2803,6 +2811,27 @@
<description>True if the system can utilize the haptic spatial data from the source being streamed. If not included, it can be assumed the module doesn't support haptic spatial data'. </description>
</param>
</struct>
+
+ <struct name="RGBColor" since="5.0">
+ <param name="red" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ <param name="green" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ <param name="blue" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
+ </struct>
+
+ <struct name="TemplateColorScheme" since="5.0">
+ <description>
+ A color scheme for all display layout templates.
+ </description>
+ <param name="primaryColor" type="RGBColor" mandatory="false">
+ <description>The primary "accent" color</description>
+ </param>
+ <param name="secondaryColor" type="RGBColor" mandatory="false">
+ <description>The secondary "accent" color</description>
+ </param>
+ <param name="backgroundColor" type="RGBColor" mandatory="false">
+ <description>The color of the background</description>
+ </param>
+ </struct>
<!---Remote control -->
@@ -2966,6 +2995,33 @@
<description>Region</description>
</param>
</struct>
+
+ <struct name="StationIDNumber" since="5.0">
+ <param name="countryCode" type="Integer" minvalue="0" maxvalue="999" mandatory="false">
+ <description>Binary Representation of ITU Country Code. USA Code is 001.</description>
+ </param>
+ <param name="fccFacilityId" type="Integer" minvalue="0" maxvalue="999999" mandatory="false">
+ <description>Binary representation of unique facility ID assigned by the FCC; FCC controlled for U.S. territory</description>
+ </param>
+ </struct>
+
+ <struct name="SisData" since="5.0">
+ <param name="stationShortName" type="String" minlength="4" maxlength="7" mandatory="false">
+ <description>Identifies the 4-alpha-character station call sign plus an optional (-FM) extension</description>
+ </param>
+ <param name="stationIDNumber" type="StationIDNumber" mandatory="false">
+ <description>Used for network Application. Consists of Country Code and FCC Facility ID.</description>
+ </param>
+ <param name="stationLongName" type="String" minlength="0" maxlength="56" mandatory="false">
+ <description>Identifies the station call sign or other identifying information in the long format.</description>
+ </param>
+ <param name="stationLocation" type="GPSData" mandatory="false">
+ <description>Provides the 3-dimensional geographic station location.</description>
+ </param>
+ <param name="stationMessage" type="String" minlength="0" maxlength="56" mandatory="false">
+ <description>May be used to convey textual information of general interest to the consumer such as weather forecasts or public service announcements. Includes a high priority delivery feature to convey emergencies that may be in the listening area.</description>
+ </param>
+ </struct>
<struct name="RadioControlData" since="4.5">
<param name="frequencyInteger" type="Integer" minvalue="0" maxvalue="1710" mandatory="false">
@@ -2994,6 +3050,9 @@
</param>
<param name="state" type="RadioState" mandatory="false">
</param>
+ <param name="sisData" type="SisData" mandatory="false" since="5.0">
+ <description>Read-only Station Information Service (SIS) data provides basic information about the station such as call sign, as well as information not displayable to the consumer such as the station identification number</description>
+ </param>
</struct>
<struct name="ClimateControlData" since="4.5">
@@ -3017,6 +3076,18 @@
</param>
<param name="ventilationMode" type="VentilationMode" mandatory="false">
</param>
+ <param name="heatedSteeringWheelEnable" type="Boolean" mandatory="false" since="5.0">
+ <description>value false means disabled/turn off, value true means enabled/turn on.</description>
+ </param>
+ <param name="heatedWindshieldEnable" type="Boolean" mandatory="false" since="5.0">
+ <description>value false means disabled, value true means enabled.</description>
+ </param>
+ <param name="heatedRearWindowEnable" type="Boolean" mandatory="false" since="5.0">
+ <description>value false means disabled, value true means enabled.</description>
+ </param>
+ <param name="heatedMirrorsEnable" type="Boolean" mandatory="false" since="5.0">
+ <description>value false means disabled, value true means enabled.</description>
+ </param>
</struct>
<struct name="RadioControlCapabilities" since="4.5">
@@ -3082,6 +3153,12 @@
True: Available, False: Not Available, Not present: Not Available.
</description>
</param>
+ <param name="sisDataAvailable" type="Boolean" mandatory="false" since="5.0">
+ <description>
+ Availability of the getting HD radio Station Information Service (SIS) data.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
</struct>
<struct name="ClimateControlCapabilities" since="4.5">
@@ -3155,6 +3232,246 @@
A set of all ventilation modes that are controllable.
</description>
</param>
+ <param name="heatedSteeringWheelAvailable" type="Boolean" mandatory="false" since="5.0">
+ <description>
+ Availability of the control (enable/disable) of heated Steering Wheel.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
+ <param name="heatedWindshieldAvailable" type="Boolean" mandatory="false" since="5.0">
+ <description>
+ Availability of the control (enable/disable) of heated Windshield.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
+ <param name="heatedRearWindowAvailable" type="Boolean" mandatory="false" since="5.0">
+ <description>
+ Availability of the control (enable/disable) of heated Rear Window.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
+ <param name="heatedMirrorsAvailable" type="Boolean" mandatory="false" since="5.0">
+ <description>
+ Availability of the control (enable/disable) of heated Mirrors.
+ True: Available, False: Not Available, Not present: Not Available.
+ </description>
+ </param>
+ </struct>
+
+ <struct name="EqualizerSettings" since="5.0">
+ <description>Defines the each Equalizer channel settings.</description>
+ <param name="channelId" type="Integer" minvalue="1" maxvalue="100" mandatory="true"></param>
+ <param name="channelName" type="String" mandatory="false" maxlength="50">
+ <description>read-only channel / frequency name (e.i. "Treble, Midrange, Bass" or "125 Hz")</description>
+ </param>
+ <param name="channelSetting" type="Integer" minvalue="0" maxvalue="100" mandatory="true"></param>
+ </struct>
+
+ <struct name="AudioControlData" since="5.0">
+ <param name="source" type="PrimaryAudioSource" mandatory="false">
+ <description>
+ In a getter response or a notification, it is the current primary audio source of the system.
+ In a setter request, it is the target audio source that the system shall switch to.
+ If the value is MOBILE_APP, the system shall switch to the mobile media app that issues the setter RPC.
+ </description>
+ </param>
+ <param name="keepContext" type="Boolean" mandatory="false">
+ <description>
+ This parameter shall not be present in any getter responses or notifications.
+ This parameter is optional in a setter request. The default value is false.
+ If it is false, the system not only changes the audio source but also brings the default application
+ or system UI associated with the audio source to foreground.
+ If it is true, the system changes the audio source, but still keeps the current application in foreground.
+ </description>
+ </param>
+ <param name="volume" type="Integer" mandatory="false" minvalue="0" maxvalue="100">
+ <description>Reflects the volume of audio, from 0%-100%.</description>
+ </param>
+ <param name="equalizerSettings" type="EqualizerSettings" minsize="1" maxsize="100" mandatory="false" array="true">
+ <description>Defines the list of supported channels (band) and their current/desired settings on HMI</description>
+ </param>
+ </struct>
+
+ <struct name="AudioControlCapabilities" since="5.0">
+ <param name="moduleName" type="String" maxlength="100" mandatory="true">
+ <description>
+ The short friendly name of the light control module.
+ It should not be used to identify a module by mobile application.
+ </description>
+ </param>
+ <param name="sourceAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of audio source. </description>
+ </param>
+ <param name="keepContextAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the keepContext paramter. </description>
+ </param>
+ <param name="volumeAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of audio volume.</description>
+ </param>
+ <param name="equalizerAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of Equalizer Settings.</description>
+ </param>
+ <param name="equalizerMaxChannelId" type="Integer" minvalue="1" maxvalue="100" mandatory="false">
+ <description>Must be included if equalizerAvailable=true, and assume all IDs starting from 1 to this value are valid</description>
+ </param>
+ </struct>
+
+ <enum name="LightName" since="5.0">
+ <!-- Common Single Light 0~500 -->
+ <element name="FRONT_LEFT_HIGH_BEAM" value="0"/>
+ <element name="FRONT_RIGHT_HIGH_BEAM" value="1"/>
+ <element name="FRONT_LEFT_LOW_BEAM" value="2"/>
+ <element name="FRONT_RIGHT_LOW_BEAM" value="3"/>
+ <element name="FRONT_LEFT_PARKING_LIGHT" value="4"/>
+ <element name="FRONT_RIGHT_PARKING_LIGHT" value="5"/>
+ <element name="FRONT_LEFT_FOG_LIGHT" value="6"/>
+ <element name="FRONT_RIGHT_FOG_LIGHT" value="7"/>
+ <element name="FRONT_LEFT_DAYTIME_RUNNING_LIGHT" value="8"/>
+ <element name="FRONT_RIGHT_DAYTIME_RUNNING_LIGHT" value="9"/>
+ <element name="FRONT_LEFT_TURN_LIGHT" value="10"/>
+ <element name="FRONT_RIGHT_TURN_LIGHT" value="11"/>
+ <element name="REAR_LEFT_FOG_LIGHT" value="12"/>
+ <element name="REAR_RIGHT_FOG_LIGHT" value="13"/>
+ <element name="REAR_LEFT_TAIL_LIGHT" value="14"/>
+ <element name="REAR_RIGHT_TAIL_LIGHT" value="15"/>
+ <element name="REAR_LEFT_BRAKE_LIGHT" value="16"/>
+ <element name="REAR_RIGHT_BRAKE_LIGHT" value="17"/>
+ <element name="REAR_LEFT_TURN_LIGHT" value="18"/>
+ <element name="REAR_RIGHT_TURN_LIGHT" value="19"/>
+ <element name="REAR_REGISTRATION_PLATE_LIGHT" value="20"/>
+
+ <!-- Exterior Lights by common function groups 501~800 -->
+ <element name="HIGH_BEAMS" value="501">
+ <description>Include all high beam lights: front_left and front_right.</description>
+ </element>
+ <element name="LOW_BEAMS" value="502">
+ <description>Include all low beam lights: front_left and front_right.</description>
+ </element>
+ <element name="FOG_LIGHTS" value="503">
+ <description>Include all fog lights: front_left, front_right, rear_left and rear_right.</description>
+ </element>
+ <element name="RUNNING_LIGHTS" value="504">
+ <description>Include all daytime running lights: front, left and right.</description>
+ </element>
+ <element name="PARKING_LIGHTS" value="505">
+ <description>Include all parking lights: front_left and front_right.</description>
+ </element>
+ <element name="BRAKE_LIGHTS" value="506">
+ <description>Include all brake lights: rear_left and rear_right.</description>
+ </element>
+ <element name="REAR_REVERSING_LIGHTS" value="507"/>
+ <element name="SIDE_MARKER_LIGHTS" value="508"/>
+ <element name="LEFT_TURN_LIGHTS" value="509">
+ <description>Include all left turn signal lights: front_left, rear_left, left_side and mirror_mounted.</description>
+ </element>
+ <element name="RIGHT_TURN_LIGHTS" value="510">
+ <description>Include all right turn signal lights: front_right, rear_right, right_side and mirror_mounted.</description>
+ </element>
+ <element name="HAZARD_LIGHTS" value="511">
+ <description>Include all hazard lights: front_left, front_right, rear_left and rear_right.</description>
+ </element>
+
+ <!-- Interior Lights by common function groups 801~900 -->
+ <element name="AMBIENT_LIGHTS" value="801"/>
+ <element name="OVERHEAD_LIGHTS" value="802"/>
+ <element name="READING_LIGHTS" value="803"/>
+ <element name="TRUNK_LIGHTS" value="804"/>
+
+ <!-- Lights by location 901~1000-->
+ <element name="EXTERIOR_FRONT_LIGHTS" value="901">
+ <description>Include exterior lights located in front of the vehicle. For example, fog lights and low beams.</description>
+ </element>
+ <element name="EXTERIOR_REAR_LIGHTS" value="902">
+ <description>Include exterior lights located at the back of the vehicle. For example, license plate lights, reverse lights, cargo lights, bed lights an trailer assist lights.</description>
+ </element>
+ <element name="EXTERIOR_LEFT_LIGHTS" value="903">
+ <description>Include exterior lights located at the left side of the vehicle. For example, left puddle lights and spot lights.</description>
+ </element>
+ <element name="EXTERIOR_RIGHT_LIGHTS" value="904">
+ <description>Include exterior lights located at the right side of the vehicle. For example, right puddle lights and spot lights.</description>
+ </element>
+ </enum>
+
+ <enum name="LightStatus" since="5.0">
+ <element name="ON"/>
+ <element name="OFF"/>
+ </enum>
+
+ <struct name="LightCapabilities" since="5.0">
+ <param name="name" type="LightName" mandatory="true" />
+ <!-- Assuming light ON/OFF status is always available -->
+ <param name="densityAvailable" type="Boolean" mandatory="false">
+ <description>
+ Indicates if the light's density can be set remotely (similar to a dimmer).
+ </description>
+ </param>
+ <param name="rgbColorSpaceAvailable" type="Boolean" mandatory="false">
+ <description>
+ Indicates if the light's color can be set remotely by using the RGB color space.
+ </description>
+ </param>
+ </struct>
+
+ <struct name="LightControlCapabilities" since="5.0">
+ <param name="moduleName" type="String" maxlength="100" mandatory="true">
+ <description>
+ The short friendly name of the light control module.
+ It should not be used to identify a module by mobile application.
+ </description>
+ </param>
+ <param name="supportedLights" type="LightCapabilities" minsize="1" maxsize="100" array="true" mandatory="true">
+ <description> An array of available light names that are controllable. </description>
+ </param>
+ </struct>
+
+ <struct name="LightState" since="5.0">
+ <param name="id" type="LightName" mandatory="true">
+ <description>The name of a light or a group of lights. </description>
+ </param>
+ <param name="status" type="LightStatus" mandatory="true"/>
+ <param name="density" type="Float" minvalue="0" maxvalue="1" mandatory="false" />
+ <param name="color" type="RGBColor" mandatory="false" />
+ </struct>
+
+ <struct name="LightControlData" since="5.0">
+ <param name="lightState" type="LightState" mandatory="true" minsize="1" maxsize="100" array="true">
+ <description>An array of LightNames and their current or desired status. No change to the status of the LightNames that are not listed in the array.</description>
+ </param>
+ </struct>
+
+ <enum name="DisplayMode" since="5.0">
+ <element name="DAY"/>
+ <element name="NIGHT"/>
+ <element name="AUTO"/>
+ </enum>
+ <enum name="DistanceUnit" since="5.0">
+ <element name="MILES"/>
+ <element name="KILOMETERS"/>
+ </enum>
+
+ <struct name="HMISettingsControlData" since="5.0">
+ <description>Corresponds to "HMI_SETTINGS" ModuleType</description>
+ <param name="displayMode" type="DisplayMode" mandatory="false"></param>
+ <param name="temperatureUnit" type="TemperatureUnit" mandatory="false"></param>
+ <param name="distanceUnit" type="DistanceUnit" mandatory="false"></param>
+ </struct>
+
+ <struct name="HMISettingsControlCapabilities" since="5.0">
+ <param name="moduleName" type="String" maxlength="100" mandatory="true">
+ <description>
+ The short friendly name of the hmi setting module.
+ It should not be used to identify a module by mobile application.
+ </description>
+ </param>
+ <param name="distanceUnitAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of distance unit. </description>
+ </param>
+ <param name="temperatureUnitAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of temperature unit. </description>
+ </param>
+ <param name="displayModeUnitAvailable" type="Boolean" mandatory="false">
+ <description>Availability of the control of HMI display mode. </description>
+ </param>
</struct>
<struct name="ModuleData" since="4.5">
@@ -3167,6 +3484,12 @@
</param>
<param name="seatControlData" type="SeatControlData" mandatory="false" since="5.0">
</param>
+ <param name="audioControlData" type="AudioControlData" mandatory="false" since="5.0">
+ </param>
+ <param name="lightControlData" type="LightControlData" mandatory="false" since="5.0">
+ </param>
+ <param name="hmiSettingsControlData" type="HMISettingsControlData" mandatory="false" since="5.0">
+ </param>
</struct>
<struct name="RemoteControlCapabilities" since="4.5">
@@ -3184,6 +3507,15 @@
If included, the platform supports seat controls.
</description >
</param>
+ <param name="audioControlCapabilities" type="AudioControlCapabilities" mandatory="false" minsize="1" maxsize="100" array="true" since="5.0">
+ <description> If included, the platform supports audio controls. </description >
+ </param>
+ <param name="hmiSettingsControlCapabilities" type="HMISettingsControlCapabilities" mandatory="false" since="5.0">
+ <description> If included, the platform supports hmi setting controls. </description >
+ </param>
+ <param name="lightControlCapabilities" type="LightControlCapabilities" mandatory="false" since="5.0">
+ <description> If included, the platform supports light controls. </description >
+ </param>
</struct>
<!-- End of RC -->
@@ -3244,7 +3576,7 @@
<description>The data in this field describes the current humidity value.</description>
</element>
</enum>
-
+
<struct name="MetadataTags" since="4.5">
<param name="mainField1" type="MetadataType" minsize="0" maxsize="5" array="true" mandatory="false">
<description>The type of data contained in the "mainField1" text field.</description>
@@ -3274,7 +3606,7 @@
<description>The height of the rectangle</description>
</param>
</struct>
-
+
<struct name="HapticRect" since="4.5">
<description>Defines haptic data for each user control object for video streaming application</description>
<param name="id" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
@@ -3284,27 +3616,7 @@
<description>The position of the haptic rectangle to be highlighted. The center of this rectangle will be "touched" when a press occurs.</description>
</param>
</struct>
-
- <struct name="RGBColor" since="5.0">
- <param name="red" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
- <param name="green" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
- <param name="blue" type="Integer" minvalue="0" maxvalue="255" mandatory="true" />
- </struct>
-
- <struct name="TemplateColorScheme" since="5.0">
- <description>
- A color scheme for all display layout templates.
- </description>
- <param name="primaryColor" type="RGBColor" mandatory="false">
- <description>The primary "accent" color</description>
- </param>
- <param name="secondaryColor" type="RGBColor" mandatory="false">
- <description>The secondary "accent" color</description>
- </param>
- <param name="backgroundColor" type="RGBColor" mandatory="false">
- <description>The color of the background</description>
- </param>
- </struct>
+
<!-- Requests/Responses -->
<function name="RegisterAppInterface" functionID="RegisterAppInterfaceID" messagetype="request" since="1.0">
diff --git a/src/components/policy/policy_external/include/policy/policy_table/enums.h b/src/components/policy/policy_external/include/policy/policy_table/enums.h
index d13c545a94..5fc43603d8 100644
--- a/src/components/policy/policy_external/include/policy/policy_table/enums.h
+++ b/src/components/policy/policy_external/include/policy/policy_table/enums.h
@@ -167,7 +167,14 @@ bool IsValidEnum(Input val);
const char* EnumToJsonString(Input val);
bool EnumFromJsonString(const std::string& literal, Input* result);
-enum ModuleType { MT_CLIMATE, MT_RADIO, MT_SEAT };
+enum ModuleType {
+ MT_CLIMATE,
+ MT_RADIO,
+ MT_SEAT,
+ MT_AUDIO,
+ MT_LIGHT,
+ MT_HMI_SETTINGS
+};
bool IsValidEnum(ModuleType val);
const char* EnumToJsonString(ModuleType val);
bool EnumFromJsonString(const std::string& literal, ModuleType* result);
diff --git a/src/components/policy/policy_external/src/policy_table/enums.cc b/src/components/policy/policy_external/src/policy_table/enums.cc
index 58bae43000..c2b304df67 100644
--- a/src/components/policy/policy_external/src/policy_table/enums.cc
+++ b/src/components/policy/policy_external/src/policy_table/enums.cc
@@ -771,6 +771,12 @@ bool IsValidEnum(ModuleType val) {
return true;
case MT_RADIO:
return true;
+ case MT_AUDIO:
+ return true;
+ case MT_LIGHT:
+ return true;
+ case MT_HMI_SETTINGS:
+ return true;
case MT_SEAT:
return true;
default:
@@ -783,6 +789,12 @@ const char* EnumToJsonString(ModuleType val) {
return "CLIMATE";
case MT_RADIO:
return "RADIO";
+ case MT_AUDIO:
+ return "AUDIO";
+ case MT_LIGHT:
+ return "LIGHT";
+ case MT_HMI_SETTINGS:
+ return "HMI_SETTINGS";
case MT_SEAT:
return "SEAT";
default:
@@ -800,6 +812,15 @@ bool EnumFromJsonString(const std::string& literal, ModuleType* result) {
} else if ("SEAT" == literal) {
*result = MT_SEAT;
return true;
+ } else if ("AUDIO" == literal) {
+ *result = MT_AUDIO;
+ return true;
+ } else if ("LIGHT" == literal) {
+ *result = MT_LIGHT;
+ return true;
+ } else if ("HMI_SETTINGS" == literal) {
+ *result = MT_HMI_SETTINGS;
+ return true;
} else {
return false;
}
diff --git a/src/components/policy/policy_regular/include/policy/policy_table/enums.h b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
index 8d81a742e4..4107fad398 100644
--- a/src/components/policy/policy_regular/include/policy/policy_table/enums.h
+++ b/src/components/policy/policy_regular/include/policy/policy_table/enums.h
@@ -153,7 +153,14 @@ bool IsValidEnum(Input val);
const char* EnumToJsonString(Input val);
bool EnumFromJsonString(const std::string& literal, Input* result);
-enum ModuleType { MT_CLIMATE, MT_RADIO, MT_SEAT };
+enum ModuleType {
+ MT_CLIMATE,
+ MT_RADIO,
+ MT_SEAT,
+ MT_AUDIO,
+ MT_LIGHT,
+ MT_HMI_SETTINGS
+};
bool IsValidEnum(ModuleType val);
const char* EnumToJsonString(ModuleType val);
bool EnumFromJsonString(const std::string& literal, ModuleType* result);
diff --git a/src/components/policy/policy_regular/src/policy_table/enums.cc b/src/components/policy/policy_regular/src/policy_table/enums.cc
index 2f5ba69ad7..83ace2feb2 100644
--- a/src/components/policy/policy_regular/src/policy_table/enums.cc
+++ b/src/components/policy/policy_regular/src/policy_table/enums.cc
@@ -643,6 +643,12 @@ bool IsValidEnum(ModuleType val) {
return true;
case MT_SEAT:
return true;
+ case MT_AUDIO:
+ return true;
+ case MT_LIGHT:
+ return true;
+ case MT_HMI_SETTINGS:
+ return true;
default:
return false;
}
@@ -655,6 +661,12 @@ const char* EnumToJsonString(ModuleType val) {
return "RADIO";
case MT_SEAT:
return "SEAT";
+ case MT_AUDIO:
+ return "AUDIO";
+ case MT_LIGHT:
+ return "LIGHT";
+ case MT_HMI_SETTINGS:
+ return "HMI_SETTINGS";
default:
return "";
}
@@ -670,9 +682,17 @@ bool EnumFromJsonString(const std::string& literal, ModuleType* result) {
} else if ("SEAT" == literal) {
*result = MT_SEAT;
return true;
- } else {
- return false;
+ } else if ("AUDIO" == literal) {
+ *result = MT_AUDIO;
+ return true;
+ } else if ("LIGHT" == literal) {
+ *result = MT_LIGHT;
+ return true;
+ } else if ("HMI_SETTINGS" == literal) {
+ *result = MT_HMI_SETTINGS;
+ return true;
}
+ return false;
}
const std::string kDefaultApp = "default";