diff --git a/hdf/location/agnss/BUILD.gn b/hdf/location/agnss/BUILD.gn index 2a0ead1e..93f35b40 100644 --- a/hdf/location/agnss/BUILD.gn +++ b/hdf/location/agnss/BUILD.gn @@ -32,9 +32,9 @@ ohos_moduletest_suite("HatsHdfLocationagnssTest") { "c_utils:utils", "cellular_data:tel_cellular_data_api", "core_service:tel_core_service_api", - "drivers_interface_location_agnss:liblocation_agnss_proxy_1.0", - "drivers_interface_location_geofence:liblocation_geofence_proxy_1.0", - "drivers_interface_location_gnss:liblocation_gnss_proxy_1.0", + "drivers_interface_location_agnss:liblocation_agnss_proxy_2.0", + "drivers_interface_location_geofence:liblocation_geofence_proxy_2.0", + "drivers_interface_location_gnss:liblocation_gnss_proxy_2.0", "hdf_core:libhdf_host", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdi", diff --git a/hdf/location/agnss/agnss_callback_impl.h b/hdf/location/agnss/agnss_callback_impl.h index e2beab39..5b995c07 100644 --- a/hdf/location/agnss/agnss_callback_impl.h +++ b/hdf/location/agnss/agnss_callback_impl.h @@ -13,11 +13,11 @@ * limitations under the License. */ -#ifndef OHOS_HDI_LOCATION_AGNSS_V1_0_AGNSSCALLBACKIMPL_H -#define OHOS_HDI_LOCATION_AGNSS_V1_0_AGNSSCALLBACKIMPL_H +#ifndef OHOS_HDI_LOCATION_AGNSS_V2_0_AGNSSCALLBACKIMPL_H +#define OHOS_HDI_LOCATION_AGNSS_V2_0_AGNSSCALLBACKIMPL_H #include -#include +#include #include "core_service_client.h" #include "cell_information.h" @@ -25,7 +25,7 @@ namespace OHOS { namespace HDI { namespace Location { namespace Agnss { -namespace V1_0 { +namespace V2_0 { class AgnssCallbackImpl : public IAGnssCallback { public: AgnssCallbackImpl() @@ -34,7 +34,7 @@ public: {} int32_t RequestSetUpAgnssDataLink(const AGnssDataLinkRequest& request) override; int32_t RequestSubscriberSetId(SubscriberSetIdType type) override; - int32_t RequestAgnssRefInfo() override; + int32_t RequestAgnssRefInfo(AGnssRefInfoType type) override; private: void JudgmentDataGsm(AGnssRefInfo& refInfo, sptr infoItem); void JudgmentDataUmts(AGnssRefInfo& refInfo, sptr infoItem); @@ -42,11 +42,11 @@ private: void JudgmentDataNr(AGnssRefInfo& refInfo, sptr infoItem); std::string Str16ToStr8(std::u16string str); }; -} // V1_0 +} // V2_0 } // Agnss } // Location } // HDI } // OHOS -#endif // OHOS_HDI_LOCATION_AGNSS_V1_0_AGNSSCALLBACKIMPL_H +#endif // OHOS_HDI_LOCATION_AGNSS_V2_0_AGNSSCALLBACKIMPL_H diff --git a/hdf/location/agnss/agnss_hdi_test.cpp b/hdf/location/agnss/agnss_hdi_test.cpp index 1f58967e..4af5fbef 100644 --- a/hdf/location/agnss/agnss_hdi_test.cpp +++ b/hdf/location/agnss/agnss_hdi_test.cpp @@ -25,13 +25,14 @@ #include "hdf_base.h" #include "hdf_log.h" #include "osal_time.h" -#include "v1_0/ia_gnss_interface.h" +#include "v2_0/ia_gnss_interface.h" +#include "v2_0/ignss_interface.h" #include "agnss_callback_impl.h" #include "cellular_data_client.h" #include "gnss_callback_impl.h" -using namespace OHOS::HDI::Location::Agnss::V1_0; -using namespace OHOS::HDI::Location::Gnss::V1_0; +using namespace OHOS::HDI::Location::Agnss::V2_0; +using namespace OHOS::HDI::Location::Gnss::V2_0; using namespace std; using namespace testing::ext; @@ -69,7 +70,7 @@ int32_t AgnssCallbackImpl::RequestSubscriberSetId(SubscriberSetIdType type) std::u16string imsi; DelayedRefSingleton::GetInstance().GetIMSI(slotId, imsi); SubscriberSetId setId; - setId.type = HDI::Location::Agnss::V1_0::SETID_TYPE_IMSI; + setId.type = HDI::Location::Agnss::V2_0::AGNSS_SETID_TYPE_IMSI; setId.id = Str16ToStr8(imsi); if (g_iagnssHci == nullptr) { printf("g_iagnssHci is null!\n"); @@ -79,7 +80,7 @@ int32_t AgnssCallbackImpl::RequestSubscriberSetId(SubscriberSetIdType type) return HDF_SUCCESS; } -int32_t AgnssCallbackImpl::RequestAgnssRefInfo() +int32_t AgnssCallbackImpl::RequestAgnssRefInfo(AGnssRefInfoType type) { if (g_iagnssHci == nullptr) { printf("g_iagnssHci is null!\n"); @@ -96,7 +97,7 @@ int32_t AgnssCallbackImpl::RequestAgnssRefInfo() } AGnssRefInfo refInfo; CellInformation::CellType cellType = infoItem->GetNetworkType(); - refInfo.type = HDI::Location::Agnss::V1_0::ANSS_REF_INFO_TYPE_CELLID; + refInfo.type = type; switch (cellType) { case CellInformation::CellType::CELL_TYPE_GSM: { JudgmentDataGsm(refInfo, infoItem); @@ -129,7 +130,7 @@ void AgnssCallbackImpl::JudgmentDataGsm(AGnssRefInfo& refInfo, sptr(infoItem.GetRefPtr()); if (gsmCellInfo != nullptr) { - refInfo.cellId.type = HDI::Location::Agnss::V1_0::CELLID_TYPE_GSM; + refInfo.cellId.type = HDI::Location::Agnss::V2_0::CELLID_TYPE_GSM; refInfo.cellId.mcc = static_cast(std::stoi(gsmCellInfo->GetMcc())); refInfo.cellId.mnc = static_cast(std::stoi(gsmCellInfo->GetMnc())); refInfo.cellId.lac = static_cast(gsmCellInfo->GetLac()); @@ -141,7 +142,7 @@ void AgnssCallbackImpl::JudgmentDataLte(AGnssRefInfo& refInfo, sptr(infoItem.GetRefPtr()); if (lteCellInfo != nullptr) { - refInfo.cellId.type = HDI::Location::Agnss::V1_0::CELLID_TYPE_LTE; + refInfo.cellId.type = HDI::Location::Agnss::V2_0::CELLID_TYPE_LTE; refInfo.cellId.mcc = static_cast(std::stoi(lteCellInfo->GetMcc())); refInfo.cellId.mnc = static_cast(std::stoi(lteCellInfo->GetMnc())); refInfo.cellId.tac = static_cast(lteCellInfo->GetTac()); @@ -154,7 +155,7 @@ void AgnssCallbackImpl::JudgmentDataNr(AGnssRefInfo& refInfo, sptr(infoItem.GetRefPtr()); if (nrCellInfo != nullptr) { - refInfo.cellId.type = HDI::Location::Agnss::V1_0::CELLID_TYPE_NR; + refInfo.cellId.type = HDI::Location::Agnss::V2_0::CELLID_TYPE_NR; refInfo.cellId.mcc = static_cast(std::stoi(nrCellInfo->GetMcc())); refInfo.cellId.mnc = static_cast(std::stoi(nrCellInfo->GetMnc())); refInfo.cellId.tac = static_cast(nrCellInfo->GetTac()); @@ -168,7 +169,7 @@ void AgnssCallbackImpl::JudgmentDataUmts(AGnssRefInfo& refInfo, sptr(infoItem.GetRefPtr()); if (wcdmaCellInfo != nullptr) { - refInfo.cellId.type = HDI::Location::Agnss::V1_0::CELLID_TYPE_UMTS; + refInfo.cellId.type = HDI::Location::Agnss::V2_0::CELLID_TYPE_UMTS; refInfo.cellId.mcc = static_cast(std::stoi(wcdmaCellInfo->GetMcc())); refInfo.cellId.mnc = static_cast(std::stoi(wcdmaCellInfo->GetMnc())); refInfo.cellId.lac = static_cast(wcdmaCellInfo->GetLac()); @@ -200,27 +201,22 @@ int32_t GnssCallbackImpl::ReportLocation(const LocationInfo& location) int32_t GnssCallbackImpl::ReportGnssWorkingStatus(GnssWorkingStatus status) { - if (status == GnssWorkingStatus::GNSS_STATUS_NONE) { - printf("GNSS_STATUS_NONE\n"); + if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_NONE) { + printf("GNSS_WORKING_STATUS_NONE\n"); return HDF_SUCCESS; - } - else if(status == GnssWorkingStatus::GNSS_STATUS_SESSION_BEGIN){ - printf("GNSS_STATUS_SESSION_BEGIN\n"); + } else if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_SESSION_BEGIN) { + printf("GNSS_WORKING_STATUS_SESSION_BEGIN\n"); return HDF_SUCCESS; - } - else if(status == GnssWorkingStatus::GNSS_STATUS_SESSION_END){ - printf("GNSS_STATUS_SESSION_END\n"); + } else if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_SESSION_END) { + printf("GNSS_WORKING_STATUS_SESSION_END\n"); return HDF_SUCCESS; - } - else if(status == GnssWorkingStatus::GNSS_STATUS_ENGINE_ON){ - printf("GNSS_STATUS_ENGINE_ON\n"); + } else if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_ENGINE_ON) { + printf("GNSS_WORKING_STATUS_ENGINE_ON\n"); return HDF_SUCCESS; - } - else if(status == GnssWorkingStatus::GNSS_STATUS_ENGINE_OFF){ - printf("GNSS_STATUS_ENGINE_OFF\n"); + } else if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_ENGINE_OFF) { + printf("GNSS_WORKING_STATUS_ENGINE_OFF\n"); return HDF_SUCCESS; - } - else{ + } else { printf("Gnss status fail\n"); return HDF_FAILURE; } @@ -279,6 +275,11 @@ int32_t GnssCallbackImpl::ReportCachedLocation(const std::vector& return HDF_SUCCESS; } +int32_t GnssCallbackImpl::ReportGnssNiNotification(const GnssNiNotificationRequest& notification) +{ + (void)notification; + return HDF_SUCCESS; +} void LocationAgnssTest::SetUpTestCase() { @@ -371,7 +372,7 @@ HWTEST_F(LocationAgnssTest, SUB_DriverSystem_SetSubscriberSetId_0100, TestSize.L return; } SubscriberSetId id; - id.type = SubscriberSetIdType::SETID_TYPE_NONE; + id.type = SubscriberSetIdType::AGNSS_SETID_TYPE_NULL; id.id = "111"; int32_t ret = g_iagnssHci->SetSubscriberSetId(id); EXPECT_EQ(HDF_SUCCESS, ret); diff --git a/hdf/location/geofence/BUILD.gn b/hdf/location/geofence/BUILD.gn index c8e229e6..2c07aa30 100644 --- a/hdf/location/geofence/BUILD.gn +++ b/hdf/location/geofence/BUILD.gn @@ -30,9 +30,9 @@ ohos_moduletest_suite("HatsHdfLocationgeofenceTest") { if (is_standard_system) { external_deps = [ "c_utils:utils", - "drivers_interface_location_agnss:liblocation_agnss_proxy_1.0", - "drivers_interface_location_geofence:liblocation_geofence_proxy_1.0", - "drivers_interface_location_gnss:liblocation_gnss_proxy_1.0", + "drivers_interface_location_agnss:liblocation_agnss_proxy_2.0", + "drivers_interface_location_geofence:liblocation_geofence_proxy_2.0", + "drivers_interface_location_gnss:liblocation_gnss_proxy_2.0", "hdf_core:libhdf_host", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdi", diff --git a/hdf/location/geofence/geofence_callback_impl.h b/hdf/location/geofence/geofence_callback_impl.h index 0eebc14b..e4f41c76 100644 --- a/hdf/location/geofence/geofence_callback_impl.h +++ b/hdf/location/geofence/geofence_callback_impl.h @@ -13,17 +13,17 @@ * limitations under the License. */ -#ifndef OHOS_HDI_LOCATION_GEOFENCE_V1_0_GEOFENCECALLBACKIMPL_H -#define OHOS_HDI_LOCATION_GEOFENCE_V1_0_GEOFENCECALLBACKIMPL_H +#ifndef OHOS_HDI_LOCATION_GEOFENCE_V2_0_GEOFENCECALLBACKIMPL_H +#define OHOS_HDI_LOCATION_GEOFENCE_V2_0_GEOFENCECALLBACKIMPL_H #include -#include +#include namespace OHOS { namespace HDI { namespace Location { namespace Geofence { -namespace V1_0 { +namespace V2_0 { class GeofenceCallbackImpl : public IGeofenceCallback { public: GeofenceCallbackImpl() @@ -34,11 +34,11 @@ public: int32_t ReportGeofenceEvent(int32_t fenceIndex, const LocationInfo& location, GeofenceEvent event, int64_t timestamp) override; int32_t ReportGeofenceOperateResult(int32_t fenceIndex, GeofenceOperateType type, GeofenceOperateResult result) override; }; -} // V1_0 +} // V2_0 } // Geofence } // Location } // HDI } // OHOS -#endif // OHOS_HDI_LOCATION_GEOFENCE_V1_0_GEOFENCECALLBACKIMPL_H +#endif // OHOS_HDI_LOCATION_GEOFENCE_V2_0_GEOFENCECALLBACKIMPL_H diff --git a/hdf/location/geofence/location_geofence_test.cpp b/hdf/location/geofence/location_geofence_test.cpp index a2062086..7997b2c2 100644 --- a/hdf/location/geofence/location_geofence_test.cpp +++ b/hdf/location/geofence/location_geofence_test.cpp @@ -25,10 +25,10 @@ #include "hdf_base.h" #include "hdf_log.h" #include "osal_time.h" -#include "v1_0/igeofence_interface.h" +#include "v2_0/igeofence_interface.h" #include "geofence_callback_impl.h" -using namespace OHOS::HDI::Location::Geofence::V1_0; +using namespace OHOS::HDI::Location::Geofence::V2_0; using namespace std; using namespace testing::ext; @@ -159,7 +159,7 @@ HWTEST_F(LocationGeofenceTest, SUB_DriverSystem_AddGnssGeofence_0100, TestSize.L fence.latitude = 118.90; fence.longitude = 15.25; fence.radius = 12.26; - GeofenceEvent geoevent = GeofenceEvent::GEOFENCE_EVENT_UNCERTAIN ; + GeofenceEvent geoevent = GeofenceEvent::GEOFENCE_EVENT_UNCERTAIN; int32_t ret = g_igeofenceHci->AddGnssGeofence(fence,geoevent); EXPECT_EQ(HDF_SUCCESS, ret); } diff --git a/hdf/location/geofence_additional/BUILD.gn b/hdf/location/geofence_additional/BUILD.gn index 69adc97b..28451bb3 100644 --- a/hdf/location/geofence_additional/BUILD.gn +++ b/hdf/location/geofence_additional/BUILD.gn @@ -30,9 +30,9 @@ ohos_moduletest_suite("HatsHdfLocationgeofenceAdditionalTest") { if (is_standard_system) { external_deps = [ "c_utils:utils", - "drivers_interface_location_agnss:liblocation_agnss_proxy_1.0", - "drivers_interface_location_geofence:liblocation_geofence_proxy_1.0", - "drivers_interface_location_gnss:liblocation_gnss_proxy_1.0", + "drivers_interface_location_agnss:liblocation_agnss_proxy_2.0", + "drivers_interface_location_geofence:liblocation_geofence_proxy_2.0", + "drivers_interface_location_gnss:liblocation_gnss_proxy_2.0", "hdf_core:libhdf_host", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdi", diff --git a/hdf/location/geofence_additional/geofence_callback_impl.h b/hdf/location/geofence_additional/geofence_callback_impl.h index 01581875..d745cfce 100644 --- a/hdf/location/geofence_additional/geofence_callback_impl.h +++ b/hdf/location/geofence_additional/geofence_callback_impl.h @@ -13,17 +13,17 @@ * limitations under the License. */ -#ifndef OHOS_HDI_LOCATION_GEOFENCE_V1_0_GEOFENCECALLBACKIMPL_H -#define OHOS_HDI_LOCATION_GEOFENCE_V1_0_GEOFENCECALLBACKIMPL_H +#ifndef OHOS_HDI_LOCATION_GEOFENCE_V2_0_GEOFENCECALLBACKIMPL_H +#define OHOS_HDI_LOCATION_GEOFENCE_V2_0_GEOFENCECALLBACKIMPL_H #include -#include +#include namespace OHOS { namespace HDI { namespace Location { namespace Geofence { -namespace V1_0 { +namespace V2_0 { class GeofenceCallbackImpl : public IGeofenceCallback { public: GeofenceCallbackImpl() {} @@ -34,7 +34,7 @@ public: int32_t ReportGeofenceOperateResult(int32_t fenceIndex, GeofenceOperateType type, GeofenceOperateResult result) override; }; -} // namespace V1_0 +} // namespace V2_0 } // namespace Geofence } // namespace Location } // namespace HDI diff --git a/hdf/location/geofence_additional/location_geofence_test.cpp b/hdf/location/geofence_additional/location_geofence_test.cpp index bd6b89be..81e5acbc 100644 --- a/hdf/location/geofence_additional/location_geofence_test.cpp +++ b/hdf/location/geofence_additional/location_geofence_test.cpp @@ -25,10 +25,10 @@ #include "hdf_base.h" #include "hdf_log.h" #include "osal_time.h" -#include "v1_0/igeofence_interface.h" +#include "v2_0/igeofence_interface.h" #include "geofence_callback_impl.h" -using namespace OHOS::HDI::Location::Geofence::V1_0; +using namespace OHOS::HDI::Location::Geofence::V2_0; using namespace std; using namespace testing::ext; diff --git a/hdf/location/gnss/BUILD.gn b/hdf/location/gnss/BUILD.gn index 42f1e482..87a6d518 100644 --- a/hdf/location/gnss/BUILD.gn +++ b/hdf/location/gnss/BUILD.gn @@ -33,9 +33,9 @@ ohos_moduletest_suite("HatsHdfLocationgnssTest") { if (is_standard_system) { external_deps = [ "c_utils:utils", - "drivers_interface_location_agnss:liblocation_agnss_proxy_1.0", - "drivers_interface_location_geofence:liblocation_geofence_proxy_1.0", - "drivers_interface_location_gnss:liblocation_gnss_proxy_1.0", + "drivers_interface_location_agnss:liblocation_agnss_proxy_2.0", + "drivers_interface_location_geofence:liblocation_geofence_proxy_2.0", + "drivers_interface_location_gnss:liblocation_gnss_proxy_2.0", "hdf_core:libhdf_host", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdi", diff --git a/hdf/location/gnss/gnss_callback_impl.h b/hdf/location/gnss/gnss_callback_impl.h index 93389ca0..1f6a6e19 100644 --- a/hdf/location/gnss/gnss_callback_impl.h +++ b/hdf/location/gnss/gnss_callback_impl.h @@ -13,19 +13,19 @@ * limitations under the License. */ -#ifndef OHOS_HDI_LOCATION_GNSS_V1_0_GNSSCALLBACKIMPL_H -#define OHOS_HDI_LOCATION_GNSS_V1_0_GNSSCALLBACKIMPL_H +#ifndef OHOS_HDI_LOCATION_GNSS_V2_0_GNSSCALLBACKIMPL_H +#define OHOS_HDI_LOCATION_GNSS_V2_0_GNSSCALLBACKIMPL_H #include #include -#include +#include namespace OHOS { namespace HDI { namespace Location { namespace Gnss { -namespace V1_0 { +namespace V2_0 { class GnssCallbackImpl : public IGnssCallback { public: GnssCallbackImpl() @@ -40,12 +40,13 @@ public: int32_t RequestGnssReferenceInfo(GnssRefInfoType type) override; int32_t RequestPredictGnssData() override; int32_t ReportCachedLocation(const std::vector& gnssLocations) override; + int32_t ReportGnssNiNotification(const GnssNiNotificationRequest& notification) override; }; -} // V1_0 +} // V2_0 } // Gnss } // Location } // HDI } // OHOS -#endif // OHOS_HDI_LOCATION_GNSS_V1_0_GNSSCALLBACKIMPL_H +#endif // OHOS_HDI_LOCATION_GNSS_V2_0_GNSSCALLBACKIMPL_H diff --git a/hdf/location/gnss/location_gnss_test.cpp b/hdf/location/gnss/location_gnss_test.cpp index 8672fff2..2ab6f176 100644 --- a/hdf/location/gnss/location_gnss_test.cpp +++ b/hdf/location/gnss/location_gnss_test.cpp @@ -27,11 +27,11 @@ #include "hdf_base.h" #include "hdf_log.h" #include "osal_time.h" -#include "v1_0/ignss_interface.h" +#include "v2_0/ignss_interface.h" #include "gnss_callback_impl.h" -using namespace OHOS::HDI::Location::Gnss::V1_0; +using namespace OHOS::HDI::Location::Gnss::V2_0; using namespace std; using namespace testing::ext; @@ -66,27 +66,22 @@ int32_t GnssCallbackImpl::ReportLocation(const LocationInfo& location) int32_t GnssCallbackImpl::ReportGnssWorkingStatus(GnssWorkingStatus status) { - if (status == GnssWorkingStatus::GNSS_STATUS_NONE) { - printf("GNSS_STATUS_NONE\n"); + if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_NONE) { + printf("GNSS_WORKING_STATUS_NONE\n"); return HDF_SUCCESS; - } - else if(status == GnssWorkingStatus::GNSS_STATUS_SESSION_BEGIN){ - printf("GNSS_STATUS_SESSION_BEGIN\n"); + } else if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_SESSION_BEGIN) { + printf("GNSS_WORKING_STATUS_SESSION_BEGIN\n"); return HDF_SUCCESS; - } - else if(status == GnssWorkingStatus::GNSS_STATUS_SESSION_END){ - printf("GNSS_STATUS_SESSION_END\n"); + } else if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_SESSION_END) { + printf("GNSS_WORKING_STATUS_SESSION_END\n"); return HDF_SUCCESS; - } - else if(status == GnssWorkingStatus::GNSS_STATUS_ENGINE_ON){ - printf("GNSS_STATUS_ENGINE_ON\n"); + } else if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_ENGINE_ON) { + printf("GNSS_WORKING_STATUS_ENGINE_ON\n"); return HDF_SUCCESS; - } - else if(status == GnssWorkingStatus::GNSS_STATUS_ENGINE_OFF){ - printf("GNSS_STATUS_ENGINE_OFF\n"); + } else if (status == GnssWorkingStatus::GNSS_WORKING_STATUS_ENGINE_OFF) { + printf("GNSS_WORKING_STATUS_ENGINE_OFF\n"); return HDF_SUCCESS; - } - else{ + } else { printf("Gnss status fail\n"); return HDF_FAILURE; } @@ -145,7 +140,11 @@ int32_t GnssCallbackImpl::ReportCachedLocation(const std::vector& return HDF_SUCCESS; } - +int32_t GnssCallbackImpl::ReportGnssNiNotification(const GnssNiNotificationRequest& notification) +{ + (void)notification; + return HDF_SUCCESS; +} void LocationGnssTest::SetUpTestCase() { @@ -236,9 +235,6 @@ HWTEST_F(LocationGnssTest, SUB_DriverSystem_SetGnssConfigPara_0100, TestSize.Lev } GnssConfigPara para; para.gnssBasic.minInterval = 10; - para.gnssBasic.accuracy = 50; - para.gnssBasic.firstFixTime = 300; - para.gnssBasic.isPeriodicPositioning = true; para.gnssBasic.gnssMode = GnssWorkingMode::GNSS_WORKING_MODE_STANDALONE; para.gnssCaching.interval = 20; para.gnssCaching.fifoFullNotify = true; @@ -260,20 +256,20 @@ HWTEST_F(LocationGnssTest, SUB_DriverSystem_SetGnssReferenceInfo_0100, TestSize. } GnssRefInfo refInfo; refInfo.type = GnssRefInfoType::GNSS_REF_INFO_TIME; - refInfo.time.timeMs = 50; - refInfo.time.timeReferenceMs = 100; - refInfo.time.uncertainty = 200; - refInfo.location.latitude = 39.56; - refInfo.location.longitude = 116.20; - refInfo.location.accuracy = 90; - refInfo.best_location.latitude = 39.58; - refInfo.best_location.longitude = 116.45; - refInfo.best_location.altitude = 110; - refInfo.best_location.accuracy = 60; - refInfo.best_location.speed = 60; - refInfo.best_location.direction = 60; - refInfo.best_location.timeStamp = 60; - refInfo.best_location.timeSinceBoot = 60; + refInfo.time.time = 50; + refInfo.time.elapsedRealtime = 100; + refInfo.time.uncertaintyOfTime = 200; + refInfo.gnssLocation.latitude = 39.56; + refInfo.gnssLocation.longitude = 116.20; + refInfo.gnssLocation.horizontalAccuracy = 90; + refInfo.bestLocation.latitude = 39.58; + refInfo.bestLocation.longitude = 116.45; + refInfo.bestLocation.altitude = 110; + refInfo.bestLocation.horizontalAccuracy = 60; + refInfo.bestLocation.speed = 60; + refInfo.bestLocation.bearing = 60; + refInfo.bestLocation.timeForFix = 60; + refInfo.bestLocation.timeSinceBoot = 60; int32_t ret = g_ignssHci->SetGnssReferenceInfo(refInfo); EXPECT_EQ(HDF_SUCCESS, ret); } @@ -305,7 +301,7 @@ HWTEST_F(LocationGnssTest, SUB_DriverSystem_DeleteAuxiliaryData_0100, TestSize.L ASSERT_NE(nullptr, g_ignssHci); return; } - GnssAuxiliaryData auxdata = GnssAuxiliaryData::GNSS_AUXILIARY_DATA_EPHEMERIS; + GnssAuxiliaryDataType auxdata = GnssAuxiliaryDataType::GNSS_AUXILIARY_DATA_EPHEMERIS; int32_t ret = g_ignssHci->DeleteAuxiliaryData(auxdata); EXPECT_EQ(HDF_SUCCESS, ret); }