From 4ff6da4a8ac818026999b21b37d1fb97a67f21c0 Mon Sep 17 00:00:00 2001 From: Katz Yamada Date: Tue, 21 Mar 2017 17:16:49 -0700 Subject: SystemStatus - Add BugReport support Add BugReport support in SystemStatus. It exposes getReport interface to GnssDebug via GnssAdapter. GnssDebug generates Gnss' BugReport information upon a request tiggered by Android framework. Change-Id: I681777da10c860ea15ee65b7860a5ce61a7798db CRs-Fixed: 2016125 --- core/SystemStatus.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'core/SystemStatus.h') diff --git a/core/SystemStatus.h b/core/SystemStatus.h index 95f82da..208c669 100644 --- a/core/SystemStatus.h +++ b/core/SystemStatus.h @@ -29,7 +29,16 @@ #ifndef __SYSTEM_STATUS__ #define __SYSTEM_STATUS__ +#include #include +#include + +#define GPS_MIN (1) +#define SBAS_MIN (33) +#define GLO_MIN (65) +#define BDS_MIN (201) +#define QZSS_MIN (193) +#define GAL_MIN (301) namespace loc_core { @@ -46,6 +55,21 @@ public: virtual void dump(void) { }; }; +class SystemStatusLocation : public SystemStatusItemBase +{ +public: + UlpLocation mLocation; + GpsLocationExtended mLocationEx; + SystemStatusLocation(const UlpLocation& location, + const GpsLocationExtended& locationEx, + const timespec& ts) : + SystemStatusItemBase(ts), + mLocation(location), + mLocationEx(locationEx){ }; + bool equals(SystemStatusLocation& peer); + void dump(void); +}; + class SystemStatusPQWM1; class SystemStatusTimeAndClock : public SystemStatusItemBase { @@ -212,6 +236,8 @@ public: class SystemStatusReports { public: + std::vector mLocation; + std::vector mTimeAndClock; std::vector mXoState; std::vector mRfAndParams; @@ -233,6 +259,8 @@ class SystemStatus { static pthread_mutex_t mMutexSystemStatus; + static const uint32_t maxLocation = 5; + static const uint32_t maxTimeAndClock = 5; static const uint32_t maxXoState = 5; static const uint32_t maxRfAndParams = 5; @@ -248,6 +276,8 @@ class SystemStatus SystemStatusReports mCache; + bool setLocation(const UlpLocation& location); + bool setTimeAndCLock(const SystemStatusPQWM1& nmea); bool setXoState(const SystemStatusPQWM1& nmea); bool setRfAndParams(const SystemStatusPQWM1& nmea); @@ -265,6 +295,7 @@ public: SystemStatus(); ~SystemStatus() { } + bool eventPosition(const UlpLocation& location,const GpsLocationExtended& locationEx); bool setNmeaString(const char *data, uint32_t len); bool getReport(SystemStatusReports& reports, bool isLatestonly = false) const; }; -- cgit v1.2.3