summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-10-05 12:51:44 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-10-05 12:51:44 -0700
commit837f245997498fc3b813498d24acc40bc00d6dd7 (patch)
treedc559c3493b589c1e4bd34af80178592564e2a6f /core
parent2f80dcc30c30c7a511553863abf8050953e485fc (diff)
parent5a8d17118152a87e3772deb204960c38a7810f1a (diff)
downloadgps-837f245997498fc3b813498d24acc40bc00d6dd7.tar.gz
Merge "New additions for Ephemeris and Poly handling"
Diffstat (limited to 'core')
-rw-r--r--core/EngineHubProxyBase.h11
-rw-r--r--core/LocAdapterBase.cpp8
-rw-r--r--core/LocAdapterBase.h2
-rw-r--r--core/LocApiBase.cpp18
-rw-r--r--core/LocApiBase.h3
5 files changed, 41 insertions, 1 deletions
diff --git a/core/EngineHubProxyBase.h b/core/EngineHubProxyBase.h
index b159bd8..455c52e 100644
--- a/core/EngineHubProxyBase.h
+++ b/core/EngineHubProxyBase.h
@@ -80,6 +80,11 @@ public:
(void) svPolynomial;
return false;
}
+
+ inline virtual bool gnssReportSvEphemeris(const GnssSvEphemerisReport& svEphemeris) {
+ (void) svEphemeris;
+ return false;
+ }
};
typedef std::function<void(const UlpLocation& ulpLocation,
@@ -93,12 +98,16 @@ typedef std::function<void(const GnssSvNotification& svNotify,
bool fromEngineHub)>
GnssAdapterReportSvEventCb;
+typedef std::function<void(const GnssAidingDataSvMask& svDataMask)>
+ GnssAdapterReqAidingDataCb;
+
// potential parameters: message queue: MsgTask * msgTask;
// callback function to report back dr and ppe position and sv report
typedef EngineHubProxyBase* (getEngHubProxyFn)(const MsgTask * msgTask,
IOsObserver* osObserver,
GnssAdapterReportPositionEventCb positionEventCb,
- GnssAdapterReportSvEventCb svEventCb);
+ GnssAdapterReportSvEventCb svEventCb,
+ GnssAdapterReqAidingDataCb reqAidingDataCb);
} // namespace loc_core
diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp
index 5a16b17..42cf7aa 100644
--- a/core/LocAdapterBase.cpp
+++ b/core/LocAdapterBase.cpp
@@ -108,6 +108,11 @@ void LocAdapterBase::
DEFAULT_IMPL()
void LocAdapterBase::
+ reportSvEphemerisEvent(GnssSvEphemerisReport &/*svEphemeris*/)
+DEFAULT_IMPL()
+
+
+void LocAdapterBase::
reportStatus(LocGpsStatusValue /*status*/)
DEFAULT_IMPL()
@@ -179,4 +184,7 @@ bool LocAdapterBase::
reportGnssEngEnergyConsumedEvent(uint64_t /*energyConsumedSinceFirstBoot*/)
DEFAULT_IMPL(false)
+bool LocAdapterBase::
+ reportDeleteAidingDataEvent(GnssAidingData & /*aidingData*/)
+DEFAULT_IMPL(false)
} // namespace loc_core
diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h
index abbf3d6..a934817 100644
--- a/core/LocAdapterBase.h
+++ b/core/LocAdapterBase.h
@@ -147,6 +147,7 @@ public:
virtual void reportNmeaEvent(const char* nmea, size_t length);
virtual void reportSvMeasurementEvent(GnssSvMeasurementSet &svMeasurementSet);
virtual void reportSvPolynomialEvent(GnssSvPolynomial &svPolynomial);
+ virtual void reportSvEphemerisEvent(GnssSvEphemerisReport &svEphemeris);
virtual void reportStatus(LocGpsStatusValue status);
virtual bool reportXtraServer(const char* url1, const char* url2,
const char* url3, const int maxlength);
@@ -168,6 +169,7 @@ public:
virtual void reportGnssSvTypeConfigEvent(const GnssSvTypeConfig& config);
virtual bool requestOdcpiEvent(OdcpiRequestInfo& request);
virtual bool reportGnssEngEnergyConsumedEvent(uint64_t energyConsumedSinceFirstBoot);
+ virtual bool reportDeleteAidingDataEvent(GnssAidingData &aidingData);
};
} // namespace loc_core
diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp
index 99a089e..b2642ca 100644
--- a/core/LocApiBase.cpp
+++ b/core/LocApiBase.cpp
@@ -369,6 +369,12 @@ void LocApiBase::reportGnssEngEnergyConsumedEvent(uint64_t energyConsumedSinceFi
energyConsumedSinceFirstBoot));
}
+void LocApiBase::reportDeleteAidingDataEvent(GnssAidingData& aidingData) {
+ // loop through adapters, and deliver to the first handling adapter.
+ TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->reportDeleteAidingDataEvent(aidingData));
+}
+
+
void LocApiBase::reportSv(GnssSvNotification& svNotify)
{
const char* constellationString[] = { "Unknown", "GPS", "SBAS", "GLONASS",
@@ -421,6 +427,14 @@ void LocApiBase::reportSvPolynomial(GnssSvPolynomial &svPolynomial)
);
}
+void LocApiBase::reportSvEphemeris(GnssSvEphemerisReport & svEphemeris)
+{
+ // loop through adapters, and deliver to all adapters.
+ TO_ALL_LOCADAPTERS(
+ mLocAdapters[i]->reportSvEphemerisEvent(svEphemeris)
+ );
+}
+
void LocApiBase::reportStatus(LocGpsStatusValue status)
{
// loop through adapters, and deliver to all adapters.
@@ -660,6 +674,10 @@ LocationError LocApiBase::
DEFAULT_IMPL(LOCATION_ERROR_SUCCESS)
void LocApiBase::
+ requestForAidingData(GnssAidingDataSvMask /*svDataMask*/)
+DEFAULT_IMPL()
+
+void LocApiBase::
installAGpsCert(const LocDerEncodedCertificate* /*pData*/,
size_t /*length*/,
uint32_t /*slotBitMask*/)
diff --git a/core/LocApiBase.h b/core/LocApiBase.h
index d4d337a..77c57d9 100644
--- a/core/LocApiBase.h
+++ b/core/LocApiBase.h
@@ -165,6 +165,7 @@ public:
void reportSv(GnssSvNotification& svNotify);
void reportSvMeasurement(GnssSvMeasurementSet &svMeasurementSet);
void reportSvPolynomial(GnssSvPolynomial &svPolynomial);
+ void reportSvEphemeris(GnssSvEphemerisReport &svEphemeris);
void reportStatus(LocGpsStatusValue status);
void reportNmea(const char* nmea, int length);
void reportData(GnssDataNotification& dataNotify, int msInWeek);
@@ -184,6 +185,7 @@ public:
void reportGnssSvTypeConfig(const GnssSvTypeConfig& config);
void requestOdcpi(OdcpiRequestInfo& request);
void reportGnssEngEnergyConsumedEvent(uint64_t energyConsumedSinceFirstBoot);
+ void reportDeleteAidingDataEvent(GnssAidingData& aidingData);
// downward calls
// All below functions are to be defined by adapter specific modules:
@@ -276,6 +278,7 @@ public:
void updateNmeaMask(uint32_t mask);
virtual LocationError setGpsLockSync(GnssConfigGpsLock lock);
+ virtual void requestForAidingData(GnssAidingDataSvMask svDataMask);
virtual LocationError setXtraVersionCheckSync(uint32_t check);