summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDante Russo <drusso@codeaurora.org>2014-12-15 17:47:50 -0800
committerDante Russo <drusso@codeaurora.org>2015-01-16 13:22:20 -0800
commit407848e5cfc87c375e95215a85f6445c396a26c6 (patch)
tree4f7e1b9354e665ae72af42837ab7d62136233e3d /core
parent7601d648288de33f30f2a66f1e8095d650785a8c (diff)
downloadgps-407848e5cfc87c375e95215a85f6445c396a26c6.tar.gz
GNSS measurement
Implementation of GNSS Measurements support. In GPS HAL, Only GPS Measurements report will be collected from modem. CRs-fixed: 771496 Change-Id: Ief4368099df4ff573ad1a764f4156d63685e936d
Diffstat (limited to 'core')
-rw-r--r--core/LocAdapterBase.cpp4
-rw-r--r--core/LocAdapterBase.h1
-rw-r--r--core/LocApiBase.cpp16
-rw-r--r--core/LocApiBase.h12
-rw-r--r--core/LocDualContext.cpp3
-rw-r--r--core/gps_extended_c.h2
6 files changed, 37 insertions, 1 deletions
diff --git a/core/LocAdapterBase.cpp b/core/LocAdapterBase.cpp
index eea8edd..23184df 100644
--- a/core/LocAdapterBase.cpp
+++ b/core/LocAdapterBase.cpp
@@ -132,4 +132,8 @@ DEFAULT_IMPL(false)
void LocAdapterBase::
shutdown()
DEFAULT_IMPL()
+
+void LocAdapterBase::
+ reportGpsMeasurementData(GpsData &gpsMeasurementData)
+DEFAULT_IMPL()
} // namespace loc_core
diff --git a/core/LocAdapterBase.h b/core/LocAdapterBase.h
index 2fec312..9d5f6a8 100644
--- a/core/LocAdapterBase.h
+++ b/core/LocAdapterBase.h
@@ -112,6 +112,7 @@ public:
inline virtual bool isInSession() { return false; }
virtual void shutdown();
ContextBase* getContext() const { return mContext; }
+ virtual void reportGpsMeasurementData(GpsData &gpsMeasurementData);
};
} // namespace loc_core
diff --git a/core/LocApiBase.cpp b/core/LocApiBase.cpp
index 82bfe21..f56694e 100644
--- a/core/LocApiBase.cpp
+++ b/core/LocApiBase.cpp
@@ -363,6 +363,12 @@ void* LocApiBase :: getSibling()
LocApiProxyBase* LocApiBase :: getLocApiProxy()
DEFAULT_IMPL(NULL)
+void LocApiBase::reportGpsMeasurementData(GpsData &gpsMeasurementData)
+{
+ // loop through adapters, and deliver to all adapters.
+ TO_ALL_LOCADAPTERS(mLocAdapters[i]->reportGpsMeasurementData(gpsMeasurementData));
+}
+
enum loc_api_adapter_err LocApiBase::
open(LOC_API_ADAPTER_EVENT_MASK_T mask)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
@@ -526,4 +532,14 @@ DEFAULT_IMPL(-1)
enum loc_api_adapter_err LocApiBase::
setXtraVersionCheck(enum xtra_version_check check)
DEFAULT_IMPL(LOC_API_ADAPTER_ERR_SUCCESS)
+
+int LocApiBase::
+ updateRegistrationMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+ loc_registration_mask_status isEnabled)
+DEFAULT_IMPL(-1)
+
+bool LocApiBase::
+ gnssConstellationConfig()
+DEFAULT_IMPL(false)
+
} // namespace loc_core
diff --git a/core/LocApiBase.h b/core/LocApiBase.h
index f68cf73..414769b 100644
--- a/core/LocApiBase.h
+++ b/core/LocApiBase.h
@@ -130,6 +130,7 @@ public:
void reportDataCallClosed();
void requestNiNotify(GpsNiNotification &notify, const void* data);
void saveSupportedMsgList(uint64_t supportedMsgList);
+ void reportGpsMeasurementData(GpsData &gpsMeasurementData);
// downward calls
// All below functions are to be defined by adapter specific modules:
@@ -237,7 +238,18 @@ public:
-1 on failure
*/
virtual int getGpsLock(void);
+
virtual enum loc_api_adapter_err setXtraVersionCheck(enum xtra_version_check check);
+
+ /*
+ Update gps reporting events
+ */
+ virtual int updateRegistrationMask(LOC_API_ADAPTER_EVENT_MASK_T event,
+ loc_registration_mask_status isEnabled);
+ /*
+ Check if the modem support the service
+ */
+ virtual bool gnssConstellationConfig();
};
typedef LocApiBase* (getLocApi_t)(const MsgTask* msgTask,
diff --git a/core/LocDualContext.cpp b/core/LocDualContext.cpp
index ab15110..41ad4f0 100644
--- a/core/LocDualContext.cpp
+++ b/core/LocDualContext.cpp
@@ -50,7 +50,8 @@ LocDualContext::mBgExclMask =
LOC_API_ADAPTER_BIT_NMEA_POSITION_REPORT |
LOC_API_ADAPTER_BIT_IOCTL_REPORT |
LOC_API_ADAPTER_BIT_STATUS_REPORT |
- LOC_API_ADAPTER_BIT_GEOFENCE_GEN_ALERT);
+ LOC_API_ADAPTER_BIT_GEOFENCE_GEN_ALERT |
+ LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT);
const MsgTask* LocDualContext::mMsgTask = NULL;
ContextBase* LocDualContext::mFgContext = NULL;
diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h
index acf92b3..8a4e340 100644
--- a/core/gps_extended_c.h
+++ b/core/gps_extended_c.h
@@ -347,6 +347,7 @@ enum loc_api_adapter_event_index {
LOC_API_ADAPTER_BATCHED_GENFENCE_BREACH_REPORT, //
LOC_API_ADAPTER_GDT_UPLOAD_BEGIN_REQ, // GDT upload start request
LOC_API_ADAPTER_GDT_UPLOAD_END_REQ, // GDT upload end request
+ LOC_API_ADAPTER_GNSS_MEASUREMENT, // GNSS Measurement report
LOC_API_ADAPTER_EVENT_MAX
};
@@ -375,6 +376,7 @@ enum loc_api_adapter_event_index {
#define LOC_API_ADAPTER_BIT_BATCHED_POSITION_REPORT (1<<LOC_API_ADAPTER_BATCHED_POSITION_REPORT)
#define LOC_API_ADAPTER_BIT_GDT_UPLOAD_BEGIN_REQ (1<<LOC_API_ADAPTER_GDT_UPLOAD_BEGIN_REQ)
#define LOC_API_ADAPTER_BIT_GDT_UPLOAD_END_REQ (1<<LOC_API_ADAPTER_GDT_UPLOAD_END_REQ)
+#define LOC_API_ADAPTER_BIT_GNSS_MEASUREMENT (1<<LOC_API_ADAPTER_GNSS_MEASUREMENT)
typedef unsigned int LOC_API_ADAPTER_EVENT_MASK_T;