reduce sus fdir events
This commit is contained in:
@ -17,11 +17,9 @@ class SusHandler : public DeviceHandlerBase {
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::SUS_HANDLER;
|
||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SUS_HANDLER;
|
||||
|
||||
//! [EXPORT] : [COMMENT] Detected invalid values, starting invalid message counting
|
||||
static constexpr Event TEMPERATURE_ALL_ONES_START =
|
||||
event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||
//! [EXPORT] : [COMMENT] Detected valid values again, resetting invalid message counter.
|
||||
//! P1: Invalid message counter.
|
||||
//! [EXPORT] : [COMMENT] Detected valid values for a prolonged time again, resetting all counters.
|
||||
//! P1: Number of periods with invalid messages.
|
||||
//! P2: Maximum invalid message counter.
|
||||
static constexpr Event TEMPERATURE_ALL_ONES_RECOVERY =
|
||||
event::makeEvent(SUBSYSTEM_ID, 1, severity::INFO);
|
||||
|
||||
@ -54,8 +52,13 @@ class SusHandler : public DeviceHandlerBase {
|
||||
susMax1227::SusDataset dataset;
|
||||
acs::SusRequest request{};
|
||||
uint8_t susIdx;
|
||||
|
||||
// After 1 minute, trigger the event for the invalid messages.
|
||||
Countdown invalidMsgCountdown = Countdown(60000);
|
||||
bool waitingForRecovery = true;
|
||||
uint32_t invalidMsgCounter = 0;
|
||||
uint32_t invalidMsgCounterMax = 0;
|
||||
uint32_t invalidMsgPeriodCounter = 0;
|
||||
|
||||
uint32_t transitionDelay = 1000;
|
||||
bool goToNormalMode = false;
|
||||
|
Reference in New Issue
Block a user