Report ErrRecovery only when there is actual event
SystemStatus needs to report ErrRecovery events only when they actually happen (value != 0). Change-Id: I282d9c703542ef4bfd61ded78b903017816bd2cb CRs-Fixed: 2491022
This commit is contained in:
parent
3bbb89aee1
commit
1a16ef3803
2 changed files with 20 additions and 15 deletions
|
@ -1338,6 +1338,9 @@ SystemStatus::SystemStatus(const MsgTask* msgTask) :
|
||||||
template <typename TYPE_REPORT, typename TYPE_ITEM>
|
template <typename TYPE_REPORT, typename TYPE_ITEM>
|
||||||
bool SystemStatus::setIteminReport(TYPE_REPORT& report, TYPE_ITEM&& s)
|
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())))) {
|
if (!report.empty() && report.back().equals(static_cast<TYPE_ITEM&>(s.collate(report.back())))) {
|
||||||
// there is no change - just update reported timestamp
|
// there is no change - just update reported timestamp
|
||||||
report.back().mUtcReported = s.mUtcReported;
|
report.back().mUtcReported = s.mUtcReported;
|
||||||
|
|
|
@ -86,6 +86,7 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
virtual void dump(void) {};
|
virtual void dump(void) {};
|
||||||
|
inline virtual bool ignore() { return false; };
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusLocation : public SystemStatusItemBase
|
class SystemStatusLocation : public SystemStatusItemBase
|
||||||
|
@ -102,7 +103,7 @@ public:
|
||||||
mLocation(location),
|
mLocation(location),
|
||||||
mLocationEx(locationEx) {}
|
mLocationEx(locationEx) {}
|
||||||
bool equals(const SystemStatusLocation& peer);
|
bool equals(const SystemStatusLocation& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWM1;
|
class SystemStatusPQWM1;
|
||||||
|
@ -132,7 +133,7 @@ public:
|
||||||
mTimeUncNs(0ULL) {}
|
mTimeUncNs(0ULL) {}
|
||||||
inline SystemStatusTimeAndClock(const SystemStatusPQWM1& nmea);
|
inline SystemStatusTimeAndClock(const SystemStatusPQWM1& nmea);
|
||||||
bool equals(const SystemStatusTimeAndClock& peer);
|
bool equals(const SystemStatusTimeAndClock& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusXoState : public SystemStatusItemBase
|
class SystemStatusXoState : public SystemStatusItemBase
|
||||||
|
@ -143,7 +144,7 @@ public:
|
||||||
mXoState(0) {}
|
mXoState(0) {}
|
||||||
inline SystemStatusXoState(const SystemStatusPQWM1& nmea);
|
inline SystemStatusXoState(const SystemStatusPQWM1& nmea);
|
||||||
bool equals(const SystemStatusXoState& peer);
|
bool equals(const SystemStatusXoState& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusRfAndParams : public SystemStatusItemBase
|
class SystemStatusRfAndParams : public SystemStatusItemBase
|
||||||
|
@ -190,7 +191,7 @@ public:
|
||||||
mGalBpAmpQ(0) {}
|
mGalBpAmpQ(0) {}
|
||||||
inline SystemStatusRfAndParams(const SystemStatusPQWM1& nmea);
|
inline SystemStatusRfAndParams(const SystemStatusPQWM1& nmea);
|
||||||
bool equals(const SystemStatusRfAndParams& peer);
|
bool equals(const SystemStatusRfAndParams& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusErrRecovery : public SystemStatusItemBase
|
class SystemStatusErrRecovery : public SystemStatusItemBase
|
||||||
|
@ -201,7 +202,8 @@ public:
|
||||||
mRecErrorRecovery(0) {};
|
mRecErrorRecovery(0) {};
|
||||||
inline SystemStatusErrRecovery(const SystemStatusPQWM1& nmea);
|
inline SystemStatusErrRecovery(const SystemStatusPQWM1& nmea);
|
||||||
bool equals(const SystemStatusErrRecovery& peer);
|
bool equals(const SystemStatusErrRecovery& peer);
|
||||||
void dump(void);
|
inline bool ignore() override { return 0 == mRecErrorRecovery; };
|
||||||
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWP1;
|
class SystemStatusPQWP1;
|
||||||
|
@ -225,7 +227,7 @@ public:
|
||||||
mEpiSrc(0) {}
|
mEpiSrc(0) {}
|
||||||
inline SystemStatusInjectedPosition(const SystemStatusPQWP1& nmea);
|
inline SystemStatusInjectedPosition(const SystemStatusPQWP1& nmea);
|
||||||
bool equals(const SystemStatusInjectedPosition& peer);
|
bool equals(const SystemStatusInjectedPosition& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWP2;
|
class SystemStatusPQWP2;
|
||||||
|
@ -247,7 +249,7 @@ public:
|
||||||
mBestAltUnc(0) {}
|
mBestAltUnc(0) {}
|
||||||
inline SystemStatusBestPosition(const SystemStatusPQWP2& nmea);
|
inline SystemStatusBestPosition(const SystemStatusPQWP2& nmea);
|
||||||
bool equals(const SystemStatusBestPosition& peer);
|
bool equals(const SystemStatusBestPosition& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWP3;
|
class SystemStatusPQWP3;
|
||||||
|
@ -283,7 +285,7 @@ public:
|
||||||
mNavicXtraValid(0) {}
|
mNavicXtraValid(0) {}
|
||||||
inline SystemStatusXtra(const SystemStatusPQWP3& nmea);
|
inline SystemStatusXtra(const SystemStatusPQWP3& nmea);
|
||||||
bool equals(const SystemStatusXtra& peer);
|
bool equals(const SystemStatusXtra& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWP4;
|
class SystemStatusPQWP4;
|
||||||
|
@ -303,7 +305,7 @@ public:
|
||||||
mQzssEpheValid(0) {}
|
mQzssEpheValid(0) {}
|
||||||
inline SystemStatusEphemeris(const SystemStatusPQWP4& nmea);
|
inline SystemStatusEphemeris(const SystemStatusPQWP4& nmea);
|
||||||
bool equals(const SystemStatusEphemeris& peer);
|
bool equals(const SystemStatusEphemeris& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWP5;
|
class SystemStatusPQWP5;
|
||||||
|
@ -349,7 +351,7 @@ public:
|
||||||
mNavicBadMask(0) {}
|
mNavicBadMask(0) {}
|
||||||
inline SystemStatusSvHealth(const SystemStatusPQWP5& nmea);
|
inline SystemStatusSvHealth(const SystemStatusPQWP5& nmea);
|
||||||
bool equals(const SystemStatusSvHealth& peer);
|
bool equals(const SystemStatusSvHealth& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWP6;
|
class SystemStatusPQWP6;
|
||||||
|
@ -361,7 +363,7 @@ public:
|
||||||
mFixInfoMask(0) {}
|
mFixInfoMask(0) {}
|
||||||
inline SystemStatusPdr(const SystemStatusPQWP6& nmea);
|
inline SystemStatusPdr(const SystemStatusPQWP6& nmea);
|
||||||
bool equals(const SystemStatusPdr& peer);
|
bool equals(const SystemStatusPdr& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWP7;
|
class SystemStatusPQWP7;
|
||||||
|
@ -385,7 +387,7 @@ public:
|
||||||
}
|
}
|
||||||
inline SystemStatusNavData(const SystemStatusPQWP7& nmea);
|
inline SystemStatusNavData(const SystemStatusPQWP7& nmea);
|
||||||
bool equals(const SystemStatusNavData& peer);
|
bool equals(const SystemStatusNavData& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SystemStatusPQWS1;
|
class SystemStatusPQWS1;
|
||||||
|
@ -399,7 +401,7 @@ public:
|
||||||
mHepeLimit(0) {}
|
mHepeLimit(0) {}
|
||||||
inline SystemStatusPositionFailure(const SystemStatusPQWS1& nmea);
|
inline SystemStatusPositionFailure(const SystemStatusPQWS1& nmea);
|
||||||
bool equals(const SystemStatusPositionFailure& peer);
|
bool equals(const SystemStatusPositionFailure& peer);
|
||||||
void dump(void);
|
void dump(void) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -710,7 +712,7 @@ public:
|
||||||
inline bool equals(const SystemStatusTac& peer) {
|
inline bool equals(const SystemStatusTac& peer) {
|
||||||
return (mValue == peer.mValue);
|
return (mValue == peer.mValue);
|
||||||
}
|
}
|
||||||
inline void dump(void) {
|
inline void dump(void) override {
|
||||||
LOC_LOGD("Tac: value=%s", mValue.c_str());
|
LOC_LOGD("Tac: value=%s", mValue.c_str());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -726,7 +728,7 @@ public:
|
||||||
inline bool equals(const SystemStatusMccMnc& peer) {
|
inline bool equals(const SystemStatusMccMnc& peer) {
|
||||||
return (mValue == peer.mValue);
|
return (mValue == peer.mValue);
|
||||||
}
|
}
|
||||||
inline void dump(void) {
|
inline void dump(void) override {
|
||||||
LOC_LOGD("TacMccMnc value=%s", mValue.c_str());
|
LOC_LOGD("TacMccMnc value=%s", mValue.c_str());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue