diff --git a/.github/workflows/codeql-build.yml b/.github/workflows/codeql-build.yml index 5d091ec..c614cab 100644 --- a/.github/workflows/codeql-build.yml +++ b/.github/workflows/codeql-build.yml @@ -3,12 +3,12 @@ name: "CodeQL Analysis" on: push: pull_request: - + jobs: codeql: name: Codeql uses: nasa/cFS/.github/workflows/codeql-reusable.yml@main - with: + with: component-path: apps/sch_lab prep: 'make prep; make -C build/tools/elf2cfetbl' make: 'make -C build/native/default_cpu1/apps/sch_lab' diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml index 2d73eeb..b9d1f11 100644 --- a/.github/workflows/format-check.yml +++ b/.github/workflows/format-check.yml @@ -9,4 +9,3 @@ jobs: format-check: name: Run format check uses: nasa/cFS/.github/workflows/format-check.yml@main - \ No newline at end of file diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 706eaae..c3e1ebd 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -9,4 +9,3 @@ jobs: static-analysis: name: Run cppcheck uses: nasa/cFS/.github/workflows/static-analysis.yml@main - \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c1c89f7..7b30b85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## Development Build: v2.5.0-rc4+dev71 +- Standardize naming of SCH_LAB functions/macros +- Call CFE_ES_ExitApp with RunStatus rather than internal status variable +- Convert int32 return codes and variables to CFE_Status_t +- Remove component-specific cFE header #includes +- See , , , and + ## Development Build: v2.5.0-rc4+dev61 - implement header file convention for SCH_LAB - See diff --git a/config/default_sch_lab_perfids.h b/config/default_sch_lab_perfids.h index 62ce922..fca02db 100644 --- a/config/default_sch_lab_perfids.h +++ b/config/default_sch_lab_perfids.h @@ -26,6 +26,6 @@ #ifndef SCH_LAB_PERFIDS_H #define SCH_LAB_PERFIDS_H -#define SCH_MAIN_TASK_PERF_ID 36 +#define SCH_LAB_MAIN_TASK_PERF_ID 36 #endif diff --git a/config/default_sch_lab_tbl.h b/config/default_sch_lab_tbl.h index 9c37b08..cbc77ee 100644 --- a/config/default_sch_lab_tbl.h +++ b/config/default_sch_lab_tbl.h @@ -43,6 +43,6 @@ * There is no extra encapsulation here, this header only * defines the default file name to use for the SCH table */ -#define SCH_TBL_DEFAULT_FILE "/cf/sch_lab_table.tbl" +#define SCH_LAB_TBL_DEFAULT_FILE "/cf/sch_lab_table.tbl" #endif diff --git a/fsw/src/sch_lab_app.c b/fsw/src/sch_lab_app.c index eee9119..2fe95c2 100644 --- a/fsw/src/sch_lab_app.c +++ b/fsw/src/sch_lab_app.c @@ -63,12 +63,12 @@ SCH_LAB_GlobalData_t SCH_LAB_Global; /* ** Local Function Prototypes */ -int32 SCH_LAB_AppInit(void); +CFE_Status_t SCH_LAB_AppInit(void); /* ** AppMain */ -void SCH_Lab_AppMain(void) +void SCH_LAB_AppMain(void) { int i; uint32 SCH_OneHzPktsRcvd = 0; @@ -78,7 +78,7 @@ void SCH_Lab_AppMain(void) SCH_LAB_StateEntry_t *LocalStateEntry; CFE_SB_Buffer_t * SBBufPtr; - CFE_ES_PerfLogEntry(SCH_MAIN_TASK_PERF_ID); + CFE_ES_PerfLogEntry(SCH_LAB_MAIN_TASK_PERF_ID); Status = SCH_LAB_AppInit(); if (Status != CFE_SUCCESS) @@ -90,7 +90,7 @@ void SCH_Lab_AppMain(void) /* Loop Forever */ while (CFE_ES_RunLoop(&RunStatus) == true) { - CFE_ES_PerfLogExit(SCH_MAIN_TASK_PERF_ID); + CFE_ES_PerfLogExit(SCH_LAB_MAIN_TASK_PERF_ID); /* Pend on timing sem */ OsStatus = OS_CountSemTake(SCH_LAB_Global.TimingSem); @@ -104,7 +104,7 @@ void SCH_Lab_AppMain(void) Status = CFE_STATUS_EXTERNAL_RESOURCE_FAIL; } - CFE_ES_PerfLogEntry(SCH_MAIN_TASK_PERF_ID); + CFE_ES_PerfLogEntry(SCH_LAB_MAIN_TASK_PERF_ID); if (Status == CFE_SUCCESS) { @@ -135,7 +135,7 @@ void SCH_Lab_AppMain(void) } /* end while */ - CFE_ES_ExitApp(Status); + CFE_ES_ExitApp(RunStatus); } void SCH_LAB_LocalTimerCallback(osal_id_t object_id, void *arg) @@ -148,10 +148,10 @@ void SCH_LAB_LocalTimerCallback(osal_id_t object_id, void *arg) /* Initialization */ /* */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -int32 SCH_LAB_AppInit(void) +CFE_Status_t SCH_LAB_AppInit(void) { int i, x; - int32 Status; + CFE_Status_t Status; int32 OsStatus; uint32 TimerPeriod; osal_id_t TimeBaseId = OS_OBJECT_ID_UNDEFINED; @@ -202,7 +202,7 @@ int32 SCH_LAB_AppInit(void) /* ** Loading Table */ - Status = CFE_TBL_Load(SCH_LAB_Global.TblHandle, CFE_TBL_SRC_FILE, SCH_TBL_DEFAULT_FILE); + Status = CFE_TBL_Load(SCH_LAB_Global.TblHandle, CFE_TBL_SRC_FILE, SCH_LAB_TBL_DEFAULT_FILE); if (Status != CFE_SUCCESS) { CFE_ES_WriteToSysLog("SCH_LAB: Error Loading Table ScheduleTable, RC = 0x%08lX\n", (unsigned long)Status); diff --git a/fsw/src/sch_lab_version.h b/fsw/src/sch_lab_version.h index 54a82f8..bdde44f 100644 --- a/fsw/src/sch_lab_version.h +++ b/fsw/src/sch_lab_version.h @@ -25,7 +25,7 @@ */ /* Development Build Macro Definitions */ -#define SCH_LAB_BUILD_NUMBER 61 /*!< Development Build: Number of commits since baseline */ +#define SCH_LAB_BUILD_NUMBER 71 /*!< Development Build: Number of commits since baseline */ #define SCH_LAB_BUILD_BASELINE \ "v2.5.0-rc4" /*!< Development Build: git tag that is the base for the current development */