diff --git a/fsw/src/cf_cfdp.c b/fsw/src/cf_cfdp.c index 55767104..b6a9a18a 100644 --- a/fsw/src/cf_cfdp.c +++ b/fsw/src/cf_cfdp.c @@ -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; @@ -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) { diff --git a/fsw/src/cf_cfdp_types.h b/fsw/src/cf_cfdp_types.h index a7da8a4c..7e2a2d72 100644 --- a/fsw/src/cf_cfdp_types.h +++ b/fsw/src/cf_cfdp_types.h @@ -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 diff --git a/unit-test/cf_app_tests.c b/unit-test/cf_app_tests.c index 6dc07dba..2a657aeb 100644 --- a/unit-test/cf_app_tests.c +++ b/unit-test/cf_app_tests.c @@ -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(); @@ -694,4 +694,4 @@ void UtTest_Setup(void) add_CF_Init_tests(); add_CF_AppMain_tests(); -} \ No newline at end of file +} diff --git a/unit-test/cf_cfdp_tests.c b/unit-test/cf_cfdp_tests.c index b9c3a5a7..b27442b8 100644 --- a/unit-test/cf_cfdp_tests.c +++ b/unit-test/cf_cfdp_tests.c @@ -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 */ @@ -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; @@ -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()); @@ -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); diff --git a/unit-test/cf_cmd_tests.c b/unit-test/cf_cmd_tests.c index a80ef370..44d796da 100644 --- a/unit-test/cf_cmd_tests.c +++ b/unit-test/cf_cmd_tests.c @@ -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); @@ -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); @@ -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; @@ -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; @@ -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;