diff options
author | Katz Yamada <kyamada@codeaurora.org> | 2017-03-21 17:16:49 -0700 |
---|---|---|
committer | Katz Yamada <kyamada@codeaurora.org> | 2017-03-21 21:42:32 -0700 |
commit | 4ff6da4a8ac818026999b21b37d1fb97a67f21c0 (patch) | |
tree | de21abe1ff79e5bdf45b867d85bf99b710ac0e0f /core/SystemStatus.h | |
parent | 592b3f557edac9a1e25a8a22306573ee7f530ee9 (diff) | |
download | gps-4ff6da4a8ac818026999b21b37d1fb97a67f21c0.tar.gz |
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
Diffstat (limited to 'core/SystemStatus.h')
-rw-r--r-- | core/SystemStatus.h | 31 |
1 files changed, 31 insertions, 0 deletions
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 <stdint.h> #include <vector> +#include <gps_extended_c.h> + +#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<SystemStatusLocation> mLocation; + std::vector<SystemStatusTimeAndClock> mTimeAndClock; std::vector<SystemStatusXoState> mXoState; std::vector<SystemStatusRfAndParams> 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; }; |