diff options
Diffstat (limited to 'src/components/policy/policy_regular')
24 files changed, 138 insertions, 103 deletions
diff --git a/src/components/policy/policy_regular/CMakeLists.txt b/src/components/policy/policy_regular/CMakeLists.txt index c7b9c068b9..225e99329a 100644 --- a/src/components/policy/policy_regular/CMakeLists.txt +++ b/src/components/policy/policy_regular/CMakeLists.txt @@ -71,11 +71,6 @@ set(PATHS ) collect_sources(SOURCES "${PATHS}" "${EXCLUDE_PATHS}") -if (NOT REMOTE_CONTROL) - list(REMOVE_ITEM SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/src/access_remote_impl.cc) -endif() - set(LIBRARIES ConfigProfile policy_struct diff --git a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h index 8379cf4d82..c162d73011 100644 --- a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h +++ b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h @@ -47,10 +47,8 @@ #include "policy/usage_statistics/statistics_manager.h" #include "policy/policy_helper.h" #include "utils/timer.h" -#ifdef SDL_REMOTE_CONTROL #include "policy/access_remote.h" #include "policy/access_remote_impl.h" -#endif // SDL_REMOTE_CONTROL namespace policy_table = rpc::policy_table_interface_base; @@ -448,7 +446,6 @@ class PolicyManagerImpl : public PolicyManager { const std::string& application_id, const rpc::policy_table_interface_base::AppHmiTypes& hmi_types) OVERRIDE; -#ifdef SDL_REMOTE_CONTROL /** * @brief Assigns new HMI types for specified application * @param application_id Unique application id @@ -483,7 +480,6 @@ class PolicyManagerImpl : public PolicyManager { * @param application_id Unique id of application */ void OnPrimaryGroupsChanged(const std::string& application_id); -#endif // SDL_REMOTE_CONTROL /** * @brief Removes consent for application functional group @@ -816,7 +812,6 @@ class PolicyManagerImpl : public PolicyManager { void RetrySequence(); private: -#ifdef SDL_REMOTE_CONTROL /** * @brief Get resulting RPCs permissions for application which started on * specific device @@ -853,10 +848,10 @@ class PolicyManagerImpl : public PolicyManager { */ bool GetModuleTypes(const std::string& policy_app_id, std::vector<std::string>* modules) const OVERRIDE; -#endif // SDL_REMOTE_CONTROL - /** - * @brief pointer to policy table listener for callbacks - */ + + /** + * @brief pointer to policy table listener for callbacks + */ PolicyListener* listener_; /** @@ -868,12 +863,11 @@ class PolicyManagerImpl : public PolicyManager { * @brief pointer to CacheManagerInterface instance for getting policy data */ CacheManagerInterfaceSPtr cache_; -#ifdef SDL_REMOTE_CONTROL + /** * @brief pointer to AccessRemote instance for working with RC applications */ utils::SharedPtr<AccessRemote> access_remote_; -#endif /** * @brief lock guard for protecting applications list access 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 dbe00d0f9c..9c5fa2691e 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 @@ -66,6 +66,7 @@ enum Parameter { P_SPEED, P_ENGINETORQUE, P_EXTERNALTEMPERATURE, + P_TURNSIGNAL, P_FUELLEVEL, P_FUELLEVEL_STATE, P_HEADLAMPSTATUS, @@ -77,6 +78,7 @@ enum Parameter { P_VIN, P_ACCPEDALPOSITION, P_BELTSTATUS, + P_ELECTRONICPARKBRAKESTATUS, P_DRIVERBRAKING, P_PRNDL, P_RPM, diff --git a/src/components/policy/policy_regular/include/policy/policy_table/types.h b/src/components/policy/policy_regular/include/policy/policy_table/types.h index 8197247907..ebfbb7f29f 100644 --- a/src/components/policy/policy_regular/include/policy/policy_table/types.h +++ b/src/components/policy/policy_regular/include/policy/policy_table/types.h @@ -98,11 +98,9 @@ typedef Array<Enum<RequestType>, 0, 255> RequestTypes; typedef Strings RequestSubTypes; -#ifdef SDL_REMOTE_CONTROL typedef Map<Strings, 0, 255> RemoteRpcs; typedef Map<RemoteRpcs, 0, 255> AccessModules; typedef Array<Enum<ModuleType>, 0, 255> ModuleTypes; -#endif // SDL_REMOTE_CONTROL typedef AppHMIType AppHmiType; typedef std::vector<AppHMIType> AppHmiTypes; @@ -145,9 +143,7 @@ struct ApplicationParams : PolicyBase { Optional<Integer<uint16_t, 0, 65225> > memory_kb; Optional<Integer<uint32_t, 0, UINT_MAX> > heart_beat_timeout_ms; Optional<String<0, 255> > certificate; -#ifdef SDL_REMOTE_CONTROL mutable Optional<ModuleTypes> moduleType; -#endif // SDL_REMOTE_CONTROL public: ApplicationParams(); @@ -163,9 +159,7 @@ struct ApplicationParams : PolicyBase { private: bool Validate() const; -#ifdef SDL_REMOTE_CONTROL bool ValidateModuleTypes() const; -#endif // SDL_REMOTE_CONTROL }; struct ApplicationPoliciesSection : CompositeType { diff --git a/src/components/policy/policy_regular/include/policy/sql_pt_representation.h b/src/components/policy/policy_regular/include/policy/sql_pt_representation.h index e39e0d5873..b26b2c9ede 100644 --- a/src/components/policy/policy_regular/include/policy/sql_pt_representation.h +++ b/src/components/policy/policy_regular/include/policy/sql_pt_representation.h @@ -97,7 +97,6 @@ class SQLPTRepresentation : public virtual PTRepresentation { } #endif // BUILD_TESTS protected: -#ifdef SDL_REMOTE_CONTROL enum TypeAccess { kAllowed, kManual }; bool GatherModuleType(const std::string& app_id, policy_table::ModuleTypes* module_types) const; @@ -112,7 +111,6 @@ class SQLPTRepresentation : public virtual PTRepresentation { bool SaveAccessModule(TypeAccess access, const policy_table::AccessModules& modules); bool SaveRemoteRpc(int module_id, const policy_table::RemoteRpcs& rpcs); -#endif // SDL_REMOTE_CONTROL virtual void GatherModuleMeta(policy_table::ModuleMeta* meta) const; virtual void GatherModuleConfig(policy_table::ModuleConfig* config) const; 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 93edce3e3a..393a419139 100644 --- a/src/components/policy/policy_regular/policy_table_interface_ext.xml +++ b/src/components/policy/policy_regular/policy_table_interface_ext.xml @@ -27,6 +27,7 @@ <element name="speed" /> <element name="engineTorque" /> <element name="externalTemperature" /> + <element name="turnSignal" /> <element name="fuelLevel" /> <element name="fuelLevel_State" /> <element name="headLampStatus" /> @@ -38,6 +39,7 @@ <element name="vin" /> <element name="accPedalPosition" /> <element name="beltStatus" /> + <element name="electronicParkBrakeStatus" /> <element name="driverBraking" /> <element name="prndl" /> <element name="rpm" /> diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc index a48a9a1ba0..d01631a2a2 100644 --- a/src/components/policy/policy_regular/src/policy_manager_impl.cc +++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc @@ -50,11 +50,8 @@ #include "config_profile/profile.h" #include "utils/timer_task_impl.h" #include "utils/make_shared.h" - -#ifdef SDL_REMOTE_CONTROL #include "policy/access_remote.h" #include "policy/access_remote_impl.h" -#endif // SDL_REMOTE_CONTROL policy::PolicyManager* CreateManager() { return new policy::PolicyManagerImpl(); @@ -76,10 +73,8 @@ PolicyManagerImpl::PolicyManagerImpl() : PolicyManager() , listener_(NULL) , cache_(new CacheManager) -#ifdef SDL_REMOTE_CONTROL , access_remote_(new AccessRemoteImpl( CacheManagerInterfaceSPtr::static_pointer_cast<CacheManager>(cache_))) -#endif // SDL_REMOTE_CONTROL , retry_sequence_timeout_(kDefaultRetryTimeoutInMSec) , retry_sequence_index_(0) , timer_retry_sequence_("Retry sequence timer", @@ -89,8 +84,7 @@ PolicyManagerImpl::PolicyManagerImpl() , retry_sequence_url_(0, 0, "") , wrong_ptu_update_received_(false) , send_on_update_sent_out_(false) - , trigger_ptu_(false) { -} + , trigger_ptu_(false) {} void PolicyManagerImpl::set_listener(PolicyListener* listener) { listener_ = listener; @@ -219,10 +213,8 @@ bool PolicyManagerImpl::LoadPT(const std::string& file, return false; } - if (pt_update->policy_table.module_config.certificate.is_initialized()) { - listener_->OnCertificateUpdated( - *(pt_update->policy_table.module_config.certificate)); - } + listener_->OnCertificateUpdated( + *(pt_update->policy_table.module_config.certificate)); std::map<std::string, StringArray> app_hmi_types; cache_->GetHMIAppTypeAfterUpdate(app_hmi_types); @@ -425,12 +417,16 @@ void PolicyManagerImpl::CheckPermissions(const PTString& device_id, "CheckPermissions for " << app_id << " and rpc " << rpc << " for " << hmi_level << " level."); -#ifdef SDL_REMOTE_CONTROL ApplicationOnDevice who = {device_id, app_id}; - const policy_table::Strings& groups = access_remote_->GetGroups(who); -#else // SDL_REMOTE_CONTROL - const policy_table::Strings& groups = cache_->GetGroups(app_id); -#endif // SDL_REMOTE_CONTROL + policy_table::Strings groups; + if (access_remote_->IsAppRemoteControl(who)) { + groups = access_remote_->GetGroups(who); + LOG4CXX_INFO(logger_, + "CheckPermissions for " << app_id << " and rpc " << rpc + << " for " << hmi_level << " level."); + } else { + groups = cache_->GetGroups(app_id); + } cache_->CheckPermissions(groups, hmi_level, rpc, result); if (cache_->IsApplicationRevoked(app_id)) { @@ -486,13 +482,11 @@ void PolicyManagerImpl::SendNotificationOnPermissionsUpdated( std::string default_hmi; default_hmi = "NONE"; -#ifdef SDL_REMOTE_CONTROL const ApplicationOnDevice who = {device_id, application_id}; if (access_remote_->IsAppRemoteControl(who)) { listener()->OnPermissionsUpdated(application_id, notification_data); return; } -#endif // SDL_REMOTE_CONTROL listener()->OnPermissionsUpdated( application_id, notification_data, default_hmi); @@ -730,14 +724,15 @@ void PolicyManagerImpl::GetPermissionsForApp( } FunctionalIdType group_types; -#ifdef SDL_REMOTE_CONTROL - allowed_by_default = false; - bool ret = access_remote_->GetPermissionsForApp( - device_id, policy_app_id, group_types); -#else - bool ret = - cache_->GetPermissionsForApp(device_id, app_id_to_check, group_types); -#endif // REMOTE_CONTROL + const ApplicationOnDevice who = {device_id, app_id_to_check}; + bool ret = false; + if (access_remote_->IsAppRemoteControl(who)) { + allowed_by_default = false; + ret = access_remote_->GetPermissionsForApp( + device_id, policy_app_id, group_types); + } else { + ret = cache_->GetPermissionsForApp(device_id, app_id_to_check, group_types); + } if (!ret) { LOG4CXX_WARN(logger_, @@ -1075,13 +1070,6 @@ StatusNotifier PolicyManagerImpl::AddApplication( device_consent); } else { PromoteExistedApplication(application_id, device_consent); - const policy_table::AppHMIType type = policy_table::AHT_NAVIGATION; - if (helpers::in_range(hmi_types, - (rpc::Enum<policy_table::AppHMIType>)type) && - !HasCertificate()) { - LOG4CXX_DEBUG(logger_, "Certificate does not exist, scheduling update."); - update_status_manager_.ScheduleUpdate(); - } return utils::MakeShared<utils::CallNothing>(); } } @@ -1159,6 +1147,10 @@ bool PolicyManagerImpl::InitPT(const std::string& file_name, if (ret) { RefreshRetrySequence(); update_status_manager_.OnPolicyInit(cache_->UpdateRequired()); + const std::string certificate_data = cache_->GetCertificate(); + if (!certificate_data.empty()) { + listener_->OnCertificateUpdated(certificate_data); + } } return ret; } @@ -1193,7 +1185,6 @@ void PolicyManagerImpl::RetrySequence() { timer_retry_sequence_.Start(timeout_msec, timer::kPeriodic); } -#ifdef SDL_REMOTE_CONTROL void PolicyManagerImpl::SetDefaultHmiTypes(const std::string& application_id, const std::vector<int>& hmi_types) { LOG4CXX_INFO(logger_, "SetDefaultHmiTypes"); @@ -1299,6 +1290,5 @@ void PolicyManagerImpl::set_access_remote( utils::SharedPtr<AccessRemote> access_remote) { access_remote_ = access_remote; } -#endif // SDL_REMOTE_CONTROL } // namespace policy 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 1dae9c5f96..6768fc50e2 100644 --- a/src/components/policy/policy_regular/src/policy_table/enums.cc +++ b/src/components/policy/policy_regular/src/policy_table/enums.cc @@ -119,6 +119,8 @@ bool IsValidEnum(Parameter val) { return true; case P_EXTERNALTEMPERATURE: return true; + case P_TURNSIGNAL: + return true; case P_FUELLEVEL: return true; case P_FUELLEVEL_STATE: @@ -141,6 +143,8 @@ bool IsValidEnum(Parameter val) { return true; case P_BELTSTATUS: return true; + case P_ELECTRONICPARKBRAKESTATUS: + return true; case P_DRIVERBRAKING: return true; case P_PRNDL: @@ -181,6 +185,8 @@ const char* EnumToJsonString(Parameter val) { return "engineTorque"; case P_EXTERNALTEMPERATURE: return "externalTemperature"; + case P_TURNSIGNAL: + return "turnSignal"; case P_FUELLEVEL: return "fuelLevel"; case P_FUELLEVEL_STATE: @@ -203,6 +209,8 @@ const char* EnumToJsonString(Parameter val) { return "accPedalPosition"; case P_BELTSTATUS: return "beltStatus"; + case P_ELECTRONICPARKBRAKESTATUS: + return "electronicParkBrakeStatus"; case P_DRIVERBRAKING: return "driverBraking"; case P_PRNDL: @@ -247,6 +255,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) { } else if ("externalTemperature" == literal) { *result = P_EXTERNALTEMPERATURE; return true; + } else if ("turnSignal" == literal) { + *result = P_TURNSIGNAL; + return true; } else if ("fuelLevel" == literal) { *result = P_FUELLEVEL; return true; @@ -280,6 +291,9 @@ bool EnumFromJsonString(const std::string& literal, Parameter* result) { } else if ("beltStatus" == literal) { *result = P_BELTSTATUS; return true; + } else if ("electronicParkBrakeStatus" == literal) { + *result = P_ELECTRONICPARKBRAKESTATUS; + return true; } else if ("driverBraking" == literal) { *result = P_DRIVERBRAKING; return true; @@ -621,7 +635,6 @@ bool EnumFromJsonString(const std::string& literal, RequestType* result) { } } -#ifdef SDL_REMOTE_CONTROL bool IsValidEnum(ModuleType val) { switch (val) { case MT_CLIMATE: @@ -654,7 +667,6 @@ bool EnumFromJsonString(const std::string& literal, ModuleType* result) { return false; } } -#endif // SDL_REMOTE_CONTROL const std::string kDefaultApp = "default"; const std::string kPreDataConsentApp = "pre_DataConsent"; diff --git a/src/components/policy/policy_regular/src/policy_table/types.cc b/src/components/policy/policy_regular/src/policy_table/types.cc index c4846c0d40..c983e4f12b 100644 --- a/src/components/policy/policy_regular/src/policy_table/types.cc +++ b/src/components/policy/policy_regular/src/policy_table/types.cc @@ -168,11 +168,7 @@ ApplicationParams::ApplicationParams(const Json::Value* value__) , memory_kb(impl::ValueMember(value__, "memory_kb"), 0) , heart_beat_timeout_ms(impl::ValueMember(value__, "heart_beat_timeout_ms")) , certificate(impl::ValueMember(value__, "certificate"), "not_specified") -#ifdef SDL_REMOTE_CONTROL - , moduleType(impl::ValueMember(value__, "moduleType")) -#endif // SDL_REMOTE_CONTROL -{ -} + , moduleType(impl::ValueMember(value__, "moduleType")) {} Json::Value ApplicationParams::ToJsonValue() const { Json::Value result__(PolicyBase::ToJsonValue()); @@ -184,9 +180,7 @@ Json::Value ApplicationParams::ToJsonValue() const { impl::WriteJsonField("memory_kb", memory_kb, &result__); impl::WriteJsonField( "heart_beat_timeout_ms", heart_beat_timeout_ms, &result__); -#ifdef SDL_REMOTE_CONTROL impl::WriteJsonField("moduleType", moduleType, &result__); -#endif // SDL_REMOTE_CONTROL return result__; } @@ -215,11 +209,9 @@ bool ApplicationParams::is_valid() const { if (!certificate.is_valid()) { return false; } -#ifdef SDL_REMOTE_CONTROL if (!moduleType.is_valid()) { return false; } -#endif // SDL_REMOTE_CONTROL return Validate(); } @@ -255,11 +247,9 @@ bool ApplicationParams::struct_empty() const { if (certificate.is_initialized()) { return false; } -#ifdef SDL_REMOTE_CONTROL if (moduleType.is_initialized()) { return false; } -#endif // SDL_REMOTE_CONTROL return true; } @@ -295,11 +285,9 @@ void ApplicationParams::ReportErrors(rpc::ValidationReport* report__) const { if (!certificate.is_valid()) { certificate.ReportErrors(&report__->ReportSubobject("certificate")); } -#ifdef SDL_REMOTE_CONTROL if (!moduleType.is_valid()) { moduleType.ReportErrors(&report__->ReportSubobject("moduleType")); } -#endif // SDL_REMOTE_CONTROL } void ApplicationParams::SetPolicyTableType(PolicyTableType pt_type) { @@ -311,9 +299,7 @@ void ApplicationParams::SetPolicyTableType(PolicyTableType pt_type) { memory_kb.SetPolicyTableType(pt_type); heart_beat_timeout_ms.SetPolicyTableType(pt_type); certificate.SetPolicyTableType(pt_type); -#ifdef SDL_REMOTE_CONTROL moduleType.SetPolicyTableType(pt_type); -#endif // SDL_REMOTE_CONTROL } // RpcParameters methods diff --git a/src/components/policy/policy_regular/src/policy_table/validation.cc b/src/components/policy/policy_regular/src/policy_table/validation.cc index e760293ea6..714dfaae5a 100644 --- a/src/components/policy/policy_regular/src/policy_table/validation.cc +++ b/src/components/policy/policy_regular/src/policy_table/validation.cc @@ -147,7 +147,6 @@ bool ApplicationPoliciesSection::Validate() const { return true; } -#ifdef SDL_REMOTE_CONTROL bool ApplicationParams::ValidateModuleTypes() const { // moduleType is optional so see Optional<T>::is_valid() bool is_initialized = moduleType->is_initialized(); @@ -181,11 +180,6 @@ bool ApplicationParams::ValidateModuleTypes() const { bool ApplicationParams::Validate() const { return ValidateModuleTypes(); } -#else // SDL_REMOTE_CONTROL -bool ApplicationParams::Validate() const { - return true; -} -#endif // SDL_REMOTE_CONTROL bool RpcParameters::Validate() const { return true; diff --git a/src/components/policy/policy_regular/src/sql_pt_representation.cc b/src/components/policy/policy_regular/src/sql_pt_representation.cc index a57230aeb1..b1e574578e 100644 --- a/src/components/policy/policy_regular/src/sql_pt_representation.cc +++ b/src/components/policy/policy_regular/src/sql_pt_representation.cc @@ -723,7 +723,6 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection( if (!GatherAppGroup(app_id, ¶ms.groups)) { return false; } -#ifdef SDL_REMOTE_CONTROL bool denied = false; if (!GatherRemoteControlDenied(app_id, &denied)) { return false; @@ -733,7 +732,6 @@ bool SQLPTRepresentation::GatherApplicationPoliciesSection( return false; } } -#endif // SDL_REMOTE_CONTROL if (!GatherNickName(app_id, &*params.nicknames)) { return false; } @@ -905,12 +903,10 @@ bool SQLPTRepresentation::SaveApplicationPoliciesSection( LOG4CXX_WARN(logger_, "Incorrect delete from app_group."); return false; } -#ifdef SDL_REMOTE_CONTROL if (!query_delete.Exec(sql_pt::kDeleteModuleTypes)) { LOG4CXX_WARN(logger_, "Incorrect delete from module_type."); return false; } -#endif // SDL_REMOTE_CONTROL if (!query_delete.Exec(sql_pt::kDeleteApplication)) { LOG4CXX_WARN(logger_, "Incorrect delete from application."); return false; @@ -998,13 +994,11 @@ bool SQLPTRepresentation::SaveSpecificAppPolicy( if (!SaveAppGroup(app.first, app.second.groups)) { return false; } -#ifdef SDL_REMOTE_CONTROL bool denied = !app.second.moduleType->is_initialized(); if (!SaveRemoteControlDenied(app.first, denied) || !SaveModuleType(app.first, *app.second.moduleType)) { return false; } -#endif // SDL_REMOTE_CONTROL if (!SaveNickname(app.first, *app.second.nicknames)) { return false; } @@ -1671,8 +1665,6 @@ bool SQLPTRepresentation::GatherAppGroup( return true; } -#ifdef SDL_REMOTE_CONTROL - bool SQLPTRepresentation::GatherRemoteControlDenied(const std::string& app_id, bool* denied) const { LOG4CXX_AUTO_TRACE(logger_); @@ -1862,7 +1854,6 @@ bool SQLPTRepresentation::GatherRemoteRpc( } return true; } -#endif // SDL_REMOTE_CONTROL bool SQLPTRepresentation::SaveApplicationCustomData(const std::string& app_id, bool is_revoked, diff --git a/src/components/policy/policy_regular/test/CMakeLists.txt b/src/components/policy/policy_regular/test/CMakeLists.txt index 62ff691f83..bd6af96867 100644 --- a/src/components/policy/policy_regular/test/CMakeLists.txt +++ b/src/components/policy/policy_regular/test/CMakeLists.txt @@ -45,11 +45,6 @@ include_directories( ) collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}") -if (NOT REMOTE_CONTROL) - list (REMOVE_ITEM SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/access_remote_impl_test.cc - ) -endif () set(LIBRARIES gmock diff --git a/src/components/policy/policy_regular/test/PTU.json b/src/components/policy/policy_regular/test/PTU.json index 7d6837f94e..2f4735dd66 100644 --- a/src/components/policy/policy_regular/test/PTU.json +++ b/src/components/policy/policy_regular/test/PTU.json @@ -296,6 +296,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -308,6 +309,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -320,6 +322,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -332,6 +335,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -352,6 +356,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -371,6 +376,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -390,6 +396,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -408,6 +415,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", diff --git a/src/components/policy/policy_regular/test/PTU2.json b/src/components/policy/policy_regular/test/PTU2.json index 7a5c29410c..806ab8bcc0 100644 --- a/src/components/policy/policy_regular/test/PTU2.json +++ b/src/components/policy/policy_regular/test/PTU2.json @@ -296,6 +296,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -308,6 +309,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -320,6 +322,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -332,6 +335,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -352,6 +356,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -371,6 +376,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -390,6 +396,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -408,6 +415,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", diff --git a/src/components/policy/policy_regular/test/PTU3.json b/src/components/policy/policy_regular/test/PTU3.json index 1b3340ec8c..28396be29a 100644 --- a/src/components/policy/policy_regular/test/PTU3.json +++ b/src/components/policy/policy_regular/test/PTU3.json @@ -296,6 +296,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -308,6 +309,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -320,6 +322,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -332,6 +335,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -352,6 +356,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -371,6 +376,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -390,6 +396,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -408,6 +415,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", diff --git a/src/components/policy/policy_regular/test/PTU4.json b/src/components/policy/policy_regular/test/PTU4.json index 9aa04dd8ba..4592e228df 100644 --- a/src/components/policy/policy_regular/test/PTU4.json +++ b/src/components/policy/policy_regular/test/PTU4.json @@ -296,6 +296,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -308,6 +309,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -320,6 +322,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -332,6 +335,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -352,6 +356,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -371,6 +376,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -390,6 +396,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -408,6 +415,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", diff --git a/src/components/policy/policy_regular/test/policy_manager_impl_test.cc b/src/components/policy/policy_regular/test/policy_manager_impl_test.cc index 5fd0a48f7c..e4e361c52c 100644 --- a/src/components/policy/policy_regular/test/policy_manager_impl_test.cc +++ b/src/components/policy/policy_regular/test/policy_manager_impl_test.cc @@ -53,9 +53,8 @@ #include "utils/date_time.h" #include "utils/make_shared.h" #include "utils/gen_hash.h" -#ifdef SDL_REMOTE_CONTROL #include "policy/mock_access_remote.h" -#endif // SDL_REMOTE_CONTROL + using ::testing::ReturnRef; using ::testing::DoAll; using ::testing::SetArgReferee; @@ -146,20 +145,15 @@ class PolicyManagerImplTest : public ::testing::Test { MockCacheManagerInterface* cache_manager; NiceMock<MockPolicyListener> listener; const std::string device_id; -#ifdef SDL_REMOTE_CONTROL utils::SharedPtr<access_remote_test::MockAccessRemote> access_remote; -#endif // SDL_REMOTE_CONTROL void SetUp() OVERRIDE { manager = new PolicyManagerImpl(); manager->set_listener(&listener); cache_manager = new MockCacheManagerInterface(); manager->set_cache_manager(cache_manager); - -#ifdef SDL_REMOTE_CONTROL access_remote = new access_remote_test::MockAccessRemote(); manager->set_access_remote(access_remote); -#endif // SDL_REMOTE_CONTROL } void TearDown() OVERRIDE { diff --git a/src/components/policy/policy_regular/test/ptu2_requestType.json b/src/components/policy/policy_regular/test/ptu2_requestType.json index e127b2fad6..2a05a94f8b 100644 --- a/src/components/policy/policy_regular/test/ptu2_requestType.json +++ b/src/components/policy/policy_regular/test/ptu2_requestType.json @@ -416,6 +416,7 @@ "parameters": [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -432,6 +433,7 @@ "parameters": [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -448,6 +450,7 @@ "parameters": [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -464,6 +467,7 @@ "parameters": [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -488,6 +492,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -511,6 +516,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -534,6 +540,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -556,6 +563,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", diff --git a/src/components/policy/policy_regular/test/ptu_requestType.json b/src/components/policy/policy_regular/test/ptu_requestType.json index bd6a86dac3..b0d9117568 100644 --- a/src/components/policy/policy_regular/test/ptu_requestType.json +++ b/src/components/policy/policy_regular/test/ptu_requestType.json @@ -416,6 +416,7 @@ "parameters": [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -432,6 +433,7 @@ "parameters": [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -448,6 +450,7 @@ "parameters": [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -464,6 +467,7 @@ "parameters": [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -488,6 +492,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -511,6 +516,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -534,6 +540,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -556,6 +563,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", 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 ced0a9d603..59e3f947c3 100644 --- a/src/components/policy/policy_regular/test/sdl_preloaded_pt.json +++ b/src/components/policy/policy_regular/test/sdl_preloaded_pt.json @@ -297,6 +297,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -309,6 +310,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -321,6 +323,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -333,6 +336,7 @@ "LIMITED"], "parameters": ["accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -353,6 +357,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -372,6 +377,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -391,6 +397,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -409,6 +416,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", 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 f8be46d2b5..7b882c6ceb 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 @@ -1431,6 +1431,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1443,6 +1444,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1455,6 +1457,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1467,6 +1470,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1612,6 +1616,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1629,6 +1634,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1646,6 +1652,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1662,6 +1669,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", 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 fe7b036f94..7d90275328 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 @@ -1431,6 +1431,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1443,6 +1444,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1455,6 +1457,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1467,6 +1470,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1612,6 +1616,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1629,6 +1634,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1646,6 +1652,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1662,6 +1669,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", 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 e013243760..909e4d5238 100644 --- a/src/components/policy/policy_regular/test/sdl_pt_update.json +++ b/src/components/policy/policy_regular/test/sdl_pt_update.json @@ -1433,6 +1433,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1445,6 +1446,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1457,6 +1459,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1469,6 +1472,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1590,6 +1594,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1607,6 +1612,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1624,6 +1630,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1640,6 +1647,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", 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 bc8d95302c..5827ab287a 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 @@ -1431,6 +1431,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1443,6 +1444,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1455,6 +1457,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1467,6 +1470,7 @@ "parameters" : [ "accPedalPosition", "beltStatus", + "electronicParkBrakeStatus", "driverBraking", "myKey", "prndl", @@ -1588,6 +1592,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1605,6 +1610,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1622,6 +1628,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", @@ -1638,6 +1645,7 @@ "engineOilLife", "engineTorque", "externalTemperature", + "turnSignal", "fuelLevel", "fuelLevel_State", "headLampStatus", |