From 6e5ef3dd422f8da25d224928979a8c7e59d54723 Mon Sep 17 00:00:00 2001 From: "Yana Chernysheva (GitHub)" <59469418+ychernysheva@users.noreply.github.com> Date: Mon, 10 Aug 2020 17:27:26 +0300 Subject: SDL Core implementation of feature [0257] New vehicle data HandsOffSteering (#3394) * Add changes to HMI_API * Add changes related to MessageHelper * Add the new parameter into the sdl_preloaded_pt and policy_table_interface_ext files The new parameter "handsOffSteering" was added into the "DrivingCharacteristics-3" section of the sdl_preloaded_pt file. Also the new parameter was added into the policy_table_interface_ext file * Update the sdl_preloaded_pt.json file with the new schema item Co-authored-by: Igor Gapchuk Co-authored-by: YarikMamykin Co-authored-by: Andrii Kalinich --- src/appMain/sdl_preloaded_pt.json | 19 +++++++++++++++---- .../application_manager/smart_object_keys.h | 1 + .../src/message_helper/message_helper.cc | 5 ++++- .../application_manager/src/smart_object_keys.cc | 1 + src/components/interfaces/HMI_API.xml | 22 ++++++++++++++++++++++ .../include/policy/policy_table_interface_ext.xml | 1 + .../json/sdl_preloaded_pt_for_merge_initial.json | 12 ++++++++---- .../json/sdl_preloaded_pt_for_merge_latest.json | 12 ++++++++---- .../json/sdl_preloaded_pt_for_merge_initial.json | 12 ++++++++---- .../json/sdl_preloaded_pt_for_merge_latest.json | 12 ++++++++---- 10 files changed, 76 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json index 860c83d2fc..e07a5eeab0 100644 --- a/src/appMain/sdl_preloaded_pt.json +++ b/src/appMain/sdl_preloaded_pt.json @@ -507,7 +507,8 @@ "prndl", "rpm", "steeringWheelAngle", - "gearStatus" + "gearStatus", + "handsOffSteering" ] }, "OnVehicleData": { @@ -525,7 +526,8 @@ "prndl", "rpm", "steeringWheelAngle", - "gearStatus" + "gearStatus", + "handsOffSteering" ] }, "SubscribeVehicleData": { @@ -543,7 +545,8 @@ "prndl", "rpm", "steeringWheelAngle", - "gearStatus" + "gearStatus", + "handsOffSteering" ] }, "UnsubscribeVehicleData": { @@ -561,7 +564,8 @@ "prndl", "rpm", "steeringWheelAngle", - "gearStatus" + "gearStatus", + "handsOffSteering" ] } } @@ -4276,6 +4280,13 @@ "key": "OEM_REF_MY_KEY", "type": "Struct", "mandatory": false + }, + { + "name": "handsOffSteering", + "key": "OEM_REF_HANDS_OFF_STRNG", + "type": "Boolean", + "mandatory": false, + "since": "7.0" } ] } 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 fe7dbbdc26..c96c9ebe69 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 @@ -340,6 +340,7 @@ extern const char* priority; extern const char* engine_oil_life; extern const char* oem_custom_data_type; extern const char* window_status; +extern const char* hands_off_steering; // app services extern const char* app_service_manifest; 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 969307ad68..83e93d9c80 100644 --- a/src/components/application_manager/src/message_helper/message_helper.cc +++ b/src/components/application_manager/src/message_helper/message_helper.cc @@ -245,7 +245,10 @@ std::pair std::make_pair(strings::engine_oil_life, mobile_apis::VehicleDataType::VEHICLEDATA_ENGINEOILLIFE), std::make_pair(strings::window_status, - mobile_apis::VehicleDataType::VEHICLEDATA_WINDOWSTATUS)}; + mobile_apis::VehicleDataType::VEHICLEDATA_WINDOWSTATUS), + std::make_pair( + strings::hands_off_steering, + mobile_apis::VehicleDataType::VEHICLEDATA_HANDSOFFSTEERING)}; const VehicleData MessageHelper::vehicle_data_( kVehicleDataInitializer, diff --git a/src/components/application_manager/src/smart_object_keys.cc b/src/components/application_manager/src/smart_object_keys.cc index e193967f7e..f95476b7a6 100644 --- a/src/components/application_manager/src/smart_object_keys.cc +++ b/src/components/application_manager/src/smart_object_keys.cc @@ -307,6 +307,7 @@ const char* priority = "priority"; const char* engine_oil_life = "engineOilLife"; const char* oem_custom_data_type = "oemCustomDataType"; const char* window_status = "windowStatus"; +const char* hands_off_steering = "handsOffSteering"; // app services const char* app_service_manifest = "appServiceManifest"; diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml index 06f472224b..116ab91060 100644 --- a/src/components/interfaces/HMI_API.xml +++ b/src/components/interfaces/HMI_API.xml @@ -1217,6 +1217,7 @@ + @@ -6169,6 +6170,9 @@ See WindowStatus + + To indicate whether driver hands are off the steering wheel + @@ -6274,6 +6278,9 @@ See WindowStatus + + To indicate whether driver hands are off the steering wheel + @@ -6382,6 +6389,9 @@ See WindowStatus + + To indicate whether driver hands are off the steering wheel + @@ -6487,6 +6497,9 @@ See WindowStatus + + To indicate whether driver hands are off the steering wheel + @@ -6596,6 +6609,9 @@ See WindowStatus + + To indicate whether driver hands are off the steering wheel + @@ -6704,6 +6720,9 @@ See WindowStatus + + To indicate whether driver hands are off the steering wheel + @@ -6813,6 +6832,9 @@ See WindowStatus + + To indicate whether driver hands are off the steering wheel + 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 a723177c33..7446d3acae 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 @@ -59,6 +59,7 @@ + diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_initial.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_initial.json index dbef04e0b8..dec76dd96c 100644 --- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_initial.json +++ b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_initial.json @@ -2056,7 +2056,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "OnVehicleData" : @@ -2071,7 +2072,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "SubscribeVehicleData" : @@ -2086,7 +2088,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "UnsubscribeVehicleData" : @@ -2101,7 +2104,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] } }, diff --git a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_latest.json b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_latest.json index 3260558e70..85693ff515 100644 --- a/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_latest.json +++ b/src/components/policy/policy_external/test/json/sdl_preloaded_pt_for_merge_latest.json @@ -2056,7 +2056,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "OnVehicleData" : @@ -2071,7 +2072,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "SubscribeVehicleData" : @@ -2086,7 +2088,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "UnsubscribeVehicleData" : @@ -2101,7 +2104,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] } }, diff --git a/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_initial.json b/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_initial.json index 909fd2cb2f..3855ccd481 100644 --- a/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_initial.json +++ b/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_initial.json @@ -2056,7 +2056,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "OnVehicleData" : @@ -2071,7 +2072,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "SubscribeVehicleData" : @@ -2086,7 +2088,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "UnsubscribeVehicleData" : @@ -2101,7 +2104,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] } }, diff --git a/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_latest.json b/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_latest.json index 3260558e70..85693ff515 100644 --- a/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_latest.json +++ b/src/components/policy/policy_regular/test/json/sdl_preloaded_pt_for_merge_latest.json @@ -2056,7 +2056,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "OnVehicleData" : @@ -2071,7 +2072,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "SubscribeVehicleData" : @@ -2086,7 +2088,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] }, "UnsubscribeVehicleData" : @@ -2101,7 +2104,8 @@ "myKey", "prndl", "rpm", - "steeringWheelAngle" + "steeringWheelAngle", + "handsOffSteering" ] } }, -- cgit v1.2.1