Skip to content

Commit

Permalink
enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Jul 12, 2024
1 parent 9a68476 commit 7015c8b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions fsw/src/cf_cfdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ CFE_Status_t CF_CFDP_InitEngine(void)

if (ret == CFE_SUCCESS)
{
CF_AppData.engine.enabled = 1;
CF_AppData.engine.enabled = true;
}

return ret;
Expand Down Expand Up @@ -1794,7 +1794,7 @@ void CF_CFDP_DisableEngine(void)
static const CF_QueueIdx_t CLOSE_QUEUES[] = {CF_QueueIdx_RX, CF_QueueIdx_TXA, CF_QueueIdx_TXW};
CF_Channel_t * chan;

CF_AppData.engine.enabled = 0;
CF_AppData.engine.enabled = false;

for (i = 0; i < CF_NUM_CHANNELS; ++i)
{
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/cf_cfdp_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ typedef struct CF_Engine
CF_Chunk_t chunk_mem[CF_NUM_CHUNKS_ALL_CHANNELS];

uint32 outgoing_counter;
uint8 enabled;
bool enabled;
} CF_Engine_t;

#endif
4 changes: 2 additions & 2 deletions unit-test/cf_app_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void UT_UpdatedDefaultHandler_CFE_SB_ReceiveBuffer(void *UserObj, UT_EntryKey_t
void Test_CF_CheckTables_DoNotReleaseAddressBecauseEngineIsEnabled(void)
{
/* Arrange */
CF_AppData.engine.enabled = 1;
CF_AppData.engine.enabled = true;

/* Act */
CF_CheckTables();
Expand Down Expand Up @@ -694,4 +694,4 @@ void UtTest_Setup(void)
add_CF_Init_tests();

add_CF_AppMain_tests();
}
}
8 changes: 4 additions & 4 deletions unit-test/cf_cfdp_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ void Test_CF_CFDP_CycleTx(void)
/* need to set dequeue_enabled so it enters the actual logic */
UT_CFDP_SetupBasicTestState(UT_CF_Setup_TX, NULL, &chan, NULL, &txn, &config);
CF_AppData.hk.Payload.channel_hk[UT_CFDP_CHANNEL].q_size[0] = 10;
CF_AppData.engine.enabled = 1;
CF_AppData.engine.enabled = true;
config->chan[UT_CFDP_CHANNEL].dequeue_enabled = 1;

/* nominal call, w/chan->cur non-null */
Expand Down Expand Up @@ -1216,7 +1216,7 @@ void Test_CF_CFDP_ProcessPlaybackDirectory(void)
memset(&pb, 0, sizeof(pb));
memset(dirent, 0, sizeof(dirent));
UT_CFDP_SetupBasicTestState(UT_CF_Setup_NONE, NULL, &chan, &history, &txn, &config);
CF_AppData.engine.enabled = 1;
CF_AppData.engine.enabled = true;

/* diropen is true but num_ts is high so operations are restricted */
pb.busy = true;
Expand Down Expand Up @@ -1339,7 +1339,7 @@ void Test_CF_CFDP_CycleEngine(void)
UtAssert_VOIDCALL(CF_CFDP_CycleEngine());

/* enabled but frozen */
CF_AppData.engine.enabled = 1;
CF_AppData.engine.enabled = true;
CF_AppData.hk.Payload.channel_hk[UT_CFDP_CHANNEL].frozen = 1;
UtAssert_VOIDCALL(CF_CFDP_CycleEngine());

Expand Down Expand Up @@ -1510,7 +1510,7 @@ void Test_CF_CFDP_DisableEngine(void)
*/

/* nominal call */
CF_AppData.engine.enabled = 1;
CF_AppData.engine.enabled = true;
UtAssert_VOIDCALL(CF_CFDP_DisableEngine());
UtAssert_STUB_COUNT(CFE_SB_DeletePipe, CF_NUM_CHANNELS);
UtAssert_BOOL_FALSE(CF_AppData.engine.enabled);
Expand Down
10 changes: 5 additions & 5 deletions unit-test/cf_cmd_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -3562,7 +3562,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableInitSuccessAndIncrementCmdCounte

memset(&utbuf, 0, sizeof(utbuf));

CF_AppData.engine.enabled = 0; /* 0 is not enabled */
CF_AppData.engine.enabled = false;

UT_SetDefaultReturnValue(UT_KEY(CF_CFDP_InitEngine), forced_return_CF_CFDP_InitEngine);

Expand Down Expand Up @@ -3590,7 +3590,7 @@ void Test_CF_CmdEnableEngine_WithEngineNotEnableFailsInitSendEventAndIncrementEr

memset(&utbuf, 0, sizeof(utbuf));

CF_AppData.engine.enabled = 0; /* 0 is not enabled */
CF_AppData.engine.enabled = false;

UT_SetDefaultReturnValue(UT_KEY(CF_CFDP_InitEngine), forced_return_CF_CFDP_InitEngine);

Expand All @@ -3617,7 +3617,7 @@ void Test_CF_CmdEnableEngine_WithEngineEnableFailsSendEventAndIncrementErrCounte

memset(&utbuf, 0, sizeof(utbuf));

CF_AppData.engine.enabled = 1; /* 1 is enabled */
CF_AppData.engine.enabled = true;

CF_AppData.hk.Payload.counters.err = initial_hk_err_counter;

Expand Down Expand Up @@ -3648,7 +3648,7 @@ void Test_CF_CmdDisableEngine_SuccessWhenEngineEnabledAndIncrementCmdCounter(voi

memset(&utbuf, 0, sizeof(utbuf));

CF_AppData.engine.enabled = 1; /* 1 is enabled */
CF_AppData.engine.enabled = true;

CF_AppData.hk.Payload.counters.cmd = initial_hk_cmd_counter;

Expand All @@ -3672,7 +3672,7 @@ void Test_CF_CmdDisableEngine_WhenEngineDisabledAndIncrementErrCounterThenFail(v

memset(&utbuf, 0, sizeof(utbuf));

CF_AppData.engine.enabled = 0; /* 0 is not enabled */
CF_AppData.engine.enabled = false;

CF_AppData.hk.Payload.counters.err = initial_hk_err_counter;

Expand Down

0 comments on commit 7015c8b

Please sign in to comment.