summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSaurabh Srivastava <ssrivast@codeaurora.org>2018-04-08 23:35:14 +0530
committerSaurabh Srivastava <ssrivast@codeaurora.org>2018-06-03 22:43:58 +0530
commit98edc19bea3cf5787e5af903c8408dede420be58 (patch)
tree0702ae0f5d03195e8748e47a93c412feb8391bb9 /core
parent66c682f7d977846215b6d3607a5a43ad21c9c8b9 (diff)
downloadgps-98edc19bea3cf5787e5af903c8408dede420be58.tar.gz
FR 48850 - Device based hybrid ODCPI
Adding support for sending ODCPI request to framework via IGnss interface. Change-Id: I97ab4f00505705fedc266998602499fd344baf31 CRs-Fixed: 2217664
Diffstat (limited to 'core')
-rw-r--r--core/LocAdapterBase.cpp4
-rw-r--r--core/LocAdapterBase.h1
-rw-r--r--core/LocApiBase.cpp9
-rw-r--r--core/LocApiBase.h3
4 files changed, 17 insertions, 0 deletions
diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp
index 5f98456..267d539 100644
--- a/core/LocAdapterBase.cpp
+++ b/core/LocAdapterBase.cpp
@@ -173,4 +173,8 @@ DEFAULT_IMPL()
void LocAdapterBase::reportGnssSvTypeConfigEvent(const GnssSvTypeConfig& /*config*/)
DEFAULT_IMPL()
+bool LocAdapterBase::
+ requestOdcpiEvent(OdcpiRequestInfo& /*request*/)
+DEFAULT_IMPL(false)
+
} // namespace loc_core
diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h
index 9fcee12..2083ac4 100644
--- a/core/LocAdapterBase.h
+++ b/core/LocAdapterBase.h
@@ -160,6 +160,7 @@ public:
GpsLocationExtended &location_extended, LocPosTechMask tech_mask);
virtual void reportGnssSvIdConfigEvent(const GnssSvIdConfig& config);
virtual void reportGnssSvTypeConfigEvent(const GnssSvTypeConfig& config);
+ virtual bool requestOdcpiEvent(OdcpiRequestInfo& request);
};
} // namespace loc_core
diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp
index 9c54726..3eec209 100644
--- a/core/LocApiBase.cpp
+++ b/core/LocApiBase.cpp
@@ -288,6 +288,11 @@ void LocApiBase::reportZppBestAvailableFix(LocGpsLocation &zppLoc,
location_extended, tech_mask));
}
+void LocApiBase::requestOdcpi(OdcpiRequestInfo& request)
+{
+ // loop through adapters, and deliver to the first handling adapter.
+ TO_1ST_HANDLING_LOCADAPTERS(mLocAdapters[i]->requestOdcpiEvent(request));
+}
void LocApiBase::reportSv(GnssSvNotification& svNotify)
{
@@ -468,6 +473,10 @@ void LocApiBase::
DEFAULT_IMPL()
void LocApiBase::
+ injectPosition(const Location& /*location*/, bool /*onDemandCpi*/)
+DEFAULT_IMPL()
+
+void LocApiBase::
setTime(LocGpsUtcTime /*time*/, int64_t /*timeReference*/, int /*uncertainty*/)
DEFAULT_IMPL()
diff --git a/core/LocApiBase.h b/core/LocApiBase.h
index 17ccc4e..7b3aee3 100644
--- a/core/LocApiBase.h
+++ b/core/LocApiBase.h
@@ -159,6 +159,7 @@ public:
LocPosTechMask tech_mask);
void reportGnssSvIdConfig(const GnssSvIdConfig& config);
void reportGnssSvTypeConfig(const GnssSvTypeConfig& config);
+ void requestOdcpi(OdcpiRequestInfo& request);
// downward calls
// All below functions are to be defined by adapter specific modules:
@@ -175,6 +176,8 @@ public:
virtual void
injectPosition(double latitude, double longitude, float accuracy);
virtual void
+ injectPosition(const Location& location, bool onDemandCpi);
+ virtual void
setTime(LocGpsUtcTime time, int64_t timeReference, int uncertainty);
// // TODO:: called from izatapipds