summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/appMain/hmi_capabilities.json870
-rw-r--r--src/components/remote_control/src/commands/set_interior_vehicle_data_request.cc29
2 files changed, 569 insertions, 330 deletions
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json
index 58b1883884..46a94f2af5 100755
--- a/src/appMain/hmi_capabilities.json
+++ b/src/appMain/hmi_capabilities.json
@@ -340,338 +340,566 @@
"phoneCapability": {
"dialNumberEnabled": true
},
- "videoStreamingCapability": {
- "preferredResolution": {
- "resolutionWidth": 800,
- "resolutionHeight": 350
- },
- "maxBitrate": 10000,
- "supportedFormats": [
+ "remoteControlCapability": {
+ "climateControlCapabilities": [
{
- "protocol": "RAW",
- "codec": "H264"
+ "moduleName": "primary_climate",
+ "fanSpeedAvailable": true,
+ "desiredTemperatureAvailable": true,
+ "currentTemperatureAvailable": true,
+ "acEnableAvailable": true,
+ "acMaxEnableAvailable": true,
+ "circulateAirEnableAvailable": true,
+ "autoModeEnableAvailable": true,
+ "dualModeEnableAvailable": true,
+ "defrostZoneAvailable": true,
+ "ventilationModeAvailable": true,
+ "defrostZone": [
+ "FRONT",
+ "REAR",
+ "ALL",
+ "NONE"
+ ],
+ "ventilationMode": [
+ "UPPER",
+ "LOWER",
+ "BOTH",
+ "NONE"
+ ]
}
],
- "remoteControlCapability": {
- "climateControlCapabilities": [
- {
- "moduleName": "primary_climate",
- "fanSpeedAvailable": true,
- "desiredTemperatureAvailable": true,
- "acEnableAvailable": true,
- "acMaxEnableAvailable": true,
- "circulateAirEnableAvailable": true,
- "autoModeEnableAvailable": true,
- "dualModeEnableAvailable": true,
- "defrostZoneAvailable": true,
- "ventilationModeAvailable": true,
- "defrostZone": [
- "FRONT",
- "REAR",
- "ALL",
- "NONE"
- ],
- "ventilationMode": [
- "UPPER",
- "LOWER",
- "BOTH",
- "NONE"
- ]
- }
- ],
- "radioControlCapabilities": [
- {
- "moduleName": "radio",
- "radioEnableAvailable": true,
- "radioBandAvailable": true,
- "radioFrequencyAvailable": true,
- "hdChannelAvailable": true,
- "rdsDataAvailable": true,
- "availableHDsAvailable": true,
- "stateAvailable": true,
- "signalStrengthAvailable": true,
- "signalChangeThresholdAvailable": true
- }
- ],
- "buttonCapabilities": [
- {
- "name": "AC_MAX",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "AC",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "RECIRCULATE",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "FAN_UP",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "FAN_DOWN",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "TEMP_UP",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "TEMP_DOWN",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "DEFROST_MAX",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "DEFROST",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "DEFROST_REAR",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "UPPER_VENT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "LOWER_VENT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "VOLUME_UP",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "VOLUME_DOWN",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "EJECT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "SOURCE",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "SHUFFLE",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- },
- {
- "name": "REPEAT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": false
- }
- ]
- }
+ "radioControlCapabilities": [
+ {
+ "moduleName": "radio",
+ "radioEnableAvailable": true,
+ "radioBandAvailable": true,
+ "radioFrequencyAvailable": true,
+ "hdChannelAvailable": true,
+ "rdsDataAvailable": true,
+ "availableHDsAvailable": true,
+ "stateAvailable": true,
+ "signalStrengthAvailable": true,
+ "signalChangeThresholdAvailable": true
+ }
+ ],
+ "buttonCapabilities": [
+ {
+ "name": "AC_MAX",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "AC",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "RECIRCULATE",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "FAN_UP",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "FAN_DOWN",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "TEMP_UP",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "TEMP_DOWN",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "DEFROST_MAX",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "DEFROST",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "DEFROST_REAR",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "UPPER_VENT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "LOWER_VENT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "VOLUME_UP",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "VOLUME_DOWN",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "EJECT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "SOURCE",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "SHUFFLE",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "REPEAT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ }
+ ]
}
},
- "VR": {
- "capabilities": [
- "TEXT"
- ],
- "language": "EN-US",
- "languages": [
- "EN-US",
- "ES-MX",
- "FR-CA",
- "DE-DE",
- "ES-ES",
- "EN-GB",
- "RU-RU",
- "TR-TR",
- "PL-PL",
- "FR-FR",
- "IT-IT",
- "SV-SE",
- "PT-PT",
- "NL-NL",
- "ZH-TW",
- "JA-JP",
- "AR-SA",
- "KO-KR",
- "PT-BR",
- "CS-CZ",
- "DA-DK",
- "NO-NO"
- ]
+ "mediaClockFormats": [
+ "CLOCK1",
+ "CLOCK2",
+ "CLOCK3",
+ "CLOCKTEXT1",
+ "CLOCKTEXT2",
+ "CLOCKTEXT3",
+ "CLOCKTEXT4"
+ ],
+ "graphicSupported": true,
+ "templatesAvailable": [
+ "DEFAULT",
+ "MEDIA",
+ "NON-MEDIA",
+ "ONSCREEN_PRESETS",
+ "NAV_FULLSCREEN_MAP",
+ "NAV_KEYBOARD",
+ "GRAPHIC_WITH_TEXT",
+ "TEXT_WITH_GRAPHIC",
+ "TILES_ONLY",
+ "TEXTBUTTONS_ONLY",
+ "GRAPHIC_WITH_TILES",
+ "TILES_WITH_GRAPHIC",
+ "GRAPHIC_WITH_TEXT_AND_SOFTBUTTONS",
+ "TEXT_AND_SOFTBUTTONS_WITH_GRAPHIC",
+ "GRAPHIC_WITH_TEXTBUTTONS",
+ "TEXTBUTTONS_WITH_GRAPHIC",
+ "LARGE_GRAPHIC_WITH_SOFTBUTTONS",
+ "DOUBLE_GRAPHIC_WITH_SOFTBUTTONS",
+ "LARGE_GRAPHIC_ONLY"
+ ],
+ "screenParams": {
+ "resolution": {
+ "resolutionWidth": 800,
+ "resolutionHeight": 350
+ },
+ "touchEventAvailable": {
+ "pressAvailable": true,
+ "multiTouchAvailable": false,
+ "doublePressAvailable": false
+ }
},
- "TTS": {
- "capabilities": [
- "TEXT"
- ],
- "language": "EN-US",
- "languages": [
- "EN-US",
- "ES-MX",
- "FR-CA",
- "DE-DE",
- "ES-ES",
- "EN-GB",
- "RU-RU",
- "TR-TR",
- "PL-PL",
- "FR-FR",
- "IT-IT",
- "SV-SE",
- "PT-PT",
- "NL-NL",
- "ZH-TW",
- "JA-JP",
- "AR-SA",
- "KO-KR",
- "PT-BR",
- "CS-CZ",
- "DA-DK",
- "NO-NO"
- ]
+ "numCustomPresetsAvailable": 8,
+ "imageCapabilities": [
+ "DYNAMIC",
+ "STATIC"
+ ]
+ },
+ "audioPassThruCapabilities": {
+ "samplingRate": "44KHZ",
+ "bitsPerSample": "RATE_8_BIT",
+ "audioType": "PCM"
+ },
+ "pcmStreamCapabilities": {
+ "samplingRate": "16KHZ",
+ "bitsPerSample": "RATE_16_BIT",
+ "audioType": "PCM"
+ },
+ "hmiZoneCapabilities": "FRONT",
+ "softButtonCapabilities": [
+ {
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true,
+ "imageSupported": true
+ }
+ ],
+ "systemCapabilities": {
+ "navigationCapability": {
+ "sendLocationEnabled": true,
+ "getWayPointsEnabled": true
},
- "Buttons": {
- "capabilities": [
- {
- "name": "PRESET_0",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_1",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_2",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_3",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_4",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_5",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_6",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_7",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_8",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "PRESET_9",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "OK",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "SEEKLEFT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "SEEKRIGHT",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
- {
- "name": "TUNEUP",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
- },
+ "phoneCapability": {
+ "dialNumberEnabled": true
+ },
+ "videoStreamingCapability": {
+ "preferredResolution": {
+ "resolutionWidth": 800,
+ "resolutionHeight": 350
+ },
+ "maxBitrate": 10000,
+ "supportedFormats": [
{
- "name": "TUNEDOWN",
- "shortPressAvailable": true,
- "longPressAvailable": true,
- "upDownAvailable": true
+ "protocol": "RAW",
+ "codec": "H264"
}
],
- "presetBankCapabilities": {
- "onScreenPresetsAvailable": true
+ "remoteControlCapability": {
+ "climateControlCapabilities": [
+ {
+ "moduleName": "primary_climate",
+ "fanSpeedAvailable": true,
+ "desiredTemperatureAvailable": true,
+ "acEnableAvailable": true,
+ "acMaxEnableAvailable": true,
+ "circulateAirEnableAvailable": true,
+ "autoModeEnableAvailable": true,
+ "dualModeEnableAvailable": true,
+ "defrostZoneAvailable": true,
+ "ventilationModeAvailable": true,
+ "defrostZone": [
+ "FRONT",
+ "REAR",
+ "ALL",
+ "NONE"
+ ],
+ "ventilationMode": [
+ "UPPER",
+ "LOWER",
+ "BOTH",
+ "NONE"
+ ]
+ }
+ ],
+ "radioControlCapabilities": [
+ {
+ "moduleName": "radio",
+ "radioEnableAvailable": true,
+ "radioBandAvailable": true,
+ "radioFrequencyAvailable": true,
+ "hdChannelAvailable": true,
+ "rdsDataAvailable": true,
+ "availableHDsAvailable": true,
+ "stateAvailable": true,
+ "signalStrengthAvailable": true,
+ "signalChangeThresholdAvailable": true
+ }
+ ],
+ "buttonCapabilities": [
+ {
+ "name": "AC_MAX",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "AC",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "RECIRCULATE",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "FAN_UP",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "FAN_DOWN",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "TEMP_UP",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "TEMP_DOWN",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "DEFROST_MAX",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "DEFROST",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "DEFROST_REAR",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "UPPER_VENT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "LOWER_VENT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "VOLUME_UP",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "VOLUME_DOWN",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "EJECT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "SOURCE",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "SHUFFLE",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ },
+ {
+ "name": "REPEAT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": false
+ }
+ ]
}
- },
- "VehicleInfo": {
- "make": "Ford",
- "model": "Fiesta",
- "modelYear": "2013",
- "trim": "SE"
- },
- "SyncMessageVersion": {
- "majorVersion": 3,
- "minorVersion": 0
}
+ },
+ "VR": {
+ "capabilities": [
+ "TEXT"
+ ],
+ "language": "EN-US",
+ "languages": [
+ "EN-US",
+ "ES-MX",
+ "FR-CA",
+ "DE-DE",
+ "ES-ES",
+ "EN-GB",
+ "RU-RU",
+ "TR-TR",
+ "PL-PL",
+ "FR-FR",
+ "IT-IT",
+ "SV-SE",
+ "PT-PT",
+ "NL-NL",
+ "ZH-TW",
+ "JA-JP",
+ "AR-SA",
+ "KO-KR",
+ "PT-BR",
+ "CS-CZ",
+ "DA-DK",
+ "NO-NO"
+ ]
+ },
+ "TTS": {
+ "capabilities": [
+ "TEXT"
+ ],
+ "language": "EN-US",
+ "languages": [
+ "EN-US",
+ "ES-MX",
+ "FR-CA",
+ "DE-DE",
+ "ES-ES",
+ "EN-GB",
+ "RU-RU",
+ "TR-TR",
+ "PL-PL",
+ "FR-FR",
+ "IT-IT",
+ "SV-SE",
+ "PT-PT",
+ "NL-NL",
+ "ZH-TW",
+ "JA-JP",
+ "AR-SA",
+ "KO-KR",
+ "PT-BR",
+ "CS-CZ",
+ "DA-DK",
+ "NO-NO"
+ ]
+ },
+ "Buttons": {
+ "capabilities": [
+ {
+ "name": "PRESET_0",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "PRESET_1",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "PRESET_2",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "PRESET_3",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "PRESET_4",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "PRESET_5",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "PRESET_6",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "PRESET_7",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "PRESET_8",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "PRESET_9",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "OK",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "SEEKLEFT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "SEEKRIGHT",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "TUNEUP",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ },
+ {
+ "name": "TUNEDOWN",
+ "shortPressAvailable": true,
+ "longPressAvailable": true,
+ "upDownAvailable": true
+ }
+ ],
+ "presetBankCapabilities": {
+ "onScreenPresetsAvailable": true
+ }
+ },
+ "VehicleInfo": {
+ "make": "Ford",
+ "model": "Fiesta",
+ "modelYear": "2013",
+ "trim": "SE"
+ },
+ "SyncMessageVersion": {
+ "majorVersion": 3,
+ "minorVersion": 0
}
} \ No newline at end of file
diff --git a/src/components/remote_control/src/commands/set_interior_vehicle_data_request.cc b/src/components/remote_control/src/commands/set_interior_vehicle_data_request.cc
index ce62750cc9..5f121636cf 100644
--- a/src/components/remote_control/src/commands/set_interior_vehicle_data_request.cc
+++ b/src/components/remote_control/src/commands/set_interior_vehicle_data_request.cc
@@ -83,6 +83,7 @@ const std::map<std::string, std::string> GetModuleDataToCapabilitiesMapping() {
mapping["availableHDs"] = "availableHDsAvailable";
mapping["hdChannel"] = "availableHDsAvailable";
mapping["signalStrength"] = "signalStrengthAvailable";
+ mapping["signalChangeThreshold"] = "signalChangeThresholdAvailable";
mapping["radioEnable"] = "radioEnableAvailable";
mapping["state"] = "stateAvailable";
@@ -108,9 +109,15 @@ bool CheckControlDataByCapabilities(
Json::Value::Members::const_iterator it = control_data_keys.begin();
for (; it != control_data_keys.end(); ++it) {
- const std::string& caps_key = mapping[*it];
- DCHECK_OR_RETURN(module_caps.keyExists(caps_key), false);
- if (!module_caps[caps_key].asBool()) {
+ const std::string& request_parameter = *it;
+ const std::string& caps_key = mapping[request_parameter];
+ const smart_objects::SmartObject& capabilities_status = module_caps[0];
+ LOG4CXX_DEBUG(logger_,
+ "Checking request parameter "
+ << request_parameter
+ << " with capabilities. Appropriate key is " << caps_key);
+ DCHECK_OR_RETURN(capabilities_status.keyExists(caps_key), false);
+ if (!capabilities_status[caps_key].asBool()) {
return false;
}
}
@@ -120,20 +127,24 @@ bool CheckControlDataByCapabilities(
bool CheckIfModuleDataExistInCapabilities(
const smart_objects::SmartObject& rc_capabilities,
const Json::Value& module_data) {
- if (rc_capabilities.keyExists(strings::kradioControlCapabilities)) {
+ bool is_radio_data_valid = true;
+ bool is_climate_data_valid = true;
+ if (IsMember(module_data, kRadioControlData) &&
+ rc_capabilities.keyExists(strings::kradioControlCapabilities)) {
const smart_objects::SmartObject& radio_caps =
rc_capabilities[strings::kradioControlCapabilities];
- return CheckControlDataByCapabilities(
+ is_radio_data_valid = CheckControlDataByCapabilities(
radio_caps, module_data[strings::kRadioControlData]);
}
- if (rc_capabilities.keyExists(strings::kclimateControlCapabilities)) {
+ if (IsMember(module_data, kClimateControlData) &&
+ rc_capabilities.keyExists(strings::kclimateControlCapabilities)) {
const smart_objects::SmartObject& climate_caps =
rc_capabilities[strings::kclimateControlCapabilities];
- return CheckControlDataByCapabilities(
+ is_climate_data_valid = CheckControlDataByCapabilities(
climate_caps, module_data[strings::kClimateControlData]);
}
- DCHECK(false && "Module Data does not contains control data");
- return true;
+
+ return is_radio_data_valid && is_climate_data_valid;
}
void SetInteriorVehicleDataRequest::Execute() {