Merge 86cf3280bd
on remote branch
Change-Id: Iddfe2b2dbe996a5df5a0f18ec91dfc7d32a657fc
This commit is contained in:
commit
7616889a23
8 changed files with 91 additions and 92 deletions
|
@ -102,7 +102,7 @@ Return<bool> AGnssRil::updateNetworkState(bool connected, NetworkType type, bool
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mGnss->getGnssInterface()->updateConnectionStatus(connected, typeout);
|
mGnss->getGnssInterface()->updateConnectionStatus(connected, false, typeout, 0);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ Return<bool> AGnssRil::updateNetworkState(bool connected, NetworkType type, bool
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
mGnss->getGnssInterface()->updateConnectionStatus(connected, typeout);
|
mGnss->getGnssInterface()->updateConnectionStatus(connected, false, typeout, 0);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,6 +170,23 @@ const GnssInterface* Gnss::getGnssInterface() {
|
||||||
|
|
||||||
Return<bool> Gnss::setCallback(const sp<V1_0::IGnssCallback>& callback) {
|
Return<bool> Gnss::setCallback(const sp<V1_0::IGnssCallback>& callback) {
|
||||||
ENTRY_LOG_CALLFLOW();
|
ENTRY_LOG_CALLFLOW();
|
||||||
|
|
||||||
|
// In case where previous call to setCallback_1_1 or setCallback_2_0, then
|
||||||
|
// we need to cleanup these interfaces/callbacks here since we no longer
|
||||||
|
// do so in cleanup() function to keep callbacks around after cleanup()
|
||||||
|
if (mApi != nullptr) {
|
||||||
|
mApi->gnssUpdateCallbacks_2_0(nullptr);
|
||||||
|
}
|
||||||
|
if (mGnssCbIface_1_1 != nullptr) {
|
||||||
|
mGnssCbIface_1_1->unlinkToDeath(mGnssDeathRecipient);
|
||||||
|
mGnssCbIface_1_1 = nullptr;
|
||||||
|
}
|
||||||
|
if (mGnssCbIface_2_0 != nullptr) {
|
||||||
|
mGnssCbIface_2_0->unlinkToDeath(mGnssDeathRecipient);
|
||||||
|
mGnssCbIface_2_0 = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mGnssCbIface != nullptr) {
|
if (mGnssCbIface != nullptr) {
|
||||||
mGnssCbIface->unlinkToDeath(mGnssDeathRecipient);
|
mGnssCbIface->unlinkToDeath(mGnssDeathRecipient);
|
||||||
}
|
}
|
||||||
|
@ -291,21 +308,6 @@ Return<void> Gnss::cleanup() {
|
||||||
if (mApi != nullptr) {
|
if (mApi != nullptr) {
|
||||||
mApi->gnssStop();
|
mApi->gnssStop();
|
||||||
mApi->gnssDisable();
|
mApi->gnssDisable();
|
||||||
mApi->gnssUpdateCallbacks(nullptr, nullptr);
|
|
||||||
mApi->gnssUpdateCallbacks_2_0(nullptr);
|
|
||||||
}
|
|
||||||
mGnssNiCbIface = nullptr;
|
|
||||||
if (mGnssCbIface != nullptr) {
|
|
||||||
mGnssCbIface->unlinkToDeath(mGnssDeathRecipient);
|
|
||||||
mGnssCbIface = nullptr;
|
|
||||||
}
|
|
||||||
if (mGnssCbIface_1_1 != nullptr) {
|
|
||||||
mGnssCbIface_1_1->unlinkToDeath(mGnssDeathRecipient);
|
|
||||||
mGnssCbIface_1_1 = nullptr;
|
|
||||||
}
|
|
||||||
if (mGnssCbIface_2_0 != nullptr) {
|
|
||||||
mGnssCbIface_2_0->unlinkToDeath(mGnssDeathRecipient);
|
|
||||||
mGnssCbIface_2_0 = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -417,6 +419,23 @@ Return<bool> Gnss::setCallback_1_1(const sp<V1_1::IGnssCallback>& callback) {
|
||||||
LOC_LOGE("%s] Error from gnssNameCb description=%s",
|
LOC_LOGE("%s] Error from gnssNameCb description=%s",
|
||||||
__func__, r.description().c_str());
|
__func__, r.description().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In case where previous call to setCallback or setCallback_2_1, then
|
||||||
|
// we need to cleanup these interfaces/callbacks here since we no longer
|
||||||
|
// do so in cleanup() function to keep callbacks around after cleanup()
|
||||||
|
if (mApi != nullptr) {
|
||||||
|
mApi->gnssUpdateCallbacks_2_0(nullptr);
|
||||||
|
}
|
||||||
|
if (mGnssCbIface != nullptr) {
|
||||||
|
mGnssCbIface->unlinkToDeath(mGnssDeathRecipient);
|
||||||
|
mGnssCbIface = nullptr;
|
||||||
|
}
|
||||||
|
if (mGnssCbIface_2_0 != nullptr) {
|
||||||
|
mGnssCbIface_2_0->unlinkToDeath(mGnssDeathRecipient);
|
||||||
|
mGnssCbIface_2_0 = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mGnssCbIface_1_1 != nullptr) {
|
if (mGnssCbIface_1_1 != nullptr) {
|
||||||
mGnssCbIface_1_1->unlinkToDeath(mGnssDeathRecipient);
|
mGnssCbIface_1_1->unlinkToDeath(mGnssDeathRecipient);
|
||||||
}
|
}
|
||||||
|
@ -497,6 +516,7 @@ void Gnss::odcpiRequestCb(const OdcpiRequestInfo& request) {
|
||||||
// For emergency mode, request DBH (Device based hybrid) location
|
// For emergency mode, request DBH (Device based hybrid) location
|
||||||
// Mark Independent from GNSS flag to false.
|
// Mark Independent from GNSS flag to false.
|
||||||
if (ODCPI_REQUEST_TYPE_START == request.type) {
|
if (ODCPI_REQUEST_TYPE_START == request.type) {
|
||||||
|
LOC_LOGd("gnssRequestLocationCb_2_0 isUserEmergency = %d", request.isEmergencyMode);
|
||||||
auto r = mGnssCbIface_2_0->gnssRequestLocationCb_2_0(!request.isEmergencyMode,
|
auto r = mGnssCbIface_2_0->gnssRequestLocationCb_2_0(!request.isEmergencyMode,
|
||||||
request.isEmergencyMode);
|
request.isEmergencyMode);
|
||||||
if (!r.isOk()) {
|
if (!r.isOk()) {
|
||||||
|
@ -529,6 +549,23 @@ Return<bool> Gnss::setCallback_2_0(const sp<V2_0::IGnssCallback>& callback) {
|
||||||
LOC_LOGE("%s] Error from gnssNameCb description=%s",
|
LOC_LOGE("%s] Error from gnssNameCb description=%s",
|
||||||
__func__, r.description().c_str());
|
__func__, r.description().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In case where previous call to setCallback or setCallback_1_1, then
|
||||||
|
// we need to cleanup these interfaces/callbacks here since we no longer
|
||||||
|
// do so in cleanup() function to keep callbacks around after cleanup()
|
||||||
|
if (mApi != nullptr) {
|
||||||
|
mApi->gnssUpdateCallbacks(nullptr, nullptr);
|
||||||
|
}
|
||||||
|
mGnssNiCbIface = nullptr;
|
||||||
|
if (mGnssCbIface != nullptr) {
|
||||||
|
mGnssCbIface->unlinkToDeath(mGnssDeathRecipient);
|
||||||
|
mGnssCbIface = nullptr;
|
||||||
|
}
|
||||||
|
if (mGnssCbIface_1_1 != nullptr) {
|
||||||
|
mGnssCbIface_1_1->unlinkToDeath(mGnssDeathRecipient);
|
||||||
|
mGnssCbIface_1_1 = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (mGnssCbIface_2_0 != nullptr) {
|
if (mGnssCbIface_2_0 != nullptr) {
|
||||||
mGnssCbIface_2_0->unlinkToDeath(mGnssDeathRecipient);
|
mGnssCbIface_2_0->unlinkToDeath(mGnssDeathRecipient);
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,8 +97,7 @@ GnssAdapter::GnssAdapter() :
|
||||||
mPowerStateCb(nullptr),
|
mPowerStateCb(nullptr),
|
||||||
mIsE911Session(NULL),
|
mIsE911Session(NULL),
|
||||||
mGnssMbSvIdUsedInPosition{},
|
mGnssMbSvIdUsedInPosition{},
|
||||||
mGnssMbSvIdUsedInPosAvail(false),
|
mGnssMbSvIdUsedInPosAvail(false)
|
||||||
mGnssSignalType()
|
|
||||||
{
|
{
|
||||||
LOC_LOGD("%s]: Constructor %p", __func__, this);
|
LOC_LOGD("%s]: Constructor %p", __func__, this);
|
||||||
mLocPositionMode.mode = LOC_POSITION_MODE_INVALID;
|
mLocPositionMode.mode = LOC_POSITION_MODE_INVALID;
|
||||||
|
@ -1089,12 +1088,7 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config)
|
||||||
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_SUPL_VERSION_VALID_BIT) {
|
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_SUPL_VERSION_VALID_BIT) {
|
||||||
uint32_t newSuplVersion =
|
uint32_t newSuplVersion =
|
||||||
mAdapter.convertSuplVersion(gnssConfigRequested.suplVersion);
|
mAdapter.convertSuplVersion(gnssConfigRequested.suplVersion);
|
||||||
if (newSuplVersion != ContextBase::mGps_conf.SUPL_VER &&
|
ContextBase::mGps_conf.SUPL_VER = newSuplVersion;
|
||||||
ContextBase::mGps_conf.AGPS_CONFIG_INJECT) {
|
|
||||||
ContextBase::mGps_conf.SUPL_VER = newSuplVersion;
|
|
||||||
} else {
|
|
||||||
gnssConfigNeedEngineUpdate.flags &= ~(GNSS_CONFIG_FLAGS_SUPL_VERSION_VALID_BIT);
|
|
||||||
}
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_SET_ASSISTANCE_DATA_VALID_BIT) {
|
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_SET_ASSISTANCE_DATA_VALID_BIT) {
|
||||||
|
@ -1113,47 +1107,26 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config)
|
||||||
}
|
}
|
||||||
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) {
|
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT) {
|
||||||
uint32_t newLppProfile = mAdapter.convertLppProfile(gnssConfigRequested.lppProfile);
|
uint32_t newLppProfile = mAdapter.convertLppProfile(gnssConfigRequested.lppProfile);
|
||||||
if (newLppProfile != ContextBase::mGps_conf.LPP_PROFILE &&
|
ContextBase::mGps_conf.LPP_PROFILE = newLppProfile;
|
||||||
ContextBase::mGps_conf.AGPS_CONFIG_INJECT) {
|
|
||||||
ContextBase::mGps_conf.LPP_PROFILE = newLppProfile;
|
|
||||||
} else {
|
|
||||||
gnssConfigNeedEngineUpdate.flags &= ~(GNSS_CONFIG_FLAGS_LPP_PROFILE_VALID_BIT);
|
|
||||||
}
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT) {
|
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT) {
|
||||||
uint32_t newLppeControlPlaneMask =
|
uint32_t newLppeControlPlaneMask =
|
||||||
mAdapter.convertLppeCp(gnssConfigRequested.lppeControlPlaneMask);
|
mAdapter.convertLppeCp(gnssConfigRequested.lppeControlPlaneMask);
|
||||||
if (newLppeControlPlaneMask != ContextBase::mGps_conf.LPPE_CP_TECHNOLOGY) {
|
ContextBase::mGps_conf.LPPE_CP_TECHNOLOGY = newLppeControlPlaneMask;
|
||||||
ContextBase::mGps_conf.LPPE_CP_TECHNOLOGY = newLppeControlPlaneMask;
|
|
||||||
} else {
|
|
||||||
gnssConfigNeedEngineUpdate.flags &=
|
|
||||||
~(GNSS_CONFIG_FLAGS_LPPE_CONTROL_PLANE_VALID_BIT);
|
|
||||||
}
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_LPPE_USER_PLANE_VALID_BIT) {
|
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_LPPE_USER_PLANE_VALID_BIT) {
|
||||||
uint32_t newLppeUserPlaneMask =
|
uint32_t newLppeUserPlaneMask =
|
||||||
mAdapter.convertLppeUp(gnssConfigRequested.lppeUserPlaneMask);
|
mAdapter.convertLppeUp(gnssConfigRequested.lppeUserPlaneMask);
|
||||||
if (newLppeUserPlaneMask != ContextBase::mGps_conf.LPPE_UP_TECHNOLOGY) {
|
ContextBase::mGps_conf.LPPE_UP_TECHNOLOGY = newLppeUserPlaneMask;
|
||||||
ContextBase::mGps_conf.LPPE_UP_TECHNOLOGY = newLppeUserPlaneMask;
|
|
||||||
} else {
|
|
||||||
gnssConfigNeedEngineUpdate.flags &=
|
|
||||||
~(GNSS_CONFIG_FLAGS_LPPE_USER_PLANE_VALID_BIT);
|
|
||||||
}
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if (gnssConfigRequested.flags &
|
if (gnssConfigRequested.flags &
|
||||||
GNSS_CONFIG_FLAGS_AGLONASS_POSITION_PROTOCOL_VALID_BIT) {
|
GNSS_CONFIG_FLAGS_AGLONASS_POSITION_PROTOCOL_VALID_BIT) {
|
||||||
uint32_t newAGloProtMask =
|
uint32_t newAGloProtMask =
|
||||||
mAdapter.convertAGloProt(gnssConfigRequested.aGlonassPositionProtocolMask);
|
mAdapter.convertAGloProt(gnssConfigRequested.aGlonassPositionProtocolMask);
|
||||||
if (newAGloProtMask != ContextBase::mGps_conf.A_GLONASS_POS_PROTOCOL_SELECT &&
|
ContextBase::mGps_conf.A_GLONASS_POS_PROTOCOL_SELECT = newAGloProtMask;
|
||||||
ContextBase::mGps_conf.AGPS_CONFIG_INJECT) {
|
|
||||||
ContextBase::mGps_conf.A_GLONASS_POS_PROTOCOL_SELECT = newAGloProtMask;
|
|
||||||
} else {
|
|
||||||
gnssConfigNeedEngineUpdate.flags &=
|
|
||||||
~(GNSS_CONFIG_FLAGS_AGLONASS_POSITION_PROTOCOL_VALID_BIT);
|
|
||||||
}
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_EM_PDN_FOR_EM_SUPL_VALID_BIT) {
|
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_EM_PDN_FOR_EM_SUPL_VALID_BIT) {
|
||||||
|
@ -1174,10 +1147,8 @@ GnssAdapter::gnssUpdateConfigCommand(GnssConfig config)
|
||||||
}
|
}
|
||||||
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_SUPL_MODE_BIT) {
|
if (gnssConfigRequested.flags & GNSS_CONFIG_FLAGS_SUPL_MODE_BIT) {
|
||||||
uint32_t newSuplMode = mAdapter.convertSuplMode(gnssConfigRequested.suplModeMask);
|
uint32_t newSuplMode = mAdapter.convertSuplMode(gnssConfigRequested.suplModeMask);
|
||||||
if (newSuplMode != ContextBase::mGps_conf.SUPL_MODE) {
|
ContextBase::mGps_conf.SUPL_MODE = newSuplMode;
|
||||||
ContextBase::mGps_conf.SUPL_MODE = newSuplMode;
|
mAdapter.broadcastCapabilities(mAdapter.getCapabilities());
|
||||||
mAdapter.broadcastCapabilities(mAdapter.getCapabilities());
|
|
||||||
}
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3206,9 +3177,6 @@ GnssAdapter::reportPosition(const UlpLocation& ulpLocation,
|
||||||
if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_MULTIBAND) {
|
if (locationExtended.flags & GPS_LOCATION_EXTENDED_HAS_MULTIBAND) {
|
||||||
mGnssMbSvIdUsedInPosAvail = true;
|
mGnssMbSvIdUsedInPosAvail = true;
|
||||||
mGnssMbSvIdUsedInPosition = locationExtended.gnss_mb_sv_used_ids;
|
mGnssMbSvIdUsedInPosition = locationExtended.gnss_mb_sv_used_ids;
|
||||||
for (int i = 0; i < GNSS_SV_MAX; i++) {
|
|
||||||
mGnssSignalType[i] = locationExtended.measUsageInfo[i].gnssSignalType;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3277,11 +3245,12 @@ GnssAdapter::reportSv(GnssSvNotification& svNotify)
|
||||||
for (int i=0; i < numSv; i++) {
|
for (int i=0; i < numSv; i++) {
|
||||||
svUsedIdMask = 0;
|
svUsedIdMask = 0;
|
||||||
gnssSvId = svNotify.gnssSvs[i].svId;
|
gnssSvId = svNotify.gnssSvs[i].svId;
|
||||||
|
GnssSignalTypeMask signalTypeMask = svNotify.gnssSvs[i].gnssSignalTypeMask;
|
||||||
switch (svNotify.gnssSvs[i].type) {
|
switch (svNotify.gnssSvs[i].type) {
|
||||||
case GNSS_SV_TYPE_GPS:
|
case GNSS_SV_TYPE_GPS:
|
||||||
if (mGnssSvIdUsedInPosAvail) {
|
if (mGnssSvIdUsedInPosAvail) {
|
||||||
if (mGnssMbSvIdUsedInPosAvail) {
|
if (mGnssMbSvIdUsedInPosAvail) {
|
||||||
switch (mGnssSignalType[i]) {
|
switch (signalTypeMask) {
|
||||||
case GNSS_SIGNAL_GPS_L1CA:
|
case GNSS_SIGNAL_GPS_L1CA:
|
||||||
svUsedIdMask = mGnssMbSvIdUsedInPosition.gps_l1ca_sv_used_ids_mask;
|
svUsedIdMask = mGnssMbSvIdUsedInPosition.gps_l1ca_sv_used_ids_mask;
|
||||||
break;
|
break;
|
||||||
|
@ -3303,7 +3272,7 @@ GnssAdapter::reportSv(GnssSvNotification& svNotify)
|
||||||
case GNSS_SV_TYPE_GLONASS:
|
case GNSS_SV_TYPE_GLONASS:
|
||||||
if (mGnssSvIdUsedInPosAvail) {
|
if (mGnssSvIdUsedInPosAvail) {
|
||||||
if (mGnssMbSvIdUsedInPosAvail) {
|
if (mGnssMbSvIdUsedInPosAvail) {
|
||||||
switch (mGnssSignalType[i]) {
|
switch (signalTypeMask) {
|
||||||
case GNSS_SIGNAL_GLONASS_G1:
|
case GNSS_SIGNAL_GLONASS_G1:
|
||||||
svUsedIdMask = mGnssMbSvIdUsedInPosition.glo_g1_sv_used_ids_mask;
|
svUsedIdMask = mGnssMbSvIdUsedInPosition.glo_g1_sv_used_ids_mask;
|
||||||
break;
|
break;
|
||||||
|
@ -3319,7 +3288,7 @@ GnssAdapter::reportSv(GnssSvNotification& svNotify)
|
||||||
case GNSS_SV_TYPE_BEIDOU:
|
case GNSS_SV_TYPE_BEIDOU:
|
||||||
if (mGnssSvIdUsedInPosAvail) {
|
if (mGnssSvIdUsedInPosAvail) {
|
||||||
if (mGnssMbSvIdUsedInPosAvail) {
|
if (mGnssMbSvIdUsedInPosAvail) {
|
||||||
switch (mGnssSignalType[i]) {
|
switch (signalTypeMask) {
|
||||||
case GNSS_SIGNAL_BEIDOU_B1I:
|
case GNSS_SIGNAL_BEIDOU_B1I:
|
||||||
svUsedIdMask = mGnssMbSvIdUsedInPosition.bds_b1i_sv_used_ids_mask;
|
svUsedIdMask = mGnssMbSvIdUsedInPosition.bds_b1i_sv_used_ids_mask;
|
||||||
break;
|
break;
|
||||||
|
@ -3344,7 +3313,7 @@ GnssAdapter::reportSv(GnssSvNotification& svNotify)
|
||||||
case GNSS_SV_TYPE_GALILEO:
|
case GNSS_SV_TYPE_GALILEO:
|
||||||
if (mGnssSvIdUsedInPosAvail) {
|
if (mGnssSvIdUsedInPosAvail) {
|
||||||
if (mGnssMbSvIdUsedInPosAvail) {
|
if (mGnssMbSvIdUsedInPosAvail) {
|
||||||
switch (mGnssSignalType[i]) {
|
switch (signalTypeMask) {
|
||||||
case GNSS_SIGNAL_GALILEO_E1:
|
case GNSS_SIGNAL_GALILEO_E1:
|
||||||
svUsedIdMask = mGnssMbSvIdUsedInPosition.gal_e1_sv_used_ids_mask;
|
svUsedIdMask = mGnssMbSvIdUsedInPosition.gal_e1_sv_used_ids_mask;
|
||||||
break;
|
break;
|
||||||
|
@ -3363,7 +3332,7 @@ GnssAdapter::reportSv(GnssSvNotification& svNotify)
|
||||||
case GNSS_SV_TYPE_QZSS:
|
case GNSS_SV_TYPE_QZSS:
|
||||||
if (mGnssSvIdUsedInPosAvail) {
|
if (mGnssSvIdUsedInPosAvail) {
|
||||||
if (mGnssMbSvIdUsedInPosAvail) {
|
if (mGnssMbSvIdUsedInPosAvail) {
|
||||||
switch (mGnssSignalType[i]) {
|
switch (signalTypeMask) {
|
||||||
case GNSS_SIGNAL_QZSS_L1CA:
|
case GNSS_SIGNAL_QZSS_L1CA:
|
||||||
svUsedIdMask = mGnssMbSvIdUsedInPosition.qzss_l1ca_sv_used_ids_mask;
|
svUsedIdMask = mGnssMbSvIdUsedInPosition.qzss_l1ca_sv_used_ids_mask;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -147,7 +147,6 @@ class GnssAdapter : public LocAdapterBase {
|
||||||
bool mGnssSvIdUsedInPosAvail;
|
bool mGnssSvIdUsedInPosAvail;
|
||||||
GnssSvMbUsedInPosition mGnssMbSvIdUsedInPosition;
|
GnssSvMbUsedInPosition mGnssMbSvIdUsedInPosition;
|
||||||
bool mGnssMbSvIdUsedInPosAvail;
|
bool mGnssMbSvIdUsedInPosAvail;
|
||||||
GnssSignalTypeMask mGnssSignalType[GNSS_SV_MAX];
|
|
||||||
|
|
||||||
/* ==== CONTROL ======================================================================== */
|
/* ==== CONTROL ======================================================================== */
|
||||||
LocationControlCallbacks mControlCallbacks;
|
LocationControlCallbacks mControlCallbacks;
|
||||||
|
|
|
@ -596,7 +596,7 @@ typedef enum {
|
||||||
GNSS_SIGNAL_BEIDOU_B1I | GNSS_SIGNAL_BEIDOU_B1C | GNSS_SIGNAL_BEIDOU_B2I|\
|
GNSS_SIGNAL_BEIDOU_B1I | GNSS_SIGNAL_BEIDOU_B1C | GNSS_SIGNAL_BEIDOU_B2I|\
|
||||||
GNSS_SIGNAL_BEIDOU_B2AI | GNSS_SIGNAL_QZSS_L1CA | GNSS_SIGNAL_QZSS_L1S |\
|
GNSS_SIGNAL_BEIDOU_B2AI | GNSS_SIGNAL_QZSS_L1CA | GNSS_SIGNAL_QZSS_L1S |\
|
||||||
GNSS_SIGNAL_QZSS_L2| GNSS_SIGNAL_QZSS_L5 | GNSS_SIGNAL_SBAS_L1 |\
|
GNSS_SIGNAL_QZSS_L2| GNSS_SIGNAL_QZSS_L5 | GNSS_SIGNAL_SBAS_L1 |\
|
||||||
GNSS_SIGNAL_NAVIC_L5) | GNSS_SIGNAL_BEIDOU_B2AQ
|
GNSS_SIGNAL_NAVIC_L5 | GNSS_SIGNAL_BEIDOU_B2AQ)
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -193,7 +193,8 @@ public:
|
||||||
mSockType(sockType),
|
mSockType(sockType),
|
||||||
mSock(make_shared<Sock>((nullptr == name) ? -1 : (::socket(AF_INET, mSockType, 0)))),
|
mSock(make_shared<Sock>((nullptr == name) ? -1 : (::socket(AF_INET, mSockType, 0)))),
|
||||||
mName((nullptr == name) ? "" : name),
|
mName((nullptr == name) ? "" : name),
|
||||||
mAddr({.sin_family=AF_INET, .sin_port=htons(port), .sin_addr={htonl(INADDR_ANY)}}) {
|
mAddr({.sin_family = AF_INET, .sin_port = htons(port),
|
||||||
|
.sin_addr = {htonl(INADDR_ANY)}}) {
|
||||||
if (mSock != nullptr && mSock->isValid() && nullptr != name) {
|
if (mSock != nullptr && mSock->isValid() && nullptr != name) {
|
||||||
struct hostent* hp = gethostbyname(name);
|
struct hostent* hp = gethostbyname(name);
|
||||||
if (nullptr != hp) {
|
if (nullptr != hp) {
|
||||||
|
@ -222,12 +223,14 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
class LocIpcInetRecver : public LocIpcInetSender, public LocIpcRecver {
|
class LocIpcInetRecver : public LocIpcInetSender, public LocIpcRecver {
|
||||||
|
int32_t mPort;
|
||||||
protected:
|
protected:
|
||||||
virtual ssize_t recv() const = 0;
|
virtual ssize_t recv() const = 0;
|
||||||
public:
|
public:
|
||||||
inline LocIpcInetRecver(const shared_ptr<ILocIpcListener>& listener, const char* name,
|
inline LocIpcInetRecver(const shared_ptr<ILocIpcListener>& listener, const char* name,
|
||||||
int32_t port, int sockType) :
|
int32_t port, int sockType) :
|
||||||
LocIpcInetSender(name, port, sockType), LocIpcRecver(listener, *this) {
|
LocIpcInetSender(name, port, sockType), LocIpcRecver(listener, *this),
|
||||||
|
mPort(port) {
|
||||||
if (mSock->isValid() && ::bind(mSock->mSid, (struct sockaddr*)&mAddr, sizeof(mAddr)) < 0) {
|
if (mSock->isValid() && ::bind(mSock->mSid, (struct sockaddr*)&mAddr, sizeof(mAddr)) < 0) {
|
||||||
LOC_LOGe("bind socket error. sock fd: %d, reason: %s", mSock->mSid, strerror(errno));
|
LOC_LOGe("bind socket error. sock fd: %d, reason: %s", mSock->mSid, strerror(errno));
|
||||||
mSock->close();
|
mSock->close();
|
||||||
|
@ -237,7 +240,9 @@ public:
|
||||||
inline virtual const char* getName() const override { return mName.data(); };
|
inline virtual const char* getName() const override { return mName.data(); };
|
||||||
inline virtual void abort() const override {
|
inline virtual void abort() const override {
|
||||||
if (isSendable()) {
|
if (isSendable()) {
|
||||||
mSock->sendAbort(0, (struct sockaddr*)&mAddr, sizeof(mAddr));
|
sockaddr_in loopBackAddr = {.sin_family = AF_INET, .sin_port = htons(mPort),
|
||||||
|
.sin_addr = {htonl(INADDR_LOOPBACK)}};
|
||||||
|
mSock->sendAbort(0, (struct sockaddr*)&loopBackAddr, sizeof(loopBackAddr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -449,17 +449,6 @@ typedef uint32_t GnssAdditionalSystemInfoMask;
|
||||||
#define NAVIC_SV_PRN_MIN 401
|
#define NAVIC_SV_PRN_MIN 401
|
||||||
#define NAVIC_SV_PRN_MAX 414
|
#define NAVIC_SV_PRN_MAX 414
|
||||||
|
|
||||||
typedef uint32_t LocPosTechMask;
|
|
||||||
#define LOC_POS_TECH_MASK_DEFAULT ((LocPosTechMask)0x00000000)
|
|
||||||
#define LOC_POS_TECH_MASK_SATELLITE ((LocPosTechMask)0x00000001)
|
|
||||||
#define LOC_POS_TECH_MASK_CELLID ((LocPosTechMask)0x00000002)
|
|
||||||
#define LOC_POS_TECH_MASK_WIFI ((LocPosTechMask)0x00000004)
|
|
||||||
#define LOC_POS_TECH_MASK_SENSORS ((LocPosTechMask)0x00000008)
|
|
||||||
#define LOC_POS_TECH_MASK_REFERENCE_LOCATION ((LocPosTechMask)0x00000010)
|
|
||||||
#define LOC_POS_TECH_MASK_INJECTED_COARSE_POSITION ((LocPosTechMask)0x00000020)
|
|
||||||
#define LOC_POS_TECH_MASK_AFLT ((LocPosTechMask)0x00000040)
|
|
||||||
#define LOC_POS_TECH_MASK_HYBRID ((LocPosTechMask)0x00000080)
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LOC_RELIABILITY_NOT_SET = 0,
|
LOC_RELIABILITY_NOT_SET = 0,
|
||||||
LOC_RELIABILITY_VERY_LOW = 1,
|
LOC_RELIABILITY_VERY_LOW = 1,
|
||||||
|
@ -1393,16 +1382,15 @@ typedef uint64_t GpsSvMeasHeaderFlags;
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_GAL_SYSTEM_TIME_EXT 0x00008000
|
#define GNSS_SV_MEAS_HEADER_HAS_GAL_SYSTEM_TIME_EXT 0x00008000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_BDS_SYSTEM_TIME_EXT 0x00010000
|
#define GNSS_SV_MEAS_HEADER_HAS_BDS_SYSTEM_TIME_EXT 0x00010000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_QZSS_SYSTEM_TIME_EXT 0x00020000
|
#define GNSS_SV_MEAS_HEADER_HAS_QZSS_SYSTEM_TIME_EXT 0x00020000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_GPSL1L5_TIME_BIAS 0x00040000
|
#define GNSS_SV_MEAS_HEADER_HAS_GLO_SYSTEM_TIME_EXT 0x00040000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_GALE1E5A_TIME_BIAS 0x00080000
|
#define GNSS_SV_MEAS_HEADER_HAS_GPSL1L5_TIME_BIAS 0x00080000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_GPS_NAVIC_INTER_SYSTEM_BIAS 0x00100000
|
#define GNSS_SV_MEAS_HEADER_HAS_GALE1E5A_TIME_BIAS 0x00100000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_GAL_NAVIC_INTER_SYSTEM_BIAS 0x00200000
|
#define GNSS_SV_MEAS_HEADER_HAS_GPS_NAVIC_INTER_SYSTEM_BIAS 0x00200000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_GLO_NAVIC_INTER_SYSTEM_BIAS 0x00400000
|
#define GNSS_SV_MEAS_HEADER_HAS_GAL_NAVIC_INTER_SYSTEM_BIAS 0x00400000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_BDS_NAVIC_INTER_SYSTEM_BIAS 0x00800000
|
#define GNSS_SV_MEAS_HEADER_HAS_GLO_NAVIC_INTER_SYSTEM_BIAS 0x00800000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_NAVIC_SYSTEM_TIME 0x01000000
|
#define GNSS_SV_MEAS_HEADER_HAS_BDS_NAVIC_INTER_SYSTEM_BIAS 0x01000000
|
||||||
#define GNSS_SV_MEAS_HEADER_HAS_NAVIC_SYSTEM_TIME_EXT 0x02000000
|
#define GNSS_SV_MEAS_HEADER_HAS_NAVIC_SYSTEM_TIME 0x02000000
|
||||||
|
#define GNSS_SV_MEAS_HEADER_HAS_NAVIC_SYSTEM_TIME_EXT 0x04000000
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -1444,9 +1432,10 @@ typedef struct
|
||||||
Gnss_LocGnssTimeExtStructType bdsSystemTimeExt;
|
Gnss_LocGnssTimeExtStructType bdsSystemTimeExt;
|
||||||
/** QZSS system RTC time information. */
|
/** QZSS system RTC time information. */
|
||||||
Gnss_LocGnssTimeExtStructType qzssSystemTimeExt;
|
Gnss_LocGnssTimeExtStructType qzssSystemTimeExt;
|
||||||
|
/** GLONASS system RTC time information. */
|
||||||
|
Gnss_LocGnssTimeExtStructType gloSystemTimeExt;
|
||||||
/** NAVIC system RTC time information. */
|
/** NAVIC system RTC time information. */
|
||||||
Gnss_LocGnssTimeExtStructType navicSystemTimeExt;
|
Gnss_LocGnssTimeExtStructType navicSystemTimeExt;
|
||||||
|
|
||||||
} GnssSvMeasurementHeader;
|
} GnssSvMeasurementHeader;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Loading…
Reference in a new issue