Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2095, Automatic suppression of flooding events #2109

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Fix formatting
jhnphm committed Jun 7, 2022
commit 7aa0ceb2bcc4fbf633389210abebaa061a1e6514
4 changes: 2 additions & 2 deletions modules/evs/fsw/src/cfe_evs_utils.c
Original file line number Diff line number Diff line change
@@ -366,10 +366,10 @@ bool EVS_CheckAndIncrementSquelchTokens(EVS_AppData_t *AppDataPtr)

if (AppDataPtr->SquelchTokens <= 0)
{
if(AppDataPtr->SquelchedCount < CFE_EVS_MAX_SQUELCHED_COUNT)
if (AppDataPtr->SquelchedCount < CFE_EVS_MAX_SQUELCH_COUNT)
{
AppDataPtr->SquelchedCount++;
}
}
NotSquelched = false;

/*
6 changes: 3 additions & 3 deletions modules/evs/ut-coverage/evs_UT.c
Original file line number Diff line number Diff line change
@@ -1884,8 +1884,8 @@ void Test_Squelching(void)
for (j = 0; j < sizeof(SendEventFuncs) / sizeof(SendEventFuncs[0]); j++)
{
UT_EVS_ResetSquelchCurrentContext();
EVS_GetCurrentContext(&AppDataPtr, NULL);
AppDataPtr->SquelchedCount = CFE_EVS_MAX_SQUELCH_COUNT-CFE_PLATFORM_EVS_MAX_APP_EVENT_BURST;
EVS_GetCurrentContext(&AppDataPtr, NULL);
AppDataPtr->SquelchedCount = CFE_EVS_MAX_SQUELCH_COUNT - CFE_PLATFORM_EVS_MAX_APP_EVENT_BURST;

SnapshotData.Count = 0;
/*
@@ -1956,7 +1956,7 @@ void Test_Squelching(void)
UtAssert_UINT32_EQ(SnapshotData.Count, CFE_PLATFORM_EVS_MAX_APP_EVENT_BURST + 4);
UtAssert_UINT32_EQ(CapturedTlm.Payload.PacketID.EventID, EVENT_ID);
UtAssert_UINT32_EQ(EVS_Retval, CFE_SUCCESS);
UtAssert_UINT32_EQ(AppDataPtr->SquelchedCount, CFE_EVS_MAX_SQUELCH_COUNT);
UtAssert_UINT32_EQ(AppDataPtr->SquelchedCount, CFE_EVS_MAX_SQUELCH_COUNT);
}

UT_EVS_DisableSquelch();