diff options
author | Shobhit Adlakha <ShobhitAd@users.noreply.github.com> | 2019-09-27 09:40:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-27 09:40:37 -0400 |
commit | ec63b3b2b379ab0fe62ef74c628605ff719bc682 (patch) | |
tree | b077cd49b7d5fed4b0752124fc2f3aa12137ceaa | |
parent | e3568868766b54f06e9c5b30b498679acacaa574 (diff) | |
download | sdl_core-ec63b3b2b379ab0fe62ef74c628605ff719bc682.tar.gz |
Fix/Set mandatory=false for optional response params (#3052)
* Set mandatory=false for all response params(other than resultCode and success) in the MOBILE_API
* Add moduleData key check in RCHelpers::RemoveRedundantGPSDataFromIVDataMsg
-rw-r--r-- | src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc | 3 | ||||
-rw-r--r-- | src/components/interfaces/MOBILE_API.xml | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc index 8cf20948cf..ca0edc90b1 100644 --- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc +++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/rc_helpers.cc @@ -257,6 +257,9 @@ void RCHelpers::RemoveRedundantGPSDataFromIVDataMsg( using namespace application_manager::strings; LOG4CXX_AUTO_TRACE(logger_); + if (!msg_params.keyExists(kModuleData)) { + return; + } auto& module_data = msg_params[kModuleData]; if (!module_data.keyExists(kRadioControlData) || !module_data[kRadioControlData].keyExists(kSisData) || diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml index 2307dada03..dd8cefe71a 100644 --- a/src/components/interfaces/MOBILE_API.xml +++ b/src/components/interfaces/MOBILE_API.xml @@ -6529,7 +6529,7 @@ <description>Provides additional human readable info regarding the result.</description> </param> - <param name="ecuHeader" type="Integer" minvalue="0" maxvalue="65535" mandatory="true"> + <param name="ecuHeader" type="Integer" minvalue="0" maxvalue="65535" mandatory="false"> <description>2 byte ECU Header for DTC response (as defined in VHR_Layout_Specification_DTCs.pdf)</description> </param> @@ -6584,7 +6584,7 @@ <description>Provides additional human readable info regarding the result.</description> </param> - <param name="messageDataResult" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="true"> + <param name="messageDataResult" type="Integer" minvalue="0" maxvalue="255" minsize="1" maxsize="65535" array="true" mandatory="false"> <description> Array of bytes comprising CAN message result. </description> @@ -7438,7 +7438,7 @@ </function> <function name="GetInteriorVehicleData" functionID="GetInteriorVehicleDataID" messagetype="response" since="4.5"> - <param name="moduleData" type="ModuleData" mandatory="true"> + <param name="moduleData" type="ModuleData" mandatory="false"> </param> <param name="resultCode" type="Result" platform="documentation" mandatory="true"> <description>See Result</description> @@ -7540,7 +7540,7 @@ <function name="SetInteriorVehicleData" functionID="SetInteriorVehicleDataID" messagetype="response" since="4.5"> <description>Used to set the values of one remote control module </description> - <param name="moduleData" type="ModuleData" mandatory="true"> + <param name="moduleData" type="ModuleData" mandatory="false"> </param> <param name="resultCode" type="Result" platform="documentation" mandatory="true"> <description>See Result</description> @@ -7656,7 +7656,7 @@ </function> <function name="GetSystemCapability" functionID="GetSystemCapabilityID" messagetype="response" since="4.5"> - <param name="systemCapability" type="SystemCapability" mandatory="true"> + <param name="systemCapability" type="SystemCapability" mandatory="false"> </param> <param name="resultCode" type="Result" platform="documentation" mandatory="true"> <description>See Result</description> |