summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLivio <jack@livio.io>2018-05-21 16:12:10 -0400
committerGitHub <noreply@github.com>2018-05-21 16:12:10 -0400
commitc1e28509134b7931f64c5beeb655d5b104f0bcd8 (patch)
tree493f6bfb44434d0080175271f2e74ef7dacb0951
parent88569298b44899d31e57fac3a059aa17b816ccd3 (diff)
parent85f11be01d76770707efb350544676438e7fcf66 (diff)
downloadsdl_core-c1e28509134b7931f64c5beeb655d5b104f0bcd8.tar.gz
Merge branch 'develop' into feature/new_vehicle_data_fuel_rangefeature/new_vehicle_data_fuel_range
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt63
-rw-r--r--src/appMain/CMakeLists.txt4
-rwxr-xr-xsrc/appMain/hmi_capabilities.json13
-rw-r--r--src/appMain/sdl_preloaded_pt.json4
-rw-r--r--src/components/application_manager/include/application_manager/request_controller.h7
-rw-r--r--src/components/application_manager/include/application_manager/smart_object_keys.h1
-rw-r--r--src/components/application_manager/src/hmi_capabilities_impl.cc3
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc3
-rw-r--r--src/components/application_manager/src/request_controller.cc35
-rw-r--r--src/components/application_manager/src/smart_object_keys.cc1
-rw-r--r--src/components/application_manager/test/commands/mobile/slider_test.cc5
-rw-r--r--src/components/application_manager/test/hmi_capabilities.json10
-rw-r--r--src/components/application_manager/test/request_controller/request_controller_test.cc36
-rw-r--r--src/components/application_manager/test/sdl_preloaded_pt.json4
-rw-r--r--src/components/application_manager/test/sdl_pt_update.json4
-rw-r--r--src/components/interfaces/HMI_API.xml24
-rw-r--r--src/components/interfaces/MOBILE_API.xml28
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table/enums.h1
-rw-r--r--src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml1
-rw-r--r--src/components/policy/policy_external/src/policy_table/enums.cc7
-rw-r--r--src/components/policy/policy_external/test/json/PTU.json4
-rw-r--r--src/components/policy/policy_external/test/json/PTU2.json4
-rw-r--r--src/components/policy/policy_external/test/json/PTU3.json4
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json4
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json4
-rw-r--r--src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json4
-rw-r--r--src/components/policy/policy_external/test/json/PTU_without_requestType_field.json4
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json4
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json4
-rw-r--r--src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json4
-rw-r--r--src/components/policy/policy_external/test/json/ptu2_requestType.json4
-rw-r--r--src/components/policy/policy_external/test/json/ptu_requestType.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_first_update.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_second_update.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_pt_update.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json4
-rw-r--r--src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json4
-rw-r--r--src/components/policy/policy_external/test/json/valid_sdl_pt_update.json4
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_table/enums.h1
-rw-r--r--src/components/policy/policy_regular/policy_table_interface_ext.xml1
-rw-r--r--src/components/policy/policy_regular/src/policy_table/enums.cc7
-rw-r--r--src/components/policy/policy_regular/test/PTU.json4
-rw-r--r--src/components/policy/policy_regular/test/PTU2.json4
-rw-r--r--src/components/policy/policy_regular/test/PTU3.json4
-rw-r--r--src/components/policy/policy_regular/test/PTU4.json4
-rw-r--r--src/components/policy/policy_regular/test/ptu2_requestType.json4
-rw-r--r--src/components/policy/policy_regular/test/ptu_requestType.json4
-rw-r--r--src/components/policy/policy_regular/test/sdl_preloaded_pt.json4
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_first_update.json4
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_second_update.json4
-rw-r--r--src/components/policy/policy_regular/test/sdl_pt_update.json4
-rw-r--r--src/components/policy/policy_regular/test/valid_sdl_pt_update.json4
-rw-r--r--src/components/security_manager/src/crypto_manager_impl.cc5
-rw-r--r--src/components/security_manager/test/ssl_context_test.cc59
-rw-r--r--src/components/utils/src/file_system.cc25
64 files changed, 444 insertions, 57 deletions
diff --git a/.gitignore b/.gitignore
index c552e22d6c..ec291473fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ CMakeCache.txt
CMakeFiles/
*.pyc
.idea
+src/appMain/build_config.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 450a9192f3..49959597a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -163,6 +163,65 @@ endif()
#Jenkins integration section end
+#Deliver Build Configuration
+
+set(build_config_path "src/appMain/build_config.txt")
+FILE(WRITE "${build_config_path}" "")
+
+get_property(cHelpString CACHE EXTENDED_POLICY PROPERTY HELPSTRING)
+get_property(cType CACHE EXTENDED_POLICY PROPERTY TYPE)
+get_property(cValue CACHE EXTENDED_POLICY PROPERTY VALUE)
+file(APPEND "${build_config_path}" "//${cHelpString}\n")
+file(APPEND "${build_config_path}" "EXTENDED_POLICY:${cType}=${cValue}\n\n")
+
+get_property(cHelpString CACHE REMOTE_CONTROL PROPERTY HELPSTRING)
+get_property(cType CACHE REMOTE_CONTROL PROPERTY TYPE)
+get_property(cValue CACHE REMOTE_CONTROL PROPERTY VALUE)
+file(APPEND "${build_config_path}" "//${cHelpString}\n")
+file(APPEND "${build_config_path}" "REMOTE_CONTROL:${cType}=${cValue}\n\n")
+
+get_property(cHelpString CACHE BUILD_BT_SUPPORT PROPERTY HELPSTRING)
+get_property(cType CACHE BUILD_BT_SUPPORT PROPERTY TYPE)
+get_property(cValue CACHE BUILD_BT_SUPPORT PROPERTY VALUE)
+file(APPEND "${build_config_path}" "//${cHelpString}\n")
+file(APPEND "${build_config_path}" "BUILD_BT_SUPPORT:${cType}=${cValue}\n\n")
+
+get_property(cHelpString CACHE BUILD_USB_SUPPORT PROPERTY HELPSTRING)
+get_property(cType CACHE BUILD_USB_SUPPORT PROPERTY TYPE)
+get_property(cValue CACHE BUILD_USB_SUPPORT PROPERTY VALUE)
+file(APPEND "${build_config_path}" "//${cHelpString}\n")
+file(APPEND "${build_config_path}" "BUILD_USB_SUPPORT:${cType}=${cValue}\n\n")
+
+get_property(cHelpString CACHE ENABLE_SECURITY PROPERTY HELPSTRING)
+get_property(cType CACHE ENABLE_SECURITY PROPERTY TYPE)
+get_property(cValue CACHE ENABLE_SECURITY PROPERTY VALUE)
+file(APPEND "${build_config_path}" "//${cHelpString}\n")
+file(APPEND "${build_config_path}" "ENABLE_SECURITY:${cType}=${cValue}\n\n")
+
+get_property(cHelpString CACHE EXTENDED_MEDIA_MODE PROPERTY HELPSTRING)
+get_property(cType CACHE EXTENDED_MEDIA_MODE PROPERTY TYPE)
+get_property(cValue CACHE EXTENDED_MEDIA_MODE PROPERTY VALUE)
+file(APPEND "${build_config_path}" "//${cHelpString}\n")
+file(APPEND "${build_config_path}" "EXTENDED_MEDIA_MODE:${cType}=${cValue}\n\n")
+
+get_property(cHelpString CACHE TELEMETRY_MONITOR PROPERTY HELPSTRING)
+get_property(cType CACHE TELEMETRY_MONITOR PROPERTY TYPE)
+get_property(cValue CACHE TELEMETRY_MONITOR PROPERTY VALUE)
+file(APPEND "${build_config_path}" "//${cHelpString}\n")
+file(APPEND "${build_config_path}" "TELEMETRY_MONITOR:${cType}=${cValue}\n\n")
+
+get_property(cHelpString CACHE HMI PROPERTY HELPSTRING)
+get_property(cType CACHE HMI PROPERTY TYPE)
+get_property(cValue CACHE HMI PROPERTY VALUE)
+file(APPEND "${build_config_path}" "//${cHelpString}\n")
+file(APPEND "${build_config_path}" "HMI:${cType}=${cValue}\n\n")
+
+get_property(cHelpString CACHE ENABLE_HMI_PTU_DECRYPTION PROPERTY HELPSTRING)
+get_property(cType CACHE ENABLE_HMI_PTU_DECRYPTION PROPERTY TYPE)
+get_property(cValue CACHE ENABLE_HMI_PTU_DECRYPTION PROPERTY VALUE)
+file(APPEND "${build_config_path}" "//${cHelpString}\n")
+file(APPEND "${build_config_path}" "ENABLE_HMI_PTU_DECRYPTION:${cType}=${cValue}\n")
+
add_custom_target(pasa-tarball
COMMAND ${CMAKE_SOURCE_DIR}/tools/Utils/export-customer-specific.sh ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} pasa
COMMAND tar -cz -C /tmp/PASA -f ${CMAKE_BINARY_DIR}/pasa.tar.gz .
@@ -180,7 +239,6 @@ add_custom_target(genivi-tarball
COMMAND tar -cz -C /tmp/GENIVI -f ${CMAKE_BINARY_DIR}/genivi.tar.gz .
)
-
project (${PROJECT})
#ADD_DEPENDENCIES(${PROJECT} Policy)
@@ -445,5 +503,4 @@ find_package(Doxygen)
message(STATUS "sudo apt-get install doxygen graphviz")
message(STATUS "To enable processing of MscGen comments please install mscgen")
message(STATUS "sudo apt-get install mscgen")
-endif()
-
+endif() \ No newline at end of file
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index 514867624a..2acc0bf3ae 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -154,7 +154,7 @@ endif()
target_link_libraries(${PROJECT} ${LIBRARIES})
add_dependencies(${PROJECT} Policy)
-
+file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/build_config.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/audio.8bit.wav DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
@@ -212,7 +212,7 @@ endif ()
# Install rules
install(TARGETS ${PROJECT} DESTINATION bin)
install(
- FILES log4cxx.properties audio.8bit.wav test.txt smartDeviceLink.ini
+ FILES build_config.txt log4cxx.properties audio.8bit.wav test.txt smartDeviceLink.ini
hmi_capabilities.json sdl_preloaded_pt.json sample_policy_manager.py
${CMAKE_SOURCE_DIR}/mycert.pem ${CMAKE_SOURCE_DIR}/mykey.pem
DESTINATION bin
diff --git a/src/appMain/hmi_capabilities.json b/src/appMain/hmi_capabilities.json
index bef4d1e896..8b61df1b31 100755
--- a/src/appMain/hmi_capabilities.json
+++ b/src/appMain/hmi_capabilities.json
@@ -226,9 +226,15 @@
},
{
"name": "graphic",
- "imageTypeSupported": [
-
- ],
+ "imageTypeSupported": [],
+ "imageResolution": {
+ "resolutionWidth": 35,
+ "resolutionHeight": 35
+ }
+ },
+ {
+ "name": "secondaryGraphic",
+ "imageTypeSupported": [],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
@@ -251,7 +257,6 @@
],
"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",
diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json
index 7a0c57e2e7..1b3f2b0ff5 100644
--- a/src/appMain/sdl_preloaded_pt.json
+++ b/src/appMain/sdl_preloaded_pt.json
@@ -397,6 +397,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -415,6 +416,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -433,6 +435,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -450,6 +453,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/application_manager/include/application_manager/request_controller.h b/src/components/application_manager/include/application_manager/request_controller.h
index d3a5a0b821..c0bae1aac8 100644
--- a/src/components/application_manager/include/application_manager/request_controller.h
+++ b/src/components/application_manager/include/application_manager/request_controller.h
@@ -289,6 +289,13 @@ class RequestController {
*/
std::list<RequestPtr> notification_list_;
+ /**
+ * @brief Map keeping track of how many duplicate messages were sent for a
+ * given correlation id, to prevent early termination of a request
+ */
+ std::map<uint32_t, uint32_t> duplicate_message_count_;
+ sync_primitives::Lock duplicate_message_count_lock_;
+
/*
* timer for checking requests timeout
*/
diff --git a/src/components/application_manager/include/application_manager/smart_object_keys.h b/src/components/application_manager/include/application_manager/smart_object_keys.h
index 7809e5c542..382f7d11a0 100644
--- a/src/components/application_manager/include/application_manager/smart_object_keys.h
+++ b/src/components/application_manager/include/application_manager/smart_object_keys.h
@@ -275,6 +275,7 @@ extern const char* remote_control;
extern const char* sdl_version;
extern const char* system_software_version;
extern const char* priority;
+extern const char* engine_oil_life;
// resuming
extern const char* application_commands;
diff --git a/src/components/application_manager/src/hmi_capabilities_impl.cc b/src/components/application_manager/src/hmi_capabilities_impl.cc
index e39b728155..278e4761db 100644
--- a/src/components/application_manager/src/hmi_capabilities_impl.cc
+++ b/src/components/application_manager/src/hmi_capabilities_impl.cc
@@ -282,6 +282,9 @@ void InitCapabilities() {
image_field_name_enum.insert(std::make_pair(
std::string("graphic"), hmi_apis::Common_ImageFieldName::graphic));
image_field_name_enum.insert(
+ std::make_pair(std::string("secondaryGraphic"),
+ hmi_apis::Common_ImageFieldName::secondaryGraphic));
+ image_field_name_enum.insert(
std::make_pair(std::string("showConstantTBTIcon"),
hmi_apis::Common_ImageFieldName::showConstantTBTIcon));
image_field_name_enum.insert(std::make_pair(
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index 229c49d63d..59552c6900 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -219,7 +219,8 @@ std::pair<std::string,
mobile_apis::VehicleDataType::VEHICLEDATA_ACCPEDAL),
std::make_pair(strings::steering_wheel_angle,
mobile_apis::VehicleDataType::VEHICLEDATA_STEERINGWHEEL),
-};
+ std::make_pair(strings::engine_oil_life,
+ mobile_apis::VehicleDataType::VEHICLEDATA_ENGINEOILLIFE)};
const VehicleData MessageHelper::vehicle_data_(
kVehicleDataInitializer,
diff --git a/src/components/application_manager/src/request_controller.cc b/src/components/application_manager/src/request_controller.cc
index 1b9bd7ffb9..f341967842 100644
--- a/src/components/application_manager/src/request_controller.cc
+++ b/src/components/application_manager/src/request_controller.cc
@@ -50,6 +50,7 @@ RequestController::RequestController(const RequestControlerSettings& settings)
: pool_state_(UNDEFINED)
, pool_size_(settings.thread_pool_size())
, request_tracker_(settings)
+ , duplicate_message_count_()
, timer_("AM RequestCtrlTimer",
new timer::TimerTaskImpl<RequestController>(
this, &RequestController::TimeoutThread))
@@ -230,6 +231,21 @@ void RequestController::TerminateRequest(const uint32_t correlation_id,
<< correlation_id << " connection_key = " << connection_key
<< " function_id = " << function_id
<< " force_terminate = " << force_terminate);
+ {
+ AutoLock auto_lock(duplicate_message_count_lock_);
+ auto dup_it = duplicate_message_count_.find(correlation_id);
+ if (duplicate_message_count_.end() != dup_it) {
+ duplicate_message_count_[correlation_id]--;
+ if (0 == duplicate_message_count_[correlation_id]) {
+ duplicate_message_count_.erase(dup_it);
+ }
+ LOG4CXX_DEBUG(logger_,
+ "Ignoring termination request due to duplicate correlation "
+ "ID being sent");
+ return;
+ }
+ }
+
RequestInfoPtr request =
waiting_for_response_.Find(connection_key, correlation_id);
if (!request) {
@@ -474,7 +490,24 @@ void RequestController::Worker::threadMain() {
RequestInfoPtr request_info_ptr =
utils::MakeShared<MobileRequestInfo>(request_ptr, timeout_in_mseconds);
- request_controller_->waiting_for_response_.Add(request_info_ptr);
+ if (!request_controller_->waiting_for_response_.Add(request_info_ptr)) {
+ commands::CommandRequestImpl* cmd_request =
+ dynamic_cast<commands::CommandRequestImpl*>(request_ptr.get());
+ if (cmd_request != NULL) {
+ uint32_t corr_id = cmd_request->correlation_id();
+ request_controller_->duplicate_message_count_lock_.Acquire();
+ auto dup_it =
+ request_controller_->duplicate_message_count_.find(corr_id);
+ if (request_controller_->duplicate_message_count_.end() == dup_it) {
+ request_controller_->duplicate_message_count_[corr_id] = 0;
+ }
+ request_controller_->duplicate_message_count_[corr_id]++;
+ request_controller_->duplicate_message_count_lock_.Release();
+ cmd_request->SendResponse(
+ false, mobile_apis::Result::INVALID_ID, "Duplicate correlation_id");
+ }
+ continue;
+ }
LOG4CXX_DEBUG(logger_, "timeout_in_mseconds " << timeout_in_mseconds);
if (0 != timeout_in_mseconds) {
diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc
index 6bffb16fb8..323b66a9ec 100644
--- a/src/components/application_manager/src/smart_object_keys.cc
+++ b/src/components/application_manager/src/smart_object_keys.cc
@@ -239,6 +239,7 @@ const char* remote_control = "remoteControl";
const char* sdl_version = "sdlVersion";
const char* system_software_version = "systemSoftwareVersion";
const char* priority = "priority";
+const char* engine_oil_life = "engineOilLife";
// resuming
const char* application_commands = "applicationCommands";
diff --git a/src/components/application_manager/test/commands/mobile/slider_test.cc b/src/components/application_manager/test/commands/mobile/slider_test.cc
index 54ac3cccc0..53764e3fcd 100644
--- a/src/components/application_manager/test/commands/mobile/slider_test.cc
+++ b/src/components/application_manager/test/commands/mobile/slider_test.cc
@@ -282,9 +282,8 @@ TEST_F(SliderRequestTest, OnEvent_UI_OnResetTimeout_UNSUCCESS) {
CommandPtr command(CreateCommand<SliderRequest>(msg_));
EXPECT_TRUE(command->Init());
- EXPECT_CALL(
- app_mngr_,
- updateRequestTimeout(kConnectionKey, kCorrelationId, kDefaultTimeout));
+ EXPECT_CALL(app_mngr_,
+ updateRequestTimeout(kConnectionKey, kCorrelationId, _));
Event event(hmi_apis::FunctionID::UI_OnResetTimeout);
event.set_smart_object(*msg_);
diff --git a/src/components/application_manager/test/hmi_capabilities.json b/src/components/application_manager/test/hmi_capabilities.json
index 9db6ee78ae..0efcc688bc 100644
--- a/src/components/application_manager/test/hmi_capabilities.json
+++ b/src/components/application_manager/test/hmi_capabilities.json
@@ -263,7 +263,15 @@
},
{
"name": "graphic",
- "imageTypeSupported": [],
+ "imageTypeSupported": [],
+ "imageResolution": {
+ "resolutionWidth": 35,
+ "resolutionHeight": 35
+ }
+ },
+ {
+ "name": "secondaryGraphic",
+ "imageTypeSupported": [],
"imageResolution": {
"resolutionWidth": 35,
"resolutionHeight": 35
diff --git a/src/components/application_manager/test/request_controller/request_controller_test.cc b/src/components/application_manager/test/request_controller/request_controller_test.cc
index e053d51c34..c2912fdc0b 100644
--- a/src/components/application_manager/test/request_controller/request_controller_test.cc
+++ b/src/components/application_manager/test/request_controller/request_controller_test.cc
@@ -62,6 +62,7 @@ using ::application_manager::request_controller::RequestInfo;
using ::testing::Return;
using ::testing::ReturnRef;
using ::testing::NiceMock;
+using ::testing::_;
typedef NiceMock<application_manager_test::MockRequest> MRequest;
typedef utils::SharedPtr<MRequest> RequestPtr;
@@ -114,6 +115,7 @@ class RequestControllerTestClass : public ::testing::Test {
RequestPtr output =
utils::MakeShared<MRequest>(connection_key, correlation_id);
ON_CALL(*output, default_timeout()).WillByDefault(Return(default_timeout));
+ ON_CALL(*output, CheckPermissions()).WillByDefault(Return(true));
return output;
}
@@ -159,6 +161,40 @@ class RequestControllerTestClass : public ::testing::Test {
};
TEST_F(RequestControllerTestClass,
+ AddMobileRequest_DuplicateCorrelationId_INVALID_ID) {
+ RequestPtr request_valid = GetMockRequest();
+ TestAsyncWaiter waiter_valid;
+ ON_CALL(*request_valid, default_timeout()).WillByDefault(Return(0));
+ EXPECT_CALL(*request_valid, Init()).WillOnce(Return(true));
+ EXPECT_CALL(*request_valid, Run())
+ .Times(1)
+ .WillRepeatedly(NotifyTestAsyncWaiter(&waiter_valid));
+
+ EXPECT_EQ(RequestController::SUCCESS,
+ AddRequest(default_settings_,
+ request_valid,
+ RequestInfo::RequestType::MobileRequest,
+ mobile_apis::HMILevel::HMI_NONE));
+ EXPECT_TRUE(waiter_valid.WaitFor(1, 1000));
+
+ // The command should not be run if another command with the same
+ // correlation_id is waiting for a response
+ RequestPtr request_dup_corr_id = GetMockRequest();
+ TestAsyncWaiter waiter_dup;
+ ON_CALL(*request_dup_corr_id, default_timeout()).WillByDefault(Return(0));
+ EXPECT_CALL(*request_dup_corr_id, Init()).WillOnce(Return(true));
+ ON_CALL(*request_dup_corr_id, Run())
+ .WillByDefault(NotifyTestAsyncWaiter(&waiter_dup));
+
+ EXPECT_EQ(RequestController::SUCCESS,
+ AddRequest(default_settings_,
+ request_dup_corr_id,
+ RequestInfo::RequestType::MobileRequest,
+ mobile_apis::HMILevel::HMI_NONE));
+ EXPECT_FALSE(waiter_dup.WaitFor(1, 1000));
+}
+
+TEST_F(RequestControllerTestClass,
CheckPosibilitytoAdd_ZeroValueLimiters_SUCCESS) {
// Test case than pending_requests_amount,
// app_time_scale_max_requests_ and
diff --git a/src/components/application_manager/test/sdl_preloaded_pt.json b/src/components/application_manager/test/sdl_preloaded_pt.json
index 29ab49af27..c5386f612e 100644
--- a/src/components/application_manager/test/sdl_preloaded_pt.json
+++ b/src/components/application_manager/test/sdl_preloaded_pt.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/application_manager/test/sdl_pt_update.json b/src/components/application_manager/test/sdl_pt_update.json
index 2db11ad818..e013243760 100644
--- a/src/components/application_manager/test/sdl_pt_update.json
+++ b/src/components/application_manager/test/sdl_pt_update.json
@@ -1587,6 +1587,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1603,6 +1604,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1619,6 +1621,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1634,6 +1637,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml
index 323a07410f..5bea88c592 100644
--- a/src/components/interfaces/HMI_API.xml
+++ b/src/components/interfaces/HMI_API.xml
@@ -624,7 +624,10 @@
<description>The image field for the app icon (set by setAppIcon)</description>
</element>
<element name="graphic">
- <description>The image field for Show</description>
+ <description>The primary image field for Show</description>
+ </element>
+ <element name="secondaryGraphic">
+ <description>The secondary image field for Show</description>
</element>
<element name="showConstantTBTIcon">
<description>The primary image field for ShowConstantTBT</description>
@@ -1009,6 +1012,7 @@
<element name="VEHICLEDATA_ACCPEDAL" />
<element name="VEHICLEDATA_STEERINGWHEEL" />
<element name="VEHICLEDATA_FUELRANGE" />
+ <element name="VEHICLEDATA_ENGINEOILLIFE" />
</enum>
<enum name="WiperStatus">
@@ -4268,6 +4272,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4347,6 +4354,9 @@
<param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Common.VehicleDataResult" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4432,6 +4442,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4511,6 +4524,9 @@
<param name="steeringWheelAngle" type="Common.VehicleDataResult" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Common.VehicleDataResult" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Common.VehicleDataResult" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
@@ -4594,6 +4610,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<param name="eCallInfo" type="Boolean" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
@@ -4674,6 +4693,9 @@
<param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Float" minvalue="0" maxvalue="100" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<param name="eCallInfo" type="Common.ECallInfo" mandatory="false">
<description>Emergency Call notification and confirmation data</description>
</param>
diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml
index 826f02ec14..4c2802e363 100644
--- a/src/components/interfaces/MOBILE_API.xml
+++ b/src/components/interfaces/MOBILE_API.xml
@@ -514,6 +514,7 @@
<element name="VEHICLEDATA_ACCPEDAL" />
<element name="VEHICLEDATA_STEERINGWHEEL" />
<element name="VEHICLEDATA_FUELRANGE" />
+ <element name="VEHICLEDATA_ENGINEOILLIFE" />
</enum>
<enum name="ButtonName">
@@ -782,7 +783,11 @@
</element>
<element name="graphic">
- <description>The image field for Show</description>
+ <description>The primary image field for Show</description>
+ </element>
+
+ <element name="secondaryGraphic">
+ <description>The secondary image field for Show</description>
</element>
<element name="showConstantTBTIcon">
@@ -4129,6 +4134,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -4235,6 +4243,9 @@
<param name="steeringWheelAngle" type="VehicleDataResult" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="VehicleDataResult" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="VehicleDataResult" mandatory="false">
@@ -4319,6 +4330,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -4423,6 +4437,9 @@
<param name="steeringWheelAngle" type="VehicleDataResult" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="VehicleDataResult" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="VehicleDataResult" mandatory="false">
@@ -4510,6 +4527,9 @@
<param name="steeringWheelAngle" type="Boolean" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Boolean" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="Boolean" mandatory="false">
@@ -4618,6 +4638,9 @@
<param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Float" minvalue="0" maxvalue="100" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Data Items -->
<param name="eCallInfo" type="ECallInfo" mandatory="false">
@@ -5839,6 +5862,9 @@
<param name="steeringWheelAngle" type="Float" minvalue="-2000" maxvalue="2000" mandatory="false">
<description>Current angle of the steering wheel (in deg)</description>
</param>
+ <param name="engineOilLife" type="Float" minvalue="0" maxvalue="100" mandatory="false">
+ <description>The estimated percentage of remaining oil life of the engine.</description>
+ </param>
<!-- Ford Specific Vehicle Data -->
<param name="eCallInfo" type="ECallInfo" mandatory="false">
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 cc785c1518..fa37cfe7a5 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
@@ -81,6 +81,7 @@ enum Parameter {
P_PRNDL,
P_RPM,
P_STEERINGWHEELANGLE,
+ P_ENGINEOILLIFE,
P_MYKEY,
P_AIRBAGSTATUS,
P_BODYINFORMATION,
diff --git a/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml b/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml
index 878354fd19..8d5a7054f1 100644
--- a/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml
+++ b/src/components/policy/policy_external/include/policy/policy_table_interface_ext.xml
@@ -41,6 +41,7 @@
<element name="prndl" />
<element name="rpm" />
<element name="steeringWheelAngle" />
+ <element name="engineOilLife" />
<element name="myKey" />
<element name="airbagStatus" />
<element name="bodyInformation" />
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 7a8bee93e2..beea68a276 100644
--- a/src/components/policy/policy_external/src/policy_table/enums.cc
+++ b/src/components/policy/policy_external/src/policy_table/enums.cc
@@ -148,6 +148,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_STEERINGWHEELANGLE:
return true;
+ case P_ENGINEOILLIFE:
+ return true;
case P_MYKEY:
return true;
case P_AIRBAGSTATUS:
@@ -239,6 +241,8 @@ const char* EnumToJsonString(Parameter val) {
return "rpm";
case P_STEERINGWHEELANGLE:
return "steeringWheelAngle";
+ case P_ENGINEOILLIFE:
+ return "engineOilLife";
case P_MYKEY:
return "myKey";
case P_AIRBAGSTATUS:
@@ -348,6 +352,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("steeringWheelAngle" == literal) {
*result = P_STEERINGWHEELANGLE;
return true;
+ } else if ("engineOilLife" == literal) {
+ *result = P_ENGINEOILLIFE;
+ return true;
} else if ("myKey" == literal) {
*result = P_MYKEY;
return true;
diff --git a/src/components/policy/policy_external/test/json/PTU.json b/src/components/policy/policy_external/test/json/PTU.json
index bfc4d714f7..c231340f44 100644
--- a/src/components/policy/policy_external/test/json/PTU.json
+++ b/src/components/policy/policy_external/test/json/PTU.json
@@ -472,6 +472,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -494,6 +495,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -516,6 +518,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -537,6 +540,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/PTU2.json b/src/components/policy/policy_external/test/json/PTU2.json
index e4d21a3aa1..4970c40e60 100644
--- a/src/components/policy/policy_external/test/json/PTU2.json
+++ b/src/components/policy/policy_external/test/json/PTU2.json
@@ -472,6 +472,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -494,6 +495,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -516,6 +518,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -537,6 +540,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/PTU3.json b/src/components/policy/policy_external/test/json/PTU3.json
index 40b69308cb..98037cf594 100644
--- a/src/components/policy/policy_external/test/json/PTU3.json
+++ b/src/components/policy/policy_external/test/json/PTU3.json
@@ -472,6 +472,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -494,6 +495,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -516,6 +518,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -537,6 +540,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json b/src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json
index ba8e8affba..f232d8fec7 100644
--- a/src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json
+++ b/src/components/policy/policy_external/test/json/PTU_with_empty_requestType_array.json
@@ -1592,6 +1592,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1608,6 +1609,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1624,6 +1626,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1639,6 +1642,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json b/src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json
index 3b96ab44a3..942c862d4f 100644
--- a/src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json
+++ b/src/components/policy/policy_external/test/json/PTU_with_invalid_requestType_between_correct.json
@@ -1595,6 +1595,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1611,6 +1612,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1627,6 +1629,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1642,6 +1645,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json b/src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json
index 20bc102180..c72fdbe6cb 100644
--- a/src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json
+++ b/src/components/policy/policy_external/test/json/PTU_with_one_invalid_requestType.json
@@ -1592,6 +1592,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1608,6 +1609,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1624,6 +1626,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1639,6 +1642,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/PTU_without_requestType_field.json b/src/components/policy/policy_external/test/json/PTU_without_requestType_field.json
index d80a50add2..b783ac0cc2 100644
--- a/src/components/policy/policy_external/test/json/PTU_without_requestType_field.json
+++ b/src/components/policy/policy_external/test/json/PTU_without_requestType_field.json
@@ -1591,6 +1591,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1607,6 +1608,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1623,6 +1625,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1638,6 +1641,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json b/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json
index 2705db87d7..fdf730917f 100644
--- a/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json
+++ b/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_reqestType_between_valid.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json b/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json
index 063c64dd5b..82b6f762ca 100644
--- a/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json
+++ b/src/components/policy/policy_external/test/json/preloadedPT_with_invalid_default_requestType.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json b/src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json
index 92d7329e1e..713d057f1a 100644
--- a/src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json
+++ b/src/components/policy/policy_external/test/json/preloadedPT_with_several_invalid_default_requestTypes.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/ptu2_requestType.json b/src/components/policy/policy_external/test/json/ptu2_requestType.json
index abf4a3d1d6..4765da0771 100644
--- a/src/components/policy/policy_external/test/json/ptu2_requestType.json
+++ b/src/components/policy/policy_external/test/json/ptu2_requestType.json
@@ -484,6 +484,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -506,6 +507,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -528,6 +530,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -549,6 +552,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/ptu_requestType.json b/src/components/policy/policy_external/test/json/ptu_requestType.json
index d32f8dba38..5e34c00a81 100644
--- a/src/components/policy/policy_external/test/json/ptu_requestType.json
+++ b/src/components/policy/policy_external/test/json/ptu_requestType.json
@@ -483,6 +483,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -505,6 +506,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -548,6 +551,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt.json
index 29ab49af27..c5386f612e 100644
--- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt.json
+++ b/src/components/policy/policy_external/test/json/sdl_preloaded_pt.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json
index d1c7302cae..5974b22b8e 100644
--- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json
+++ b/src/components/policy/policy_external/test/json/sdl_preloaded_pt1.json
@@ -2308,6 +2308,7 @@
[
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -2328,6 +2329,7 @@
[
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -2348,6 +2350,7 @@
[
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -2367,6 +2370,7 @@
[
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json
index b7db9518ca..8da6906e8b 100644
--- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json
+++ b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_send_location.json
@@ -484,6 +484,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -506,6 +507,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -528,6 +530,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -549,6 +552,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_pt_first_update.json b/src/components/policy/policy_external/test/json/sdl_pt_first_update.json
index f599c4d88d..f8be46d2b5 100644
--- a/src/components/policy/policy_external/test/json/sdl_pt_first_update.json
+++ b/src/components/policy/policy_external/test/json/sdl_pt_first_update.json
@@ -1609,6 +1609,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1625,6 +1626,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1641,6 +1643,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1656,6 +1659,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_pt_second_update.json b/src/components/policy/policy_external/test/json/sdl_pt_second_update.json
index 5a063b397b..fe7b036f94 100644
--- a/src/components/policy/policy_external/test/json/sdl_pt_second_update.json
+++ b/src/components/policy/policy_external/test/json/sdl_pt_second_update.json
@@ -1609,6 +1609,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1625,6 +1626,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1641,6 +1643,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1656,6 +1659,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_pt_update.json b/src/components/policy/policy_external/test/json/sdl_pt_update.json
index 1b4052a515..c79fd26873 100644
--- a/src/components/policy/policy_external/test/json/sdl_pt_update.json
+++ b/src/components/policy/policy_external/test/json/sdl_pt_update.json
@@ -1593,6 +1593,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1609,6 +1610,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1625,6 +1627,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1640,6 +1643,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json b/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json
index b2eda4e00d..234f57f2db 100644
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json
+++ b/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_have_params.json
@@ -483,6 +483,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -505,6 +506,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -548,6 +551,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json b/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json
index 5dd50b01b2..d309d58674 100644
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json
+++ b/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1.json
@@ -483,6 +483,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -505,6 +506,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -548,6 +551,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json b/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json
index 0f8c81415f..be38e7d706 100644
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json
+++ b/src/components/policy/policy_external/test/json/sdl_update_pt_2_groups_no_params_in1_omitted_in2.json
@@ -483,6 +483,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -505,6 +506,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -548,6 +551,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json
index 38b38ae63e..8686f20f0e 100644
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json
+++ b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location.json
@@ -483,6 +483,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -505,6 +506,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -548,6 +551,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json
index ca975bb16c..b9b693ed5b 100644
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json
+++ b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_all_params.json
@@ -483,6 +483,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -505,6 +506,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -548,6 +551,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json
index 0c545f6fde..8bbf7ea421 100644
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json
+++ b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_no_params.json
@@ -483,6 +483,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -505,6 +506,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -548,6 +551,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json
index d7f3b929c7..146adaf7a7 100644
--- a/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json
+++ b/src/components/policy/policy_external/test/json/sdl_update_pt_send_location_some_params.json
@@ -483,6 +483,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -505,6 +506,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -527,6 +529,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -548,6 +551,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_external/test/json/valid_sdl_pt_update.json b/src/components/policy/policy_external/test/json/valid_sdl_pt_update.json
index d0469c2558..bc8d95302c 100644
--- a/src/components/policy/policy_external/test/json/valid_sdl_pt_update.json
+++ b/src/components/policy/policy_external/test/json/valid_sdl_pt_update.json
@@ -1585,6 +1585,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1601,6 +1602,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1617,6 +1619,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1632,6 +1635,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
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 7284ec7ebe..bd3319dba6 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
@@ -81,6 +81,7 @@ enum Parameter {
P_PRNDL,
P_RPM,
P_STEERINGWHEELANGLE,
+ P_ENGINEOILLIFE,
P_MYKEY,
P_AIRBAGSTATUS,
P_BODYINFORMATION,
diff --git a/src/components/policy/policy_regular/policy_table_interface_ext.xml b/src/components/policy/policy_regular/policy_table_interface_ext.xml
index 246f04dae3..4f87a9e254 100644
--- a/src/components/policy/policy_regular/policy_table_interface_ext.xml
+++ b/src/components/policy/policy_regular/policy_table_interface_ext.xml
@@ -42,6 +42,7 @@
<element name="prndl" />
<element name="rpm" />
<element name="steeringWheelAngle" />
+ <element name="engineOilLife" />
<element name="myKey" />
<element name="airbagStatus" />
<element name="bodyInformation" />
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 bd5ab780dd..2145f06a4b 100644
--- a/src/components/policy/policy_regular/src/policy_table/enums.cc
+++ b/src/components/policy/policy_regular/src/policy_table/enums.cc
@@ -149,6 +149,8 @@ bool IsValidEnum(Parameter val) {
return true;
case P_STEERINGWHEELANGLE:
return true;
+ case P_ENGINEOILLIFE:
+ return true;
case P_MYKEY:
return true;
case P_AIRBAGSTATUS:
@@ -209,6 +211,8 @@ const char* EnumToJsonString(Parameter val) {
return "rpm";
case P_STEERINGWHEELANGLE:
return "steeringWheelAngle";
+ case P_ENGINEOILLIFE:
+ return "engineOilLife";
case P_MYKEY:
return "myKey";
case P_AIRBAGSTATUS:
@@ -288,6 +292,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) {
} else if ("steeringWheelAngle" == literal) {
*result = P_STEERINGWHEELANGLE;
return true;
+ } else if ("engineOilLife" == literal) {
+ *result = P_ENGINEOILLIFE;
+ return true;
} else if ("myKey" == literal) {
*result = P_MYKEY;
return true;
diff --git a/src/components/policy/policy_regular/test/PTU.json b/src/components/policy/policy_regular/test/PTU.json
index 7a7b37f165..7d6837f94e 100644
--- a/src/components/policy/policy_regular/test/PTU.json
+++ b/src/components/policy/policy_regular/test/PTU.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/PTU2.json b/src/components/policy/policy_regular/test/PTU2.json
index 2a5cec4bde..7a5c29410c 100644
--- a/src/components/policy/policy_regular/test/PTU2.json
+++ b/src/components/policy/policy_regular/test/PTU2.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/PTU3.json b/src/components/policy/policy_regular/test/PTU3.json
index 22a5ea9ee1..1b3340ec8c 100644
--- a/src/components/policy/policy_regular/test/PTU3.json
+++ b/src/components/policy/policy_regular/test/PTU3.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/PTU4.json b/src/components/policy/policy_regular/test/PTU4.json
index 980869ac27..9aa04dd8ba 100644
--- a/src/components/policy/policy_regular/test/PTU4.json
+++ b/src/components/policy/policy_regular/test/PTU4.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/ptu2_requestType.json b/src/components/policy/policy_regular/test/ptu2_requestType.json
index dc5174c158..e127b2fad6 100644
--- a/src/components/policy/policy_regular/test/ptu2_requestType.json
+++ b/src/components/policy/policy_regular/test/ptu2_requestType.json
@@ -485,6 +485,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -507,6 +508,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -529,6 +531,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -550,6 +553,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/ptu_requestType.json b/src/components/policy/policy_regular/test/ptu_requestType.json
index 668a40a832..bd6a86dac3 100644
--- a/src/components/policy/policy_regular/test/ptu_requestType.json
+++ b/src/components/policy/policy_regular/test/ptu_requestType.json
@@ -485,6 +485,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -507,6 +508,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -529,6 +531,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -550,6 +553,7 @@
"parameters": [
"bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json b/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
index 29ab49af27..c5386f612e 100644
--- a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
+++ b/src/components/policy/policy_regular/test/sdl_preloaded_pt.json
@@ -349,6 +349,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -367,6 +368,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -385,6 +387,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -402,6 +405,7 @@
"LIMITED"],
"parameters": ["bodyInformation",
"deviceStatus",
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/sdl_pt_first_update.json b/src/components/policy/policy_regular/test/sdl_pt_first_update.json
index f599c4d88d..f8be46d2b5 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_first_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_first_update.json
@@ -1609,6 +1609,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1625,6 +1626,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1641,6 +1643,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1656,6 +1659,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/sdl_pt_second_update.json b/src/components/policy/policy_regular/test/sdl_pt_second_update.json
index 5a063b397b..fe7b036f94 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_second_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_second_update.json
@@ -1609,6 +1609,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1625,6 +1626,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1641,6 +1643,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1656,6 +1659,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/sdl_pt_update.json b/src/components/policy/policy_regular/test/sdl_pt_update.json
index 2db11ad818..e013243760 100644
--- a/src/components/policy/policy_regular/test/sdl_pt_update.json
+++ b/src/components/policy/policy_regular/test/sdl_pt_update.json
@@ -1587,6 +1587,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1603,6 +1604,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1619,6 +1621,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1634,6 +1637,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/policy/policy_regular/test/valid_sdl_pt_update.json b/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
index d0469c2558..bc8d95302c 100644
--- a/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
+++ b/src/components/policy/policy_regular/test/valid_sdl_pt_update.json
@@ -1585,6 +1585,7 @@
"GetVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1601,6 +1602,7 @@
"OnVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1617,6 +1619,7 @@
"SubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
@@ -1632,6 +1635,7 @@
"UnsubscribeVehicleData" : {
"hmi_levels" : [ "BACKGROUND", "FULL", "LIMITED" ],
"parameters" : [
+ "engineOilLife",
"engineTorque",
"externalTemperature",
"fuelLevel",
diff --git a/src/components/security_manager/src/crypto_manager_impl.cc b/src/components/security_manager/src/crypto_manager_impl.cc
index 6bee28a976..2cc88c5966 100644
--- a/src/components/security_manager/src/crypto_manager_impl.cc
+++ b/src/components/security_manager/src/crypto_manager_impl.cc
@@ -137,8 +137,13 @@ bool CryptoManagerImpl::Init() {
#endif
switch (get_settings().security_manager_protocol_name()) {
case SSLv3:
+#ifdef OPENSSL_NO_SSL3
+ LOG4CXX_WARN(logger_, "OpenSSL does not support SSL3 protocol");
+ return false;
+#else
method = is_server ? SSLv3_server_method() : SSLv3_client_method();
break;
+#endif
case TLSv1:
method = is_server ? TLSv1_server_method() : TLSv1_client_method();
break;
diff --git a/src/components/security_manager/test/ssl_context_test.cc b/src/components/security_manager/test/ssl_context_test.cc
index 945059e58c..a77cd98b27 100644
--- a/src/components/security_manager/test/ssl_context_test.cc
+++ b/src/components/security_manager/test/ssl_context_test.cc
@@ -228,7 +228,7 @@ class SSLTestParam : public testing::TestWithParam<ProtocolAndCipher> {
GetParam().server_ciphers_list);
const bool crypto_manager_initialization = crypto_manager->Init();
- EXPECT_TRUE(crypto_manager_initialization);
+ ASSERT_TRUE(crypto_manager_initialization);
mock_client_manager_settings_ = utils::MakeShared<
NiceMock<security_manager_test::MockCryptoManagerSettings> >();
@@ -241,7 +241,7 @@ class SSLTestParam : public testing::TestWithParam<ProtocolAndCipher> {
GetParam().client_ciphers_list);
const bool client_manager_initialization = client_manager->Init();
- EXPECT_TRUE(client_manager_initialization);
+ ASSERT_TRUE(client_manager_initialization);
server_ctx = crypto_manager->CreateSSLContext();
client_ctx = client_manager->CreateSSLContext();
@@ -261,9 +261,12 @@ class SSLTestParam : public testing::TestWithParam<ProtocolAndCipher> {
}
void TearDown() OVERRIDE {
- crypto_manager->ReleaseSSLContext(server_ctx);
- client_manager->ReleaseSSLContext(client_ctx);
-
+ if (crypto_manager) {
+ crypto_manager->ReleaseSSLContext(server_ctx);
+ }
+ if (client_manager) {
+ client_manager->ReleaseSSLContext(client_ctx);
+ }
delete crypto_manager;
delete client_manager;
}
@@ -303,10 +306,10 @@ class SSLTestParam : public testing::TestWithParam<ProtocolAndCipher> {
mock_crypto_manager_settings_;
utils::SharedPtr<NiceMock<security_manager_test::MockCryptoManagerSettings> >
mock_client_manager_settings_;
- security_manager::CryptoManager* crypto_manager;
- security_manager::CryptoManager* client_manager;
- security_manager::SSLContext* server_ctx;
- security_manager::SSLContext* client_ctx;
+ security_manager::CryptoManager* crypto_manager = NULL;
+ security_manager::CryptoManager* client_manager = NULL;
+ security_manager::SSLContext* server_ctx = NULL;
+ security_manager::SSLContext* client_ctx = NULL;
std::string certificate_data_base64_;
};
@@ -323,11 +326,15 @@ INSTANTIATE_TEST_CASE_P(
ProtocolAndCipher(security_manager::TLSv1_1,
security_manager::TLSv1_1,
kFordCipher,
- kFordCipher),
+ kFordCipher)
+#ifndef OPENSSL_NO_SSL3
+ ,
ProtocolAndCipher(security_manager::SSLv3,
security_manager::SSLv3,
kFordCipher,
- kFordCipher)));
+ kFordCipher)
+#endif
+ ));
INSTANTIATE_TEST_CASE_P(
IncorrectProtocolAndCiphers,
@@ -336,18 +343,10 @@ INSTANTIATE_TEST_CASE_P(
security_manager::TLSv1_1,
kFordCipher,
kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1,
- security_manager::SSLv3,
- kFordCipher,
- kFordCipher),
ProtocolAndCipher(security_manager::TLSv1_1,
security_manager::TLSv1,
kFordCipher,
kFordCipher),
- ProtocolAndCipher(security_manager::TLSv1_1,
- security_manager::SSLv3,
- kFordCipher,
- kFordCipher),
ProtocolAndCipher(security_manager::TLSv1_2,
security_manager::TLSv1,
kFordCipher,
@@ -355,6 +354,16 @@ INSTANTIATE_TEST_CASE_P(
ProtocolAndCipher(security_manager::TLSv1_2,
security_manager::TLSv1_1,
kFordCipher,
+ kFordCipher)
+#ifndef OPENSSL_NO_SSL3
+ ,
+ ProtocolAndCipher(security_manager::TLSv1,
+ security_manager::SSLv3,
+ kFordCipher,
+ kFordCipher),
+ ProtocolAndCipher(security_manager::TLSv1_1,
+ security_manager::SSLv3,
+ kFordCipher,
kFordCipher),
ProtocolAndCipher(security_manager::TLSv1_2,
security_manager::SSLv3,
@@ -367,7 +376,9 @@ INSTANTIATE_TEST_CASE_P(
ProtocolAndCipher(security_manager::SSLv3,
security_manager::TLSv1_1,
kFordCipher,
- kFordCipher)));
+ kFordCipher)
+#endif
+ ));
TEST_F(SSLTest, OnTSL2Protocol_BrokenHandshake) {
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
@@ -521,11 +532,15 @@ INSTANTIATE_TEST_CASE_P(
ProtocolAndCipher(security_manager::TLSv1_1,
security_manager::TLSv1_2,
kFordCipher,
- kFordCipher),
+ kFordCipher)
+#ifndef OPENSSL_NO_SSL3
+ ,
ProtocolAndCipher(security_manager::SSLv3,
security_manager::TLSv1_2,
kFordCipher,
- kFordCipher)));
+ kFordCipher)
+#endif
+ ));
TEST_P(SSLTestForTLS1_2, HandshakeFailed) {
ASSERT_EQ(security_manager::SSLContext::Handshake_Result_Success,
diff --git a/src/components/utils/src/file_system.cc b/src/components/utils/src/file_system.cc
index 62a91ad1f3..62a090550d 100644
--- a/src/components/utils/src/file_system.cc
+++ b/src/components/utils/src/file_system.cc
@@ -71,17 +71,14 @@ int64_t file_system::FileSize(const std::string& path) {
size_t file_system::DirectorySize(const std::string& path) {
size_t size = 0;
- int32_t return_code = 0;
DIR* directory = NULL;
- struct dirent dir_element_;
- struct dirent* dir_element = &dir_element_;
+
struct dirent* result = NULL;
struct stat file_info = {0};
directory = opendir(path.c_str());
if (NULL != directory) {
- return_code = readdir_r(directory, dir_element, &result);
- for (; NULL != result && 0 == return_code;
- return_code = readdir_r(directory, dir_element, &result)) {
+ result = readdir(directory);
+ for (; NULL != result; result = readdir(directory)) {
if (0 == strcmp(result->d_name, "..") ||
0 == strcmp(result->d_name, ".")) {
continue;
@@ -229,19 +226,15 @@ bool file_system::DeleteFile(const std::string& name) {
}
void file_system::remove_directory_content(const std::string& directory_name) {
- int32_t return_code = 0;
DIR* directory = NULL;
- struct dirent dir_element_;
- struct dirent* dir_element = &dir_element_;
struct dirent* result = NULL;
directory = opendir(directory_name.c_str());
if (NULL != directory) {
- return_code = readdir_r(directory, dir_element, &result);
+ result = readdir(directory);
- for (; NULL != result && 0 == return_code;
- return_code = readdir_r(directory, dir_element, &result)) {
+ for (; NULL != result; result = readdir(directory)) {
if (0 == strcmp(result->d_name, "..") ||
0 == strcmp(result->d_name, ".")) {
continue;
@@ -295,18 +288,14 @@ std::vector<std::string> file_system::ListFiles(
return listFiles;
}
- int32_t return_code = 0;
DIR* directory = NULL;
- struct dirent dir_element_;
- struct dirent* dir_element = &dir_element_;
struct dirent* result = NULL;
directory = opendir(directory_name.c_str());
if (NULL != directory) {
- return_code = readdir_r(directory, dir_element, &result);
+ result = readdir(directory);
- for (; NULL != result && 0 == return_code;
- return_code = readdir_r(directory, dir_element, &result)) {
+ for (; NULL != result; result = readdir(directory)) {
if (0 == strcmp(result->d_name, "..") ||
0 == strcmp(result->d_name, ".")) {
continue;