Streamline measurements processing

Consolidate the translation from QMI LOC into one
place in order to minimize traffic

Change-Id: I73c2f25e94544a2b69d4227c63548ef11b6a4d91
CRs-fixed: 2430668
This commit is contained in:
Mike Cailean 2019-04-08 11:17:31 -07:00
parent a6c61bde6a
commit b95f05cc73
8 changed files with 19 additions and 34 deletions

View file

@ -100,10 +100,6 @@ void LocAdapterBase::
bool /*fromEngineHub*/) bool /*fromEngineHub*/)
DEFAULT_IMPL() DEFAULT_IMPL()
void LocAdapterBase::
reportSvMeasurementEvent(GnssSvMeasurementSet &/*svMeasurementSet*/)
DEFAULT_IMPL()
void LocAdapterBase:: void LocAdapterBase::
reportSvPolynomialEvent(GnssSvPolynomial &/*svPolynomial*/) reportSvPolynomialEvent(GnssSvPolynomial &/*svPolynomial*/)
DEFAULT_IMPL() DEFAULT_IMPL()
@ -162,7 +158,7 @@ bool LocAdapterBase::
DEFAULT_IMPL(false) DEFAULT_IMPL(false)
void LocAdapterBase:: void LocAdapterBase::
reportGnssMeasurementDataEvent(const GnssMeasurementsNotification& /*measurements*/, reportGnssMeasurementsEvent(const GnssMeasurements& /*gnssMeasurements*/,
int /*msInWeek*/) int /*msInWeek*/)
DEFAULT_IMPL() DEFAULT_IMPL()

View file

@ -158,7 +158,6 @@ public:
bool fromEngineHub=false); bool fromEngineHub=false);
virtual void reportDataEvent(const GnssDataNotification& dataNotify, int msInWeek); virtual void reportDataEvent(const GnssDataNotification& dataNotify, int msInWeek);
virtual void reportNmeaEvent(const char* nmea, size_t length); virtual void reportNmeaEvent(const char* nmea, size_t length);
virtual void reportSvMeasurementEvent(GnssSvMeasurementSet &svMeasurementSet);
virtual void reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial); virtual void reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial);
virtual void reportSvEphemerisEvent(GnssSvEphemerisReport &svEphemeris); virtual void reportSvEphemerisEvent(GnssSvEphemerisReport &svEphemeris);
virtual void reportStatus(LocGpsStatusValue status); virtual void reportStatus(LocGpsStatusValue status);
@ -175,7 +174,7 @@ public:
virtual bool requestNiNotifyEvent(const GnssNiNotification &notify, const void* data); virtual bool requestNiNotifyEvent(const GnssNiNotification &notify, const void* data);
inline virtual bool isInSession() { return false; } inline virtual bool isInSession() { return false; }
ContextBase* getContext() const { return mContext; } ContextBase* getContext() const { return mContext; }
virtual void reportGnssMeasurementDataEvent(const GnssMeasurementsNotification& measurements, virtual void reportGnssMeasurementsEvent(const GnssMeasurements& gnssMeasurements,
int msInWeek); int msInWeek);
virtual bool reportWwanZppFix(LocGpsLocation &zppLoc); virtual bool reportWwanZppFix(LocGpsLocation &zppLoc);
virtual bool reportZppBestAvailableFix(LocGpsLocation &zppLoc, virtual bool reportZppBestAvailableFix(LocGpsLocation &zppLoc,

View file

@ -434,14 +434,6 @@ void LocApiBase::reportSv(GnssSvNotification& svNotify)
); );
} }
void LocApiBase::reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet)
{
// loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(
mLocAdapters[i]->reportSvMeasurementEvent(svMeasurementSet)
);
}
void LocApiBase::reportSvPolynomial(GnssSvPolynomial &svPolynomial) void LocApiBase::reportSvPolynomial(GnssSvPolynomial &svPolynomial)
{ {
// loop through adapters, and deliver to all adapters. // loop through adapters, and deliver to all adapters.
@ -534,11 +526,10 @@ void* LocApiBase :: getSibling()
LocApiProxyBase* LocApiBase :: getLocApiProxy() LocApiProxyBase* LocApiBase :: getLocApiProxy()
DEFAULT_IMPL(NULL) DEFAULT_IMPL(NULL)
void LocApiBase::reportGnssMeasurementData(GnssMeasurementsNotification& measurements, void LocApiBase::reportGnssMeasurements(GnssMeasurements& gnssMeasurements, int msInWeek)
int msInWeek)
{ {
// loop through adapters, and deliver to all adapters. // loop through adapters, and deliver to all adapters.
TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportGnssMeasurementDataEvent(measurements, msInWeek)); TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportGnssMeasurementsEvent(gnssMeasurements, msInWeek));
} }
void LocApiBase::reportGnssSvIdConfig(const GnssSvIdConfig& config) void LocApiBase::reportGnssSvIdConfig(const GnssSvIdConfig& config)

View file

@ -164,7 +164,6 @@ public:
GnssDataNotification* pDataNotify = nullptr, GnssDataNotification* pDataNotify = nullptr,
int msInWeek = -1); int msInWeek = -1);
void reportSv(GnssSvNotification& svNotify); void reportSv(GnssSvNotification& svNotify);
void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet);
void reportSvPolynomial(GnssSvPolynomial &svPolynomial); void reportSvPolynomial(GnssSvPolynomial &svPolynomial);
void reportSvEphemeris(GnssSvEphemerisReport &svEphemeris); void reportSvEphemeris(GnssSvEphemerisReport &svEphemeris);
void reportStatus(LocGpsStatusValue status); void reportStatus(LocGpsStatusValue status);
@ -179,7 +178,7 @@ public:
void requestATL(int connHandle, LocAGpsType agps_type, LocApnTypeMask apn_type_mask); void requestATL(int connHandle, LocAGpsType agps_type, LocApnTypeMask apn_type_mask);
void releaseATL(int connHandle); void releaseATL(int connHandle);
void requestNiNotify(GnssNiNotification &notify, const void* data); void requestNiNotify(GnssNiNotification &notify, const void* data);
void reportGnssMeasurementData(GnssMeasurementsNotification& measurements, int msInWeek); void reportGnssMeasurements(GnssMeasurements& gnssMeasurements, int msInWeek);
void reportWwanZppFix(LocGpsLocation &zppLoc); void reportWwanZppFix(LocGpsLocation &zppLoc);
void reportZppBestAvailableFix(LocGpsLocation &zppLoc, GpsLocationExtended &location_extended, void reportZppBestAvailableFix(LocGpsLocation &zppLoc, GpsLocationExtended &location_extended,
LocPosTechMask tech_mask); LocPosTechMask tech_mask);

View file

@ -3575,20 +3575,21 @@ GnssAdapter::requestNiNotify(const GnssNiNotification& notify, const void* data)
} }
void void
GnssAdapter::reportGnssMeasurementDataEvent(const GnssMeasurementsNotification& measurements, GnssAdapter::reportGnssMeasurementsEvent(const GnssMeasurements& gnssMeasurements,
int msInWeek) int msInWeek)
{ {
LOC_LOGD("%s]: msInWeek=%d", __func__, msInWeek); LOC_LOGD("%s]: msInWeek=%d", __func__, msInWeek);
struct MsgReportGnssMeasurementData : public LocMsg { struct MsgReportGnssMeasurementData : public LocMsg {
GnssAdapter& mAdapter; GnssAdapter& mAdapter;
GnssMeasurements mGnssMeasurements;
GnssMeasurementsNotification mMeasurementsNotify; GnssMeasurementsNotification mMeasurementsNotify;
inline MsgReportGnssMeasurementData(GnssAdapter& adapter, inline MsgReportGnssMeasurementData(GnssAdapter& adapter,
const GnssMeasurementsNotification& measurements, const GnssMeasurements& gnssMeasurements,
int msInWeek) : int msInWeek) :
LocMsg(), LocMsg(),
mAdapter(adapter), mAdapter(adapter),
mMeasurementsNotify(measurements) { mMeasurementsNotify(gnssMeasurements.gnssMeasNotification) {
if (-1 != msInWeek) { if (-1 != msInWeek) {
mAdapter.getAgcInformation(mMeasurementsNotify, msInWeek); mAdapter.getAgcInformation(mMeasurementsNotify, msInWeek);
} }
@ -3598,7 +3599,8 @@ GnssAdapter::reportGnssMeasurementDataEvent(const GnssMeasurementsNotification&
} }
}; };
sendMsg(new MsgReportGnssMeasurementData(*this, measurements, msInWeek)); sendMsg(new MsgReportGnssMeasurementData(*this, gnssMeasurements, msInWeek));
mEngHubProxy->gnssReportSvMeasurement(gnssMeasurements.gnssSvMeasurementSet);
} }
void void
@ -3611,13 +3613,6 @@ GnssAdapter::reportGnssMeasurementData(const GnssMeasurementsNotification& measu
} }
} }
void
GnssAdapter::reportSvMeasurementEvent(GnssSvMeasurementSet &svMeasurementSet)
{
LOC_LOGD("%s]: ", __func__);
mEngHubProxy->gnssReportSvMeasurement(svMeasurementSet);
}
void void
GnssAdapter::reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial) GnssAdapter::reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial)
{ {

View file

@ -354,9 +354,8 @@ public:
virtual void reportNmeaEvent(const char* nmea, size_t length); virtual void reportNmeaEvent(const char* nmea, size_t length);
virtual void reportDataEvent(const GnssDataNotification& dataNotify, int msInWeek); virtual void reportDataEvent(const GnssDataNotification& dataNotify, int msInWeek);
virtual bool requestNiNotifyEvent(const GnssNiNotification& notify, const void* data); virtual bool requestNiNotifyEvent(const GnssNiNotification& notify, const void* data);
virtual void reportGnssMeasurementDataEvent(const GnssMeasurementsNotification& measurements, virtual void reportGnssMeasurementsEvent(const GnssMeasurements& gnssMeasurements,
int msInWeek); int msInWeek);
virtual void reportSvMeasurementEvent(GnssSvMeasurementSet &svMeasurementSet);
virtual void reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial); virtual void reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial);
virtual void reportSvEphemerisEvent(GnssSvEphemerisReport & svEphemeris); virtual void reportSvEphemerisEvent(GnssSvEphemerisReport & svEphemeris);
virtual void reportGnssSvIdConfigEvent(const GnssSvIdConfig& config); virtual void reportGnssSvIdConfigEvent(const GnssSvIdConfig& config);

View file

@ -38,7 +38,7 @@
#define GNSS_NI_REQUESTOR_MAX (256) #define GNSS_NI_REQUESTOR_MAX (256)
#define GNSS_NI_MESSAGE_ID_MAX (2048) #define GNSS_NI_MESSAGE_ID_MAX (2048)
#define GNSS_SV_MAX (176) #define GNSS_SV_MAX (176)
#define GNSS_MEASUREMENTS_MAX (64) #define GNSS_MEASUREMENTS_MAX (128)
#define GNSS_UTC_TIME_OFFSET (3657) #define GNSS_UTC_TIME_OFFSET (3657)
#define GNSS_BUGREPORT_GPS_MIN (1) #define GNSS_BUGREPORT_GPS_MIN (1)

View file

@ -1397,6 +1397,12 @@ typedef struct {
} GnssSvMeasurementSet; } GnssSvMeasurementSet;
typedef struct {
uint32_t size; // set to sizeof(GnssMeasurements)
GnssSvMeasurementSet gnssSvMeasurementSet;
GnssMeasurementsNotification gnssMeasNotification;
} GnssMeasurements;
typedef enum typedef enum
{ {
GNSS_SV_POLY_COEFF_VALID = 0x01, GNSS_SV_POLY_COEFF_VALID = 0x01,