summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqctecmdr <qctecmdr@localhost>2019-11-22 14:11:11 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2019-11-22 14:11:10 -0800
commit01503d5e0ceab2033b17bba01f1fc04db61b8e94 (patch)
tree77effa48004e28543f7a5eed8a1daf9ca3ff0972
parent97c612b5a0153169e29bf28ef8098ca4bb104786 (diff)
parent1a16ef3803aca2b2d8f1468e9aa99961781dfac3 (diff)
downloadgps-01503d5e0ceab2033b17bba01f1fc04db61b8e94.tar.gz
Merge "Report ErrRecovery only when there is actual event"
-rw-r--r--core/SystemStatus.cpp3
-rw-r--r--core/SystemStatus.h32
2 files changed, 20 insertions, 15 deletions
diff --git a/core/SystemStatus.cpp b/core/SystemStatus.cpp
index 0624580..393eead 100644
--- a/core/SystemStatus.cpp
+++ b/core/SystemStatus.cpp
@@ -1346,6 +1346,9 @@ SystemStatus::SystemStatus(const MsgTask* msgTask) :
template <typename TYPE_REPORT, typename TYPE_ITEM>
bool SystemStatus::setIteminReport(TYPE_REPORT& report, TYPE_ITEM&& s)
{
+ if (s.ignore()) {
+ return false;
+ }
if (!report.empty() && report.back().equals(static_cast<TYPE_ITEM&>(s.collate(report.back())))) {
// there is no change - just update reported timestamp
report.back().mUtcReported = s.mUtcReported;
diff --git a/core/SystemStatus.h b/core/SystemStatus.h
index 2cfb25d..8ec85fa 100644
--- a/core/SystemStatus.h
+++ b/core/SystemStatus.h
@@ -87,6 +87,7 @@ public:
return *this;
}
virtual void dump(void) {};
+ inline virtual bool ignore() { return false; };
};
class SystemStatusLocation : public SystemStatusItemBase
@@ -103,7 +104,7 @@ public:
mLocation(location),
mLocationEx(locationEx) {}
bool equals(const SystemStatusLocation& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusPQWM1;
@@ -133,7 +134,7 @@ public:
mTimeUncNs(0ULL) {}
inline SystemStatusTimeAndClock(const SystemStatusPQWM1& nmea);
bool equals(const SystemStatusTimeAndClock& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusXoState : public SystemStatusItemBase
@@ -144,7 +145,7 @@ public:
mXoState(0) {}
inline SystemStatusXoState(const SystemStatusPQWM1& nmea);
bool equals(const SystemStatusXoState& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusRfAndParams : public SystemStatusItemBase
@@ -191,7 +192,7 @@ public:
mGalBpAmpQ(0) {}
inline SystemStatusRfAndParams(const SystemStatusPQWM1& nmea);
bool equals(const SystemStatusRfAndParams& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusErrRecovery : public SystemStatusItemBase
@@ -202,7 +203,8 @@ public:
mRecErrorRecovery(0) {};
inline SystemStatusErrRecovery(const SystemStatusPQWM1& nmea);
bool equals(const SystemStatusErrRecovery& peer);
- void dump(void);
+ inline bool ignore() override { return 0 == mRecErrorRecovery; };
+ void dump(void) override;
};
class SystemStatusPQWP1;
@@ -226,7 +228,7 @@ public:
mEpiSrc(0) {}
inline SystemStatusInjectedPosition(const SystemStatusPQWP1& nmea);
bool equals(const SystemStatusInjectedPosition& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusPQWP2;
@@ -248,7 +250,7 @@ public:
mBestAltUnc(0) {}
inline SystemStatusBestPosition(const SystemStatusPQWP2& nmea);
bool equals(const SystemStatusBestPosition& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusPQWP3;
@@ -284,7 +286,7 @@ public:
mNavicXtraValid(0) {}
inline SystemStatusXtra(const SystemStatusPQWP3& nmea);
bool equals(const SystemStatusXtra& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusPQWP4;
@@ -304,7 +306,7 @@ public:
mQzssEpheValid(0) {}
inline SystemStatusEphemeris(const SystemStatusPQWP4& nmea);
bool equals(const SystemStatusEphemeris& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusPQWP5;
@@ -350,7 +352,7 @@ public:
mNavicBadMask(0) {}
inline SystemStatusSvHealth(const SystemStatusPQWP5& nmea);
bool equals(const SystemStatusSvHealth& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusPQWP6;
@@ -362,7 +364,7 @@ public:
mFixInfoMask(0) {}
inline SystemStatusPdr(const SystemStatusPQWP6& nmea);
bool equals(const SystemStatusPdr& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusPQWP7;
@@ -386,7 +388,7 @@ public:
}
inline SystemStatusNavData(const SystemStatusPQWP7& nmea);
bool equals(const SystemStatusNavData& peer);
- void dump(void);
+ void dump(void) override;
};
class SystemStatusPQWS1;
@@ -400,7 +402,7 @@ public:
mHepeLimit(0) {}
inline SystemStatusPositionFailure(const SystemStatusPQWS1& nmea);
bool equals(const SystemStatusPositionFailure& peer);
- void dump(void);
+ void dump(void) override;
};
/******************************************************************************
@@ -759,7 +761,7 @@ public:
inline bool equals(const SystemStatusTac& peer) {
return (mValue == peer.mValue);
}
- inline void dump(void) {
+ inline void dump(void) override {
LOC_LOGD("Tac: value=%s", mValue.c_str());
}
};
@@ -775,7 +777,7 @@ public:
inline bool equals(const SystemStatusMccMnc& peer) {
return (mValue == peer.mValue);
}
- inline void dump(void) {
+ inline void dump(void) override {
LOC_LOGD("TacMccMnc value=%s", mValue.c_str());
}
};