From e0895bfa0067042ce29425d390636da77a158cdc Mon Sep 17 00:00:00 2001 From: Pandari Sabhapathi Date: Fri, 18 Apr 2014 16:04:08 -0700 Subject: [PATCH] Sending HW FLP request to ULP ULP Should be informed of all sessions in progress. -Added methods to ULP Proxy for the purpose of reporting batching sessions to ULP CRs-fixed: 657554 Change-Id: I6e1d9728a0462b86c4ffe73bd5a6ac98e7c0fafe --- core/UlpProxyBase.h | 11 +++++++++++ core/gps_extended_c.h | 23 +++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/core/UlpProxyBase.h b/core/UlpProxyBase.h index 90097571..b9a8224f 100644 --- a/core/UlpProxyBase.h +++ b/core/UlpProxyBase.h @@ -50,6 +50,7 @@ public: mPosMode = params; return false; } + inline virtual bool reportPosition(UlpLocation &location, GpsLocationExtended &locationExtended, void* locationExt, @@ -67,6 +68,16 @@ public: } inline virtual void setAdapter(LocAdapterBase* adapter) {} inline virtual void setCapabilities(unsigned long capabilities) {} + inline virtual bool reportBatchingSession(GpsExtBatchOptions &options, + bool active) { + return false; + } + inline virtual bool reportPositions(GpsExtLocation * locations, + int32_t number_of_locations, + enum loc_sess_status status, + LocPosTechMask techMask) { + return false; + } }; } // namespace loc_core diff --git a/core/gps_extended_c.h b/core/gps_extended_c.h index e0e286f9..d4a7dbea 100644 --- a/core/gps_extended_c.h +++ b/core/gps_extended_c.h @@ -60,6 +60,8 @@ extern "C" { #define ULP_LOCATION_IS_FROM_ZPP 0x0004 /** Position is from a Geofence Breach Event */ #define ULP_LOCATION_IS_FROM_GEOFENCE 0X0008 +/** Positioin is from Hardware FLP */ +#define ULP_LOCATION_IS_FROM_HW_FLP 0x0010 #define ULP_MIN_INTERVAL_INVALID 0xffffffff @@ -111,6 +113,14 @@ typedef struct { gps_request_utc_time request_utc_time_cb; } GpsExtCallbacks; +/** GPS extended batch options */ +typedef struct { + double max_power_allocation_mW; + uint32_t sources_to_use; + uint32_t flags; + int64_t period_ns; +} GpsExtBatchOptions; + /** Callback to report the xtra server url to the client. * The client should use this url when downloading xtra unless overwritten * in the gps.conf file @@ -234,6 +244,19 @@ typedef struct { float speed_unc; } GpsLocationExtended; +typedef struct GpsExtLocation_s { + size_t size; + uint16_t flags; + double latitude; + double longitude; + double altitude; + float speed; + float bearing; + float accuracy; + int64_t timestamp; + uint32_t sources_used; +} GpsExtLocation; + enum loc_sess_status { LOC_SESS_SUCCESS, LOC_SESS_INTERMEDIATE,