From e767a55d87aa6af6b5a3b8a1ceb2a3f6e4a8908c Mon Sep 17 00:00:00 2001 From: Hema Iyer Sankaranarayanan Date: Thu, 13 Feb 2014 11:10:26 -0800 Subject: Changes to inject sensor provider info to modem Changes to inject the sensor provider config info to modem. CRs-fixed: 604557 Change-Id: I3875e295f30d863a540efe22d6daf264d8d81476 --- core/LocApiBase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/LocApiBase.h') diff --git a/core/LocApiBase.h b/core/LocApiBase.h index e162cfc..1d96313 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -158,7 +158,7 @@ public: virtual enum loc_api_adapter_err setLPPConfig(uint32_t profile); virtual enum loc_api_adapter_err - setSensorControlConfig(int sensorUsage); + setSensorControlConfig(int sensorUsage, int sensorProvider); virtual enum loc_api_adapter_err setSensorProperties(bool gyroBiasVarianceRandomWalk_valid, float gyroBiasVarianceRandomWalk, -- cgit v1.2.3 From a2e85b1df70aa4df5288fc39e7f66c13fb834520 Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Wed, 26 Feb 2014 16:24:10 -0800 Subject: Add sendMsg to LocApiBase for utility It is useful for LocApiBase derived classes to have access to sending messages to the message handling thread without going through an adapter Change-Id: If60c473bfb504aab68ec661ecdfb012ef410c9cf CRs-fixed: 615958 --- core/LocApiBase.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/LocApiBase.h') diff --git a/core/LocApiBase.h b/core/LocApiBase.h index 1d96313..1603e6b 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -70,7 +70,6 @@ class LocApiBase { friend struct LocOpenMsg; friend class ContextBase; const MsgTask* mMsgTask; - LocAdapterBase* mLocAdapters[MAX_ADAPTERS]; protected: @@ -87,6 +86,10 @@ protected: const LOC_API_ADAPTER_EVENT_MASK_T mExcludedMask; public: + inline void sendMsg(const LocMsg* msg) const { + mMsgTask->sendMsg(msg); + } + void addAdapter(LocAdapterBase* adapter); void removeAdapter(LocAdapterBase* adapter); -- cgit v1.2.3 From 9e585cb7bfbbf602555fe7b8e737ff64083ac7f4 Mon Sep 17 00:00:00 2001 From: Tushar Janefalkar Date: Mon, 24 Feb 2014 11:13:57 -0800 Subject: Inject feature config This change injects feature config through using the first available context CRs-fixed: 616544 Change-Id: Idea5bd8acfff729589c071f20bec18679c89ab25 --- core/LocApiBase.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'core/LocApiBase.h') diff --git a/core/LocApiBase.h b/core/LocApiBase.h index 1603e6b..bef0379 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -36,6 +36,7 @@ #include namespace loc_core { +class ContextBase; int hexcode(char *hexstring, int string_size, const char *data, int data_size); @@ -70,6 +71,7 @@ class LocApiBase { friend struct LocOpenMsg; friend class ContextBase; const MsgTask* mMsgTask; + ContextBase *mContext; LocAdapterBase* mLocAdapters[MAX_ADAPTERS]; protected: @@ -80,7 +82,8 @@ protected: LOC_API_ADAPTER_EVENT_MASK_T getEvtMask(); LOC_API_ADAPTER_EVENT_MASK_T mMask; LocApiBase(const MsgTask* msgTask, - LOC_API_ADAPTER_EVENT_MASK_T excludedMask); + LOC_API_ADAPTER_EVENT_MASK_T excludedMask, + ContextBase* context = NULL); inline virtual ~LocApiBase() { close(); } bool isInSession(); const LOC_API_ADAPTER_EVENT_MASK_T mExcludedMask; @@ -189,9 +192,11 @@ public: virtual enum loc_api_adapter_err setAGLONASSProtocol(unsigned long aGlonassProtocol); virtual enum loc_api_adapter_err - getZppFix(GpsLocation & zppLoc); + getWwanZppFix(GpsLocation & zppLoc); virtual enum loc_api_adapter_err - getZppFix(GpsLocation & zppLoc, LocPosTechMask & tech_mask); + getBestAvailableZppFix(GpsLocation & zppLoc); + virtual enum loc_api_adapter_err + getBestAvailableZppFix(GpsLocation & zppLoc, LocPosTechMask & tech_mask); virtual int initDataServiceClient(); virtual int openAndStartDataCall(); virtual void stopDataCall(); @@ -215,7 +220,8 @@ public: }; typedef LocApiBase* (getLocApi_t)(const MsgTask* msgTask, - LOC_API_ADAPTER_EVENT_MASK_T exMask); + LOC_API_ADAPTER_EVENT_MASK_T exMask, + ContextBase *context); } // namespace loc_core -- cgit v1.2.3 From c091f138efbfda2f9e27a66727e5983faf86fe56 Mon Sep 17 00:00:00 2001 From: Tushar Janefalkar Date: Thu, 26 Jun 2014 11:08:12 -0700 Subject: Add support for XTRA_VERSION_CHECK QMI LOC msg A new QMI LOC msg is introduced which injects into the modem a value that determines whether or not the version of XTRA is to be checked Change-Id: I0ef579332d064713ce73d80e66dc8c6fef1c1638 CRs-fixed: 649860 --- core/LocApiBase.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/LocApiBase.h') diff --git a/core/LocApiBase.h b/core/LocApiBase.h index bef0379..f489f63 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -53,6 +53,13 @@ int decodeAddress(char *addr_string, int string_size, #define TO_1ST_HANDLING_ADAPTER(adapters, call) \ for (int i = 0; i Date: Fri, 1 Nov 2013 15:58:07 -0700 Subject: agps cert install api implementation Implementation of the install agps certificate API for installing certificates at runtime. Change-Id: I49239b612381e81bd8a4c0a5773783572d4b2d9a --- core/LocApiBase.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/LocApiBase.h') diff --git a/core/LocApiBase.h b/core/LocApiBase.h index f489f63..b312937 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -208,7 +208,9 @@ public: virtual int openAndStartDataCall(); virtual void stopDataCall(); virtual void closeDataCall(); - + virtual void installAGpsCert(const DerEncodedCertificate* pData, + size_t length, + uint32_t slotBitMask); inline virtual void setInSession(bool inSession) {} /*Values for lock -- cgit v1.2.3 From 90378134eafcc137c157a40f92561d69cbf01a7a Mon Sep 17 00:00:00 2001 From: Jiafei Wen Date: Mon, 1 Sep 2014 19:07:58 -0700 Subject: Checking messages supported or not When device boots up, get a list of message supported by modem, based on which some adapeters will be able to update register masks. CRs-fixed: 601349 Change-Id: I6af282f8e551f1f3c6bf8795e968fdbc7b0a9fa3 --- core/LocApiBase.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core/LocApiBase.h') diff --git a/core/LocApiBase.h b/core/LocApiBase.h index b312937..af9d270 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -80,6 +80,7 @@ class LocApiBase { const MsgTask* mMsgTask; ContextBase *mContext; LocAdapterBase* mLocAdapters[MAX_ADAPTERS]; + uint64_t mSupportedMsg; protected: virtual enum loc_api_adapter_err @@ -128,6 +129,7 @@ public: void reportDataCallOpened(); void reportDataCallClosed(); void requestNiNotify(GpsNiNotification ¬ify, const void* data); + void saveSupportedMsgList(uint64_t supportedMsgList); // downward calls // All below functions are to be defined by adapter specific modules: @@ -212,6 +214,15 @@ public: size_t length, uint32_t slotBitMask); inline virtual void setInSession(bool inSession) {} + inline bool isMessageSupported (LocCheckingMessagesID msgID) const { + if (msgID > (sizeof(mSupportedMsg) << 3)) { + return false; + } else { + uint32_t messageChecker = 1 << msgID; + return (messageChecker & mSupportedMsg) == messageChecker; + } + } + void updateEvtMask(); /*Values for lock 1 = Do not lock any position sessions -- cgit v1.2.3 From af2762ceca5cf9f99120ab5d1a6971fa1c3b5901 Mon Sep 17 00:00:00 2001 From: Kevin Tang Date: Thu, 11 Sep 2014 12:19:14 -0700 Subject: GPS_LOCK configuration support GPS_LOCK is defined as a bit mask in the higher layer defined in gps.conf. GPS HAL reads from gps.conf, yet this can be reconfigured by gps.h defined new API to a different value. The current value will be used at cleanup() time, to optionally lock gps modem to the configured mode. This changs also sets SUPL URL to NULL if hostname comes with set_server() API is a NULL string. Also optimized configuration_update() implementation so that no all items will go through the reconfigu scan. Also added SUPL_MODE as a parameter in gps.conf which can be uncommented to over-write the value from config.xml. This can be used for testing purposes Bug: 16131208 Bug: 17288144 CRs-fixed: 736966 Change-Id: I12a89b12ff82b6efd7b5567d2fcd6a7e79414c71 --- core/LocApiBase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/LocApiBase.h') diff --git a/core/LocApiBase.h b/core/LocApiBase.h index af9d270..f68cf73 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -230,7 +230,7 @@ public: 3 = Lock MT position sessions 4 = Lock all position sessions */ - virtual int setGpsLock(unsigned int lock); + virtual int setGpsLock(LOC_GPS_LOCK_MASK lock); /* Returns Current value of GPS Lock on success -- cgit v1.2.3 From 407848e5cfc87c375e95215a85f6445c396a26c6 Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Mon, 15 Dec 2014 17:47:50 -0800 Subject: 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 --- core/LocApiBase.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/LocApiBase.h') 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 ¬ify, 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, -- cgit v1.2.3 From dd823bc93e10e9a25967d2e9bbfee3d0bb0e454e Mon Sep 17 00:00:00 2001 From: Dante Russo Date: Wed, 17 Jun 2015 14:27:50 -0700 Subject: Add glo and bds to used-in-fix mask The used-in-fix mask is only keeping track of GPS SVs, so add a used-in-fix mask for GlONASS SVs and BDS SVs as well to avoid NMEA generation issues CRs-fixed: 826152 Change-Id: I33862cf8d40db1d667179ef68d18703edc359843 --- core/LocApiBase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/LocApiBase.h') diff --git a/core/LocApiBase.h b/core/LocApiBase.h index 414769b..b1c3d30 100644 --- a/core/LocApiBase.h +++ b/core/LocApiBase.h @@ -113,7 +113,7 @@ public: enum loc_sess_status status, LocPosTechMask loc_technology_mask = LOC_POS_TECH_MASK_DEFAULT); - void reportSv(GpsSvStatus &svStatus, + void reportSv(GnssSvStatus &svStatus, GpsLocationExtended &locationExtended, void* svExt); void reportStatus(GpsStatusValue status); -- cgit v1.2.3