From 798c05bb45485940e3b77366b63b3b258a9fc943 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 13 May 2021 15:34:13 -0400 Subject: [PATCH 1/8] Fix #1505, accept "NULL" as entry point Recognize the special string "NULL" to indicate no entry point should be called for the library. Equivalent to leaving the field empty. --- modules/es/fsw/src/cfe_es_apps.c | 3 ++- modules/es/ut-coverage/es_UT.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/es/fsw/src/cfe_es_apps.c b/modules/es/fsw/src/cfe_es_apps.c index f5f10cdab..f40096e2b 100644 --- a/modules/es/fsw/src/cfe_es_apps.c +++ b/modules/es/fsw/src/cfe_es_apps.c @@ -450,7 +450,8 @@ int32 CFE_ES_LoadModule(CFE_ResourceId_t ParentResourceId, const char *ModuleNam /* * If the Load was OK, then lookup the address of the entry point */ - if (ReturnCode == CFE_SUCCESS && LoadParams->InitSymbolName[0] != 0) + if (ReturnCode == CFE_SUCCESS && LoadParams->InitSymbolName[0] != 0 && + strcmp(LoadParams->InitSymbolName, "NULL") != 0) { StatusCode = OS_ModuleSymbolLookup(ModuleId, &InitSymbolAddress, LoadParams->InitSymbolName); if (StatusCode != OS_SUCCESS) diff --git a/modules/es/ut-coverage/es_UT.c b/modules/es/ut-coverage/es_UT.c index 20231872c..ad08647dc 100644 --- a/modules/es/ut-coverage/es_UT.c +++ b/modules/es/ut-coverage/es_UT.c @@ -1848,6 +1848,23 @@ void TestLibs(void) Return = CFE_ES_LoadLibrary(&Id, "TST_LIB", &LoadParams); UtAssert_INT32_EQ(Return, CFE_STATUS_EXTERNAL_RESOURCE_FAIL); + /* + * Test shared library loading and initialization where the library + * entry point symbol is the special string "NULL". This should skip + * symbol lookup. + */ + ES_ResetUnitTest(); + ES_UT_SetupModuleLoadParams(&LoadParams, "nullep", "NULL"); + Return = CFE_ES_LoadLibrary(&Id, "TST_LIB1", &LoadParams); + UtAssert_INT32_EQ(Return, CFE_SUCCESS); + UtAssert_STUB_COUNT(OS_ModuleSymbolLookup, 0); /* should NOT have been called */ + + /* Likewise for a entry point where the string is empty */ + LoadParams.InitSymbolName[0] = 0; + Return = CFE_ES_LoadLibrary(&Id, "TST_LIB2", &LoadParams); + UtAssert_INT32_EQ(Return, CFE_SUCCESS); + UtAssert_STUB_COUNT(OS_ModuleSymbolLookup, 0); /* should NOT have been called */ + /* Test shared library loading and initialization where the library * initialization function fails and then must be cleaned up */ From 512958ed21764207793f5bcde3828c147b93d9b9 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Thu, 13 May 2021 16:00:50 -0400 Subject: [PATCH 2/8] Fix #1522, add printf format casts Use (int) with %d conversions for portability --- modules/cfe_testcase/src/es_task_test.c | 3 ++- modules/cfe_testcase/src/time_current_test.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/cfe_testcase/src/es_task_test.c b/modules/cfe_testcase/src/es_task_test.c index cfca4e61e..782b995d2 100644 --- a/modules/cfe_testcase/src/es_task_test.c +++ b/modules/cfe_testcase/src/es_task_test.c @@ -86,7 +86,8 @@ void TestCreateChild(void) OS_TaskDelay(500); - UtAssert_True(countCopy == count || countCopy == count + 1, "countCopy (%d) == count (%d)", countCopy, count); + UtAssert_True(countCopy == count || countCopy == count + 1, "countCopy (%d) == count (%d)", (int)countCopy, + (int)count); } void TestExitChild(void) diff --git a/modules/cfe_testcase/src/time_current_test.c b/modules/cfe_testcase/src/time_current_test.c index 05d2d66e7..e37ec7fad 100644 --- a/modules/cfe_testcase/src/time_current_test.c +++ b/modules/cfe_testcase/src/time_current_test.c @@ -86,7 +86,7 @@ void TestGetTime(void) OS_GetLocalTime(&end); CFE_TIME_Print(timeBuf1, Time); - UtPrintf("The current time is (%d) %s", Time.Seconds, timeBuf1); + UtPrintf("The current time is (%ld) %s", (long)Time.Seconds, timeBuf1); difference = OS_TimeSubtract(end, start); From a47a581ec5cf54842f6629ce461870378c51f375 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 18 May 2021 11:39:22 -0400 Subject: [PATCH 3/8] Fix #1538, add capability to generate multiple tables Adds a "install_custom.cmake" hook that can be put into a CPU-specific subdirectory under the "defs" directory, that can perform extra installation steps as required for the project/mission. Tweaks the "add_cfe_tables" function such that it can also be called from the install_custom.cmake script to generate additional/alternative table binary files for that CPU. The main update is that it uses the "APP_NAME" parameter to associate the table files with the app library, so the same set of include files can be used. This relies on the target-scope properties being used. Historically that string wasn't verified, it could have been any unique string, but now it should match the app if this is to work as expected. --- cmake/arch_build.cmake | 166 +++++++++++++++++++++---------------- cmake/generate_table.cmake | 1 + 2 files changed, 95 insertions(+), 72 deletions(-) diff --git a/cmake/arch_build.cmake b/cmake/arch_build.cmake index ce7513fc9..e8781da79 100644 --- a/cmake/arch_build.cmake +++ b/cmake/arch_build.cmake @@ -148,80 +148,100 @@ endfunction(add_cfe_app_dependency) # function(add_cfe_tables APP_NAME TBL_SRC_FILES) - # The table source must be compiled using the same "include_directories" - # as any other target, but it uses the "add_custom_command" so there is - # no automatic way to do this (at least in the older cmakes) - - # Create the intermediate table objects using the target compiler, - # then use "elf2cfetbl" to convert to a .tbl file - set(TBL_LIST) - foreach(TBL ${TBL_SRC_FILES} ${ARGN}) - - # Get name without extension (NAME_WE) and append to list of tables - get_filename_component(TBLWE ${TBL} NAME_WE) - - foreach(TGT ${APP_STATIC_TARGET_LIST} ${APP_DYNAMIC_TARGET_LIST}) - set(TABLE_DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/tables_${TGT}") - file(MAKE_DIRECTORY ${TABLE_DESTDIR}) - list(APPEND TBL_LIST "${TABLE_DESTDIR}/${TBLWE}.tbl") - - # Check if an override exists at the mission level (recommended practice) - # This allows a mission to implement a customized table without modifying - # the original - this also makes for easier merging/updating if needed. - if (EXISTS "${MISSION_DEFS}/tables/${TGT}_${TBLWE}.c") - set(TBL_SRC "${MISSION_DEFS}/tables/${TGT}_${TBLWE}.c") - elseif (EXISTS "${MISSION_SOURCE_DIR}/tables/${TGT}_${TBLWE}.c") - set(TBL_SRC "${MISSION_SOURCE_DIR}/tables/${TGT}_${TBLWE}.c") - elseif (EXISTS "${MISSION_DEFS}/tables/${TBLWE}.c") - set(TBL_SRC "${MISSION_DEFS}/tables/${TBLWE}.c") - elseif (EXISTS "${MISSION_SOURCE_DIR}/tables/${TBLWE}.c") - set(TBL_SRC "${MISSION_SOURCE_DIR}/tables/${TBLWE}.c") - elseif (EXISTS "${MISSION_DEFS}/${TGT}/tables/${TBLWE}.c") - set(TBL_SRC "${MISSION_DEFS}/${TGT}/tables/${TBLWE}.c") - elseif (IS_ABSOLUTE "${TBL}") - set(TBL_SRC "${TBL}") - else() - set(TBL_SRC "${CMAKE_CURRENT_SOURCE_DIR}/${TBL}") - endif() + if (TGTNAME) + set (TABLE_TGTLIST ${TGTNAME}) + else() + set (TABLE_TGTLIST ${TGTLIST_${APP_NAME}}) + endif() - if (NOT EXISTS "${TBL_SRC}") - message(FATAL_ERROR "ERROR: No source file for table ${TBLWE}") - else() - message("NOTE: Selected ${TBL_SRC} as source for ${TBLWE}") - endif() + # The first parameter should match the name of an app that was + # previously defined using "add_cfe_app". If target-scope properties + # are used for include directories and compile definitions, this is needed + # to compile tables with the same include path/definitions as the app has. + # However historically this could have been any string, which still works + # if directory-scope properties are used for includes, so this is not + # an error. + if (NOT TARGET ${APP_NAME}) + message("NOTE: \"${APP_NAME}\" passed to add_cfe_tables is not a previously-defined application target") + endif() + + # The table source must be compiled using the same "include_directories" + # as any other target, but it uses the "add_custom_command" so there is + # no automatic way to do this (at least in the older cmakes) + + # Create the intermediate table objects using the target compiler, + # then use "elf2cfetbl" to convert to a .tbl file + foreach(TBL ${TBL_SRC_FILES} ${ARGN}) + + # Get name without extension (NAME_WE) and append to list of tables + get_filename_component(TBLWE ${TBL} NAME_WE) + + foreach(TGT ${TABLE_TGTLIST}) + set(TABLE_LIBNAME "${TGT}_${APP_NAME}_${TBLWE}") + set(TABLE_DESTDIR "${CMAKE_CURRENT_BINARY_DIR}/${TABLE_LIBNAME}") + set(TABLE_BINARY "${TABLE_DESTDIR}/${TBLWE}.tbl") + file(MAKE_DIRECTORY ${TABLE_DESTDIR}) + + # Check if an override exists at the mission level (recommended practice) + # This allows a mission to implement a customized table without modifying + # the original - this also makes for easier merging/updating if needed. + if (EXISTS "${MISSION_DEFS}/tables/${TGT}_${TBLWE}.c") + set(TBL_SRC "${MISSION_DEFS}/tables/${TGT}_${TBLWE}.c") + elseif (EXISTS "${MISSION_SOURCE_DIR}/tables/${TGT}_${TBLWE}.c") + set(TBL_SRC "${MISSION_SOURCE_DIR}/tables/${TGT}_${TBLWE}.c") + elseif (EXISTS "${MISSION_DEFS}/${TGT}/tables/${TBLWE}.c") + set(TBL_SRC "${MISSION_DEFS}/${TGT}/tables/${TBLWE}.c") + elseif (EXISTS "${MISSION_DEFS}/tables/${TBLWE}.c") + set(TBL_SRC "${MISSION_DEFS}/tables/${TBLWE}.c") + elseif (EXISTS "${MISSION_SOURCE_DIR}/tables/${TBLWE}.c") + set(TBL_SRC "${MISSION_SOURCE_DIR}/tables/${TBLWE}.c") + elseif (IS_ABSOLUTE "${TBL}") + set(TBL_SRC "${TBL}") + else() + set(TBL_SRC "${CMAKE_CURRENT_SOURCE_DIR}/${TBL}") + endif() + + if (NOT EXISTS "${TBL_SRC}") + message(FATAL_ERROR "ERROR: No source file for table ${TBLWE}") + else() + message("NOTE: Selected ${TBL_SRC} as source for ${APP_NAME}.${TBLWE} on ${TGT}") + + # NOTE: On newer CMake versions this should become an OBJECT library which makes this simpler. + # On older versions one may not referece the TARGET_OBJECTS property from the custom command. + # As a workaround this is built into a static library, and then the desired object is extracted + # before passing to elf2cfetbl. It is roundabout but it works. + add_library(${TABLE_LIBNAME} STATIC ${TBL_SRC}) + target_link_libraries(${TABLE_LIBNAME} PRIVATE core_api) + if (TARGET ${APP_NAME}) + target_include_directories(${TABLE_LIBNAME} PRIVATE $) + target_compile_definitions(${TABLE_LIBNAME} PRIVATE $) + endif() + + # IMPORTANT: This rule assumes that the output filename of elf2cfetbl matches + # the input file name but with a different extension (.o -> .tbl) + # The actual output filename is embedded in the source file (.c), however + # this must match and if it does not the build will break. That's just the + # way it is, because NO make system supports changing rules based on the + # current content of a dependency (rightfully so). + add_custom_command( + OUTPUT ${TABLE_BINARY} + COMMAND ${CMAKE_COMMAND} + -DCMAKE_AR=${CMAKE_AR} + -DTBLTOOL=${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl + -DLIB=$ + -P ${CFE_SOURCE_DIR}/cmake/generate_table.cmake + DEPENDS ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TABLE_LIBNAME} + WORKING_DIRECTORY ${TABLE_DESTDIR} + ) + + # Add a custom target to invoke the elf2cfetbl tool to generate the tbl file, + # and install that binary file to the staging area. + add_custom_target(${TABLE_LIBNAME}_tbl ALL DEPENDS ${TABLE_BINARY}) + install(FILES ${TABLE_BINARY} DESTINATION ${TGT}/${INSTALL_SUBDIR}) + endif() + endforeach() + endforeach() - # NOTE: On newer CMake versions this should become an OBJECT library which makes this simpler. - # On older versions one may not referece the TARGET_OBJECTS property from the custom command. - # As a workaround this is built into a static library, and then the desired object is extracted - # before passing to elf2cfetbl. It is roundabout but it works. - add_library(${TGT}_${TBLWE}-obj STATIC ${TBL_SRC}) - target_link_libraries(${TGT}_${TBLWE}-obj PRIVATE core_api) - - # IMPORTANT: This rule assumes that the output filename of elf2cfetbl matches - # the input file name but with a different extension (.o -> .tbl) - # The actual output filename is embedded in the source file (.c), however - # this must match and if it does not the build will break. That's just the - # way it is, because NO make system supports changing rules based on the - # current content of a dependency (rightfully so). - add_custom_command( - OUTPUT "${TABLE_DESTDIR}/${TBLWE}.tbl" - COMMAND ${CMAKE_COMMAND} - -DCMAKE_AR=${CMAKE_AR} - -DTBLTOOL=${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl - -DLIB=$ - -P ${CFE_SOURCE_DIR}/cmake/generate_table.cmake - DEPENDS ${MISSION_BINARY_DIR}/tools/elf2cfetbl/elf2cfetbl ${TGT}_${TBLWE}-obj - WORKING_DIRECTORY ${TABLE_DESTDIR} - ) - # Create the install targets for all the tables - install(FILES ${TABLE_DESTDIR}/${TBLWE}.tbl DESTINATION ${TGT}/${INSTALL_SUBDIR}) - endforeach(TGT ${APP_STATIC_TARGET_LIST} ${APP_DYNAMIC_TARGET_LIST}) - - - endforeach(TBL ${TBL_SRC_FILES} ${ARGN}) - - # Make a custom target that depends on all the tables - add_custom_target(${APP_NAME}_tables ALL DEPENDS ${TBL_LIST}) endfunction(add_cfe_tables) @@ -689,6 +709,8 @@ function(process_arch SYSVAR) # Target to generate the actual executable file add_subdirectory(cmake/target ${TGTNAME}) + include(${MISSION_DEFS}/${TGTNAME}/install_custom.cmake OPTIONAL) + foreach(INSTFILE ${${TGTNAME}_FILELIST}) if(EXISTS ${MISSION_DEFS}/${TGTNAME}/${INSTFILE}) set(FILESRC ${MISSION_DEFS}/${TGTNAME}/${INSTFILE}) diff --git a/cmake/generate_table.cmake b/cmake/generate_table.cmake index 521fd1a1a..b817ce6da 100644 --- a/cmake/generate_table.cmake +++ b/cmake/generate_table.cmake @@ -38,6 +38,7 @@ if (NOT RESULT EQUAL 0) endif() # Finally invoke the table tool (elf2cfetbl) on the object +message("Executing Process: ${TBLTOOL} ${OBJNAME}") execute_process(COMMAND ${TBLTOOL} "${OBJNAME}" RESULT_VARIABLE RESULT ) From 7fa73a59d2887a579a6617f06ce65ae320ff62f0 Mon Sep 17 00:00:00 2001 From: Zachary Gonzalez Date: Sun, 16 May 2021 18:29:53 -0500 Subject: [PATCH 4/8] Partial #1474, changing return type from int32 to CFE_Status_t Changing the implementation return types to CFE_Status_t to match the function prototypes. --- modules/core_api/fsw/inc/cfe_resourceid.h | 8 ++-- modules/es/fsw/src/cfe_es_api.c | 58 +++++++++++------------ modules/evs/fsw/src/cfe_evs.c | 12 ++--- modules/fs/fsw/src/cfe_fs_api.c | 8 ++-- modules/msg/fsw/src/cfe_msg_init.c | 2 +- modules/sb/fsw/src/cfe_sb_api.c | 28 +++++------ modules/tbl/fsw/src/cfe_tbl_api.c | 30 ++++++------ modules/time/fsw/src/cfe_time_api.c | 4 +- 8 files changed, 75 insertions(+), 75 deletions(-) diff --git a/modules/core_api/fsw/inc/cfe_resourceid.h b/modules/core_api/fsw/inc/cfe_resourceid.h index 428db8b68..597d2e297 100644 --- a/modules/core_api/fsw/inc/cfe_resourceid.h +++ b/modules/core_api/fsw/inc/cfe_resourceid.h @@ -172,7 +172,7 @@ static inline bool CFE_ResourceId_IsDefined(CFE_ResourceId_t id) * @param[in] ResourceId the resource ID to decode * @returns The base value associated with that ID */ -extern uint32 CFE_ResourceId_GetBase(CFE_ResourceId_t ResourceId); +uint32 CFE_ResourceId_GetBase(CFE_ResourceId_t ResourceId); /** * @brief Get the Serial Number (sequential ID) from a resource ID value @@ -183,7 +183,7 @@ extern uint32 CFE_ResourceId_GetBase(CFE_ResourceId_t ResourceId); * @param[in] ResourceId the resource ID to decode * @returns The serial number associated with that ID */ -extern uint32 CFE_ResourceId_GetSerial(CFE_ResourceId_t ResourceId); +uint32 CFE_ResourceId_GetSerial(CFE_ResourceId_t ResourceId); /** * @brief Locate the next resource ID which does not map to an in-use table entry @@ -202,7 +202,7 @@ extern uint32 CFE_ResourceId_GetSerial(CFE_ResourceId_t ResourceId); * @retval #CFE_RESOURCEID_UNDEFINED if no open slots. * */ -extern CFE_ResourceId_t CFE_ResourceId_FindNext(CFE_ResourceId_t StartId, uint32 TableSize, +CFE_ResourceId_t CFE_ResourceId_FindNext(CFE_ResourceId_t StartId, uint32 TableSize, bool (*CheckFunc)(CFE_ResourceId_t)); /** @@ -214,6 +214,6 @@ extern CFE_ResourceId_t CFE_ResourceId_FindNext(CFE_ResourceId_t StartId, uint32 * @param[out] Idx The output index * @returns Status code, CFE_SUCCESS if successful. */ -extern int32 CFE_ResourceId_ToIndex(CFE_ResourceId_t Id, uint32 BaseValue, uint32 TableSize, uint32 *Idx); +int32 CFE_ResourceId_ToIndex(CFE_ResourceId_t Id, uint32 BaseValue, uint32 TableSize, uint32 *Idx); #endif /* CFE_RESOURCEID_H */ diff --git a/modules/es/fsw/src/cfe_es_api.c b/modules/es/fsw/src/cfe_es_api.c index 6c8ce250a..3d99b712c 100644 --- a/modules/es/fsw/src/cfe_es_api.c +++ b/modules/es/fsw/src/cfe_es_api.c @@ -68,7 +68,7 @@ int32 CFE_ES_GetResetType(uint32 *ResetSubtypePtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_ResetCFE(uint32 ResetType) +CFE_Status_t CFE_ES_ResetCFE(uint32 ResetType) { int32 ReturnCode; @@ -165,7 +165,7 @@ int32 CFE_ES_ResetCFE(uint32 ResetType) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_RestartApp(CFE_ES_AppId_t AppID) +CFE_Status_t CFE_ES_RestartApp(CFE_ES_AppId_t AppID) { int32 ReturnCode = CFE_SUCCESS; os_fstat_t FileStatus; @@ -234,7 +234,7 @@ int32 CFE_ES_RestartApp(CFE_ES_AppId_t AppID) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_ReloadApp(CFE_ES_AppId_t AppID, const char *AppFileName) +CFE_Status_t CFE_ES_ReloadApp(CFE_ES_AppId_t AppID, const char *AppFileName) { int32 ReturnCode = CFE_SUCCESS; os_fstat_t FileStatus; @@ -297,7 +297,7 @@ int32 CFE_ES_ReloadApp(CFE_ES_AppId_t AppID, const char *AppFileName) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_DeleteApp(CFE_ES_AppId_t AppID) +CFE_Status_t CFE_ES_DeleteApp(CFE_ES_AppId_t AppID) { int32 ReturnCode = CFE_SUCCESS; CFE_ES_AppRecord_t *AppRecPtr = CFE_ES_LocateAppRecordByID(AppID); @@ -568,7 +568,7 @@ bool CFE_ES_RunLoop(uint32 *RunStatus) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_WaitForSystemState(uint32 MinSystemState, uint32 TimeOutMilliseconds) +CFE_Status_t CFE_ES_WaitForSystemState(uint32 MinSystemState, uint32 TimeOutMilliseconds) { int32 Status = CFE_SUCCESS; CFE_ES_AppRecord_t *AppRecPtr; @@ -685,7 +685,7 @@ void CFE_ES_WaitForStartupSync(uint32 TimeOutMilliseconds) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetAppIDByName(CFE_ES_AppId_t *AppIdPtr, const char *AppName) +CFE_Status_t CFE_ES_GetAppIDByName(CFE_ES_AppId_t *AppIdPtr, const char *AppName) { CFE_ES_AppRecord_t *AppRecPtr; int32 Result; @@ -726,7 +726,7 @@ int32 CFE_ES_GetAppIDByName(CFE_ES_AppId_t *AppIdPtr, const char *AppName) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetLibIDByName(CFE_ES_LibId_t *LibIdPtr, const char *LibName) +CFE_Status_t CFE_ES_GetLibIDByName(CFE_ES_LibId_t *LibIdPtr, const char *LibName) { CFE_ES_LibRecord_t *LibRecPtr; int32 Result; @@ -802,7 +802,7 @@ CFE_Status_t CFE_ES_GetTaskIDByName(CFE_ES_TaskId_t *TaskIdPtr, const char *Task * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetAppID(CFE_ES_AppId_t *AppIdPtr) +CFE_Status_t CFE_ES_GetAppID(CFE_ES_AppId_t *AppIdPtr) { CFE_ES_AppRecord_t *AppRecPtr; int32 Result; @@ -840,7 +840,7 @@ int32 CFE_ES_GetAppID(CFE_ES_AppId_t *AppIdPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetTaskID(CFE_ES_TaskId_t *TaskIdPtr) +CFE_Status_t CFE_ES_GetTaskID(CFE_ES_TaskId_t *TaskIdPtr) { int32 Result; CFE_ES_TaskRecord_t *TaskRecPtr; @@ -874,7 +874,7 @@ int32 CFE_ES_GetTaskID(CFE_ES_TaskId_t *TaskIdPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetAppName(char *AppName, CFE_ES_AppId_t AppId, size_t BufferLength) +CFE_Status_t CFE_ES_GetAppName(char *AppName, CFE_ES_AppId_t AppId, size_t BufferLength) { int32 Result; CFE_ES_AppRecord_t *AppRecPtr; @@ -920,7 +920,7 @@ int32 CFE_ES_GetAppName(char *AppName, CFE_ES_AppId_t AppId, size_t BufferLength * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetLibName(char *LibName, CFE_ES_LibId_t LibId, size_t BufferLength) +CFE_Status_t CFE_ES_GetLibName(char *LibName, CFE_ES_LibId_t LibId, size_t BufferLength) { int32 Result; CFE_ES_LibRecord_t *LibRecPtr; @@ -966,7 +966,7 @@ int32 CFE_ES_GetLibName(char *LibName, CFE_ES_LibId_t LibId, size_t BufferLength * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetTaskName(char *TaskName, CFE_ES_TaskId_t TaskId, size_t BufferLength) +CFE_Status_t CFE_ES_GetTaskName(char *TaskName, CFE_ES_TaskId_t TaskId, size_t BufferLength) { int32 Result; osal_id_t OsalId; @@ -1003,7 +1003,7 @@ int32 CFE_ES_GetTaskName(char *TaskName, CFE_ES_TaskId_t TaskId, size_t BufferLe * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetAppInfo(CFE_ES_AppInfo_t *AppInfo, CFE_ES_AppId_t AppId) +CFE_Status_t CFE_ES_GetAppInfo(CFE_ES_AppInfo_t *AppInfo, CFE_ES_AppId_t AppId) { CFE_ES_AppRecord_t * AppRecPtr; CFE_ES_TaskRecord_t *TaskRecPtr; @@ -1197,7 +1197,7 @@ int32 CFE_ES_GetModuleInfo(CFE_ES_AppInfo_t *ModuleInfo, CFE_ResourceId_t Resour * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetTaskInfo(CFE_ES_TaskInfo_t *TaskInfo, CFE_ES_TaskId_t TaskId) +CFE_Status_t CFE_ES_GetTaskInfo(CFE_ES_TaskInfo_t *TaskInfo, CFE_ES_TaskId_t TaskId) { CFE_ES_TaskRecord_t *TaskRecPtr; CFE_ES_AppRecord_t * AppRecPtr; @@ -1273,7 +1273,7 @@ int32 CFE_ES_GetTaskInfo(CFE_ES_TaskInfo_t *TaskInfo, CFE_ES_TaskId_t TaskId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_CreateChildTask(CFE_ES_TaskId_t *TaskIdPtr, const char *TaskName, +CFE_Status_t CFE_ES_CreateChildTask(CFE_ES_TaskId_t *TaskIdPtr, const char *TaskName, CFE_ES_ChildTaskMainFuncPtr_t FunctionPtr, CFE_ES_StackPointer_t StackPtr, size_t StackSize, CFE_ES_TaskPriority_Atom_t Priority, uint32 Flags) { @@ -1403,7 +1403,7 @@ void CFE_ES_IncrementTaskCounter(void) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_DeleteChildTask(CFE_ES_TaskId_t TaskId) +CFE_Status_t CFE_ES_DeleteChildTask(CFE_ES_TaskId_t TaskId) { CFE_ES_TaskRecord_t *TaskRecPtr; CFE_ES_AppRecord_t * AppRecPtr; @@ -1578,7 +1578,7 @@ void CFE_ES_ExitChildTask(void) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_WriteToSysLog(const char *SpecStringPtr, ...) +CFE_Status_t CFE_ES_WriteToSysLog(const char *SpecStringPtr, ...) { char TmpString[CFE_ES_MAX_SYSLOG_MSG_SIZE]; int32 ReturnCode; @@ -1693,7 +1693,7 @@ uint32 CFE_ES_CalculateCRC(const void *DataPtr, size_t DataLength, uint32 InputC * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *CDSHandlePtr, size_t BlockSize, const char *Name) +CFE_Status_t CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *CDSHandlePtr, size_t BlockSize, const char *Name) { int32 Status; size_t NameLen; @@ -1862,7 +1862,7 @@ CFE_Status_t CFE_ES_GetCDSBlockName(char *BlockName, CFE_ES_CDSHandle_t BlockId, * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_CopyToCDS(CFE_ES_CDSHandle_t Handle, void *DataToCopy) +CFE_Status_t CFE_ES_CopyToCDS(CFE_ES_CDSHandle_t Handle, void *DataToCopy) { if (DataToCopy == NULL) { @@ -1880,7 +1880,7 @@ int32 CFE_ES_CopyToCDS(CFE_ES_CDSHandle_t Handle, void *DataToCopy) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_RestoreFromCDS(void *RestoreToMemory, CFE_ES_CDSHandle_t Handle) +CFE_Status_t CFE_ES_RestoreFromCDS(void *RestoreToMemory, CFE_ES_CDSHandle_t Handle) { if (RestoreToMemory == NULL) { @@ -1898,7 +1898,7 @@ int32 CFE_ES_RestoreFromCDS(void *RestoreToMemory, CFE_ES_CDSHandle_t Handle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_RegisterGenCounter(CFE_ES_CounterId_t *CounterIdPtr, const char *CounterName) +CFE_Status_t CFE_ES_RegisterGenCounter(CFE_ES_CounterId_t *CounterIdPtr, const char *CounterName) { CFE_ES_GenCounterRecord_t *CountRecPtr; CFE_ResourceId_t PendingResourceId; @@ -1963,7 +1963,7 @@ int32 CFE_ES_RegisterGenCounter(CFE_ES_CounterId_t *CounterIdPtr, const char *Co * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_DeleteGenCounter(CFE_ES_CounterId_t CounterId) +CFE_Status_t CFE_ES_DeleteGenCounter(CFE_ES_CounterId_t CounterId) { CFE_ES_GenCounterRecord_t *CountRecPtr; int32 Status = CFE_ES_BAD_ARGUMENT; @@ -1992,7 +1992,7 @@ int32 CFE_ES_DeleteGenCounter(CFE_ES_CounterId_t CounterId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_IncrementGenCounter(CFE_ES_CounterId_t CounterId) +CFE_Status_t CFE_ES_IncrementGenCounter(CFE_ES_CounterId_t CounterId) { int32 Status = CFE_ES_BAD_ARGUMENT; CFE_ES_GenCounterRecord_t *CountRecPtr; @@ -2014,7 +2014,7 @@ int32 CFE_ES_IncrementGenCounter(CFE_ES_CounterId_t CounterId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_SetGenCount(CFE_ES_CounterId_t CounterId, uint32 Count) +CFE_Status_t CFE_ES_SetGenCount(CFE_ES_CounterId_t CounterId, uint32 Count) { int32 Status = CFE_ES_BAD_ARGUMENT; CFE_ES_GenCounterRecord_t *CountRecPtr; @@ -2036,7 +2036,7 @@ int32 CFE_ES_SetGenCount(CFE_ES_CounterId_t CounterId, uint32 Count) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetGenCount(CFE_ES_CounterId_t CounterId, uint32 *Count) +CFE_Status_t CFE_ES_GetGenCount(CFE_ES_CounterId_t CounterId, uint32 *Count) { int32 Status = CFE_ES_BAD_ARGUMENT; CFE_ES_GenCounterRecord_t *CountRecPtr; @@ -2058,7 +2058,7 @@ int32 CFE_ES_GetGenCount(CFE_ES_CounterId_t CounterId, uint32 *Count) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetGenCounterIDByName(CFE_ES_CounterId_t *CounterIdPtr, const char *CounterName) +CFE_Status_t CFE_ES_GetGenCounterIDByName(CFE_ES_CounterId_t *CounterIdPtr, const char *CounterName) { CFE_ES_GenCounterRecord_t *CounterRecPtr; int32 Result; @@ -2141,7 +2141,7 @@ CFE_Status_t CFE_ES_GetGenCounterName(char *CounterName, CFE_ES_CounterId_t Coun * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_AppID_ToIndex(CFE_ES_AppId_t AppID, uint32 *Idx) +CFE_Status_t CFE_ES_AppID_ToIndex(CFE_ES_AppId_t AppID, uint32 *Idx) { return CFE_ResourceId_ToIndex(CFE_RESOURCEID_UNWRAP(AppID), CFE_ES_APPID_BASE, CFE_PLATFORM_ES_MAX_APPLICATIONS, Idx); @@ -2168,7 +2168,7 @@ int32 CFE_ES_LibID_ToIndex(CFE_ES_LibId_t LibId, uint32 *Idx) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_TaskID_ToIndex(CFE_ES_TaskId_t TaskID, uint32 *Idx) +CFE_Status_t CFE_ES_TaskID_ToIndex(CFE_ES_TaskId_t TaskID, uint32 *Idx) { osal_id_t OsalID; osal_index_t OsalIndex; @@ -2197,7 +2197,7 @@ int32 CFE_ES_TaskID_ToIndex(CFE_ES_TaskId_t TaskID, uint32 *Idx) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_CounterID_ToIndex(CFE_ES_CounterId_t CounterId, uint32 *Idx) +CFE_Status_t CFE_ES_CounterID_ToIndex(CFE_ES_CounterId_t CounterId, uint32 *Idx) { return CFE_ResourceId_ToIndex(CFE_RESOURCEID_UNWRAP(CounterId), CFE_ES_COUNTID_BASE, CFE_PLATFORM_ES_MAX_GEN_COUNTERS, Idx); diff --git a/modules/evs/fsw/src/cfe_evs.c b/modules/evs/fsw/src/cfe_evs.c index 62513f4ee..a8844fee3 100644 --- a/modules/evs/fsw/src/cfe_evs.c +++ b/modules/evs/fsw/src/cfe_evs.c @@ -43,7 +43,7 @@ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_EVS_Register(const void *Filters, uint16 NumEventFilters, uint16 FilterScheme) +CFE_Status_t CFE_EVS_Register(const void *Filters, uint16 NumEventFilters, uint16 FilterScheme) { uint16 FilterLimit; uint16 i; @@ -121,7 +121,7 @@ int32 CFE_EVS_Register(const void *Filters, uint16 NumEventFilters, uint16 Filte * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_EVS_Unregister(void) +CFE_Status_t CFE_EVS_Unregister(void) { int32 Status; CFE_ES_AppId_t AppID; @@ -145,7 +145,7 @@ int32 CFE_EVS_Unregister(void) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_EVS_SendEvent(uint16 EventID, uint16 EventType, const char *Spec, ...) +CFE_Status_t CFE_EVS_SendEvent(uint16 EventID, uint16 EventType, const char *Spec, ...) { int32 Status; CFE_ES_AppId_t AppID; @@ -190,7 +190,7 @@ int32 CFE_EVS_SendEvent(uint16 EventID, uint16 EventType, const char *Spec, ...) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_EVS_SendEventWithAppID(uint16 EventID, uint16 EventType, CFE_ES_AppId_t AppID, const char *Spec, ...) +CFE_Status_t CFE_EVS_SendEventWithAppID(uint16 EventID, uint16 EventType, CFE_ES_AppId_t AppID, const char *Spec, ...) { int32 Status = CFE_SUCCESS; CFE_TIME_SysTime_t Time; @@ -234,7 +234,7 @@ int32 CFE_EVS_SendEventWithAppID(uint16 EventID, uint16 EventType, CFE_ES_AppId_ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_EVS_SendTimedEvent(CFE_TIME_SysTime_t Time, uint16 EventID, uint16 EventType, const char *Spec, ...) +CFE_Status_t CFE_EVS_SendTimedEvent(CFE_TIME_SysTime_t Time, uint16 EventID, uint16 EventType, const char *Spec, ...) { int32 Status; CFE_ES_AppId_t AppID; @@ -275,7 +275,7 @@ int32 CFE_EVS_SendTimedEvent(CFE_TIME_SysTime_t Time, uint16 EventID, uint16 Eve * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_EVS_ResetFilter(int16 EventID) +CFE_Status_t CFE_EVS_ResetFilter(int16 EventID) { int32 Status; EVS_BinFilter_t *FilterPtr = NULL; diff --git a/modules/fs/fsw/src/cfe_fs_api.c b/modules/fs/fsw/src/cfe_fs_api.c index a63262fbb..e077bc3ad 100644 --- a/modules/fs/fsw/src/cfe_fs_api.c +++ b/modules/fs/fsw/src/cfe_fs_api.c @@ -127,7 +127,7 @@ const char *CFE_FS_GetDefaultExtension(CFE_FS_FileCategory_t FileCategory) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_FS_ReadHeader(CFE_FS_Header_t *Hdr, osal_id_t FileDes) +CFE_Status_t CFE_FS_ReadHeader(CFE_FS_Header_t *Hdr, osal_id_t FileDes) { int32 Result; int32 EndianCheck = 0x01020304; @@ -191,7 +191,7 @@ void CFE_FS_InitHeader(CFE_FS_Header_t *Hdr, const char *Description, uint32 Sub * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_FS_WriteHeader(osal_id_t FileDes, CFE_FS_Header_t *Hdr) +CFE_Status_t CFE_FS_WriteHeader(osal_id_t FileDes, CFE_FS_Header_t *Hdr) { CFE_TIME_SysTime_t Time; int32 Result; @@ -269,7 +269,7 @@ int32 CFE_FS_WriteHeader(osal_id_t FileDes, CFE_FS_Header_t *Hdr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_FS_SetTimestamp(osal_id_t FileDes, CFE_TIME_SysTime_t NewTimestamp) +CFE_Status_t CFE_FS_SetTimestamp(osal_id_t FileDes, CFE_TIME_SysTime_t NewTimestamp) { int32 Result; CFE_FS_Header_t TempHdr; @@ -601,7 +601,7 @@ int32 CFE_FS_ParseInputFileName(char *OutputBuffer, const char *InputName, size_ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_FS_ExtractFilenameFromPath(const char *OriginalPath, char *FileNameOnly) +CFE_Status_t CFE_FS_ExtractFilenameFromPath(const char *OriginalPath, char *FileNameOnly) { uint32 i, j; int StringLength; diff --git a/modules/msg/fsw/src/cfe_msg_init.c b/modules/msg/fsw/src/cfe_msg_init.c index 8612bbe58..091947ff6 100644 --- a/modules/msg/fsw/src/cfe_msg_init.c +++ b/modules/msg/fsw/src/cfe_msg_init.c @@ -34,7 +34,7 @@ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_Init(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId, CFE_MSG_Size_t Size) +CFE_Status_t CFE_MSG_Init(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId, CFE_MSG_Size_t Size) { int32 status; diff --git a/modules/sb/fsw/src/cfe_sb_api.c b/modules/sb/fsw/src/cfe_sb_api.c index d94fead0a..11ff5ece6 100644 --- a/modules/sb/fsw/src/cfe_sb_api.c +++ b/modules/sb/fsw/src/cfe_sb_api.c @@ -98,7 +98,7 @@ CFE_Status_t CFE_SB_PipeId_ToIndex(CFE_SB_PipeId_t PipeID, uint32 *Idx) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr, uint16 Depth, const char *PipeName) +CFE_Status_t CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr, uint16 Depth, const char *PipeName) { CFE_ES_AppId_t AppId; CFE_ES_TaskId_t TskId; @@ -283,7 +283,7 @@ int32 CFE_SB_CreatePipe(CFE_SB_PipeId_t *PipeIdPtr, uint16 Depth, const char *Pi * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_DeletePipe(CFE_SB_PipeId_t PipeId) +CFE_Status_t CFE_SB_DeletePipe(CFE_SB_PipeId_t PipeId) { CFE_ES_AppId_t CallerId; int32 Status = 0; @@ -494,7 +494,7 @@ int32 CFE_SB_DeletePipeFull(CFE_SB_PipeId_t PipeId, CFE_ES_AppId_t AppId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 Opts) +CFE_Stauts_t CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 Opts) { CFE_SB_PipeD_t *PipeDscPtr; CFE_ES_AppId_t AppID; @@ -583,7 +583,7 @@ int32 CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 Opts) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptsPtr) +CFE_Status_t CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptsPtr) { int32 Status; CFE_ES_TaskId_t TskId; @@ -660,7 +660,7 @@ int32 CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptsPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_GetPipeName(char *PipeNameBuf, size_t PipeNameSize, CFE_SB_PipeId_t PipeId) +CFE_Status_t CFE_SB_GetPipeName(char *PipeNameBuf, size_t PipeNameSize, CFE_SB_PipeId_t PipeId) { int32 Status; CFE_ES_TaskId_t TskId; @@ -754,7 +754,7 @@ int32 CFE_SB_GetPipeName(char *PipeNameBuf, size_t PipeNameSize, CFE_SB_PipeId_t * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_GetPipeIdByName(CFE_SB_PipeId_t *PipeIdPtr, const char *PipeName) +CFE_Status_t CFE_SB_GetPipeIdByName(CFE_SB_PipeId_t *PipeIdPtr, const char *PipeName) { int32 Status; CFE_ES_TaskId_t TskId; @@ -859,7 +859,7 @@ int32 CFE_SB_GetPipeIdByName(CFE_SB_PipeId_t *PipeIdPtr, const char *PipeName) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_SubscribeEx(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, CFE_SB_Qos_t Quality, uint16 MsgLim) +CFE_Status_t CFE_SB_SubscribeEx(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, CFE_SB_Qos_t Quality, uint16 MsgLim) { return CFE_SB_SubscribeFull(MsgId, PipeId, Quality, MsgLim, (uint8)CFE_SB_MSG_GLOBAL); } @@ -872,7 +872,7 @@ int32 CFE_SB_SubscribeEx(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, CFE_SB_Qo * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_SubscribeLocal(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, uint16 MsgLim) +CFE_Status_t CFE_SB_SubscribeLocal(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, uint16 MsgLim) { return CFE_SB_SubscribeFull(MsgId, PipeId, CFE_SB_DEFAULT_QOS, MsgLim, (uint8)CFE_SB_MSG_LOCAL); } @@ -885,7 +885,7 @@ int32 CFE_SB_SubscribeLocal(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, uint16 * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_Subscribe(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) +CFE_Status_t CFE_SB_Subscribe(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) { return CFE_SB_SubscribeFull(MsgId, PipeId, CFE_SB_DEFAULT_QOS, (uint16)CFE_PLATFORM_SB_DEFAULT_MSG_LIMIT, (uint8)CFE_SB_MSG_GLOBAL); @@ -1140,7 +1140,7 @@ int32 CFE_SB_SubscribeFull(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, CFE_SB_ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_Unsubscribe(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) +CFE_Status_t CFE_SB_Unsubscribe(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) { CFE_ES_AppId_t CallerId; int32 Status = 0; @@ -1161,7 +1161,7 @@ int32 CFE_SB_Unsubscribe(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_UnsubscribeLocal(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) +CFE_Status_t CFE_SB_UnsubscribeLocal(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId) { CFE_ES_AppId_t CallerId; int32 Status = 0; @@ -1323,7 +1323,7 @@ int32 CFE_SB_UnsubscribeFull(CFE_SB_MsgId_t MsgId, CFE_SB_PipeId_t PipeId, uint8 * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_TransmitMsg(CFE_MSG_Message_t *MsgPtr, bool IncrementSequenceCount) +CFE_Status_t CFE_SB_TransmitMsg(CFE_MSG_Message_t *MsgPtr, bool IncrementSequenceCount) { int32 Status; CFE_MSG_Size_t Size = 0; @@ -1772,7 +1772,7 @@ void CFE_SB_BroadcastBufferToRoute(CFE_SB_BufferD_t *BufDscPtr, CFE_SBR_RouteId_ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_ReceiveBuffer(CFE_SB_Buffer_t **BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut) +CFE_Status_t CFE_SB_ReceiveBuffer(CFE_SB_Buffer_t **BufPtr, CFE_SB_PipeId_t PipeId, int32 TimeOut) { int32 Status; int32 RcvStatus; @@ -2157,7 +2157,7 @@ CFE_Status_t CFE_SB_ReleaseMessageBuffer(CFE_SB_Buffer_t *BufPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_SB_TransmitBuffer(CFE_SB_Buffer_t *BufPtr, bool IncrementSequenceCount) +CFE_Status_t CFE_SB_TransmitBuffer(CFE_SB_Buffer_t *BufPtr, bool IncrementSequenceCount) { int32 Status; CFE_SB_BufferD_t *BufDscPtr; diff --git a/modules/tbl/fsw/src/cfe_tbl_api.c b/modules/tbl/fsw/src/cfe_tbl_api.c index f4e127b66..7a01f68a5 100644 --- a/modules/tbl/fsw/src/cfe_tbl_api.c +++ b/modules/tbl/fsw/src/cfe_tbl_api.c @@ -48,7 +48,7 @@ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_Register(CFE_TBL_Handle_t *TblHandlePtr, const char *Name, size_t Size, uint16 TblOptionFlags, +CFE_Status_t CFE_TBL_Register(CFE_TBL_Handle_t *TblHandlePtr, const char *Name, size_t Size, uint16 TblOptionFlags, CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr) { CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; @@ -516,7 +516,7 @@ int32 CFE_TBL_Register(CFE_TBL_Handle_t *TblHandlePtr, const char *Name, size_t * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_Share(CFE_TBL_Handle_t *TblHandlePtr, const char *TblName) +CFE_Status_t CFE_TBL_Share(CFE_TBL_Handle_t *TblHandlePtr, const char *TblName) { int32 Status; CFE_ES_AppId_t ThisAppId; @@ -619,7 +619,7 @@ int32 CFE_TBL_Share(CFE_TBL_Handle_t *TblHandlePtr, const char *TblName) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_Unregister(CFE_TBL_Handle_t TblHandle) +CFE_Status_t CFE_TBL_Unregister(CFE_TBL_Handle_t TblHandle) { int32 Status; CFE_ES_AppId_t ThisAppId; @@ -684,7 +684,7 @@ int32 CFE_TBL_Unregister(CFE_TBL_Handle_t TblHandle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_Load(CFE_TBL_Handle_t TblHandle, CFE_TBL_SrcEnum_t SrcType, const void *SrcDataPtr) +CFE_Status_t CFE_TBL_Load(CFE_TBL_Handle_t TblHandle, CFE_TBL_SrcEnum_t SrcType, const void *SrcDataPtr) { int32 Status; CFE_ES_AppId_t ThisAppId; @@ -915,7 +915,7 @@ int32 CFE_TBL_Load(CFE_TBL_Handle_t TblHandle, CFE_TBL_SrcEnum_t SrcType, const * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_Update(CFE_TBL_Handle_t TblHandle) +CFE_Status_t CFE_TBL_Update(CFE_TBL_Handle_t TblHandle) { int32 Status; CFE_ES_AppId_t ThisAppId; @@ -992,7 +992,7 @@ int32 CFE_TBL_Update(CFE_TBL_Handle_t TblHandle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_GetAddress(void **TblPtr, CFE_TBL_Handle_t TblHandle) +CFE_Status_t CFE_TBL_GetAddress(void **TblPtr, CFE_TBL_Handle_t TblHandle) { int32 Status; CFE_ES_AppId_t ThisAppId; @@ -1032,7 +1032,7 @@ int32 CFE_TBL_GetAddress(void **TblPtr, CFE_TBL_Handle_t TblHandle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_ReleaseAddress(CFE_TBL_Handle_t TblHandle) +CFE_Status_t CFE_TBL_ReleaseAddress(CFE_TBL_Handle_t TblHandle) { int32 Status; CFE_ES_AppId_t ThisAppId; @@ -1069,7 +1069,7 @@ int32 CFE_TBL_ReleaseAddress(CFE_TBL_Handle_t TblHandle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_GetAddresses(void **TblPtrs[], uint16 NumTables, const CFE_TBL_Handle_t TblHandles[]) +CFE_Status_t CFE_TBL_GetAddresses(void **TblPtrs[], uint16 NumTables, const CFE_TBL_Handle_t TblHandles[]) { uint16 i; int32 Status; @@ -1153,7 +1153,7 @@ int32 CFE_TBL_ReleaseAddresses(uint16 NumTables, const CFE_TBL_Handle_t TblHandl * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_Validate(CFE_TBL_Handle_t TblHandle) +CFE_Status_t CFE_TBL_Validate(CFE_TBL_Handle_t TblHandle) { int32 Status; CFE_ES_AppId_t ThisAppId; @@ -1301,7 +1301,7 @@ int32 CFE_TBL_Validate(CFE_TBL_Handle_t TblHandle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_Manage(CFE_TBL_Handle_t TblHandle) +CFE_Status_t CFE_TBL_Manage(CFE_TBL_Handle_t TblHandle) { int32 Status = CFE_SUCCESS; bool FinishedManaging = false; @@ -1361,7 +1361,7 @@ int32 CFE_TBL_Manage(CFE_TBL_Handle_t TblHandle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_GetStatus(CFE_TBL_Handle_t TblHandle) +CFE_Status_t CFE_TBL_GetStatus(CFE_TBL_Handle_t TblHandle) { int32 Status; CFE_ES_AppId_t ThisAppId; @@ -1409,7 +1409,7 @@ int32 CFE_TBL_GetStatus(CFE_TBL_Handle_t TblHandle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_GetInfo(CFE_TBL_Info_t *TblInfoPtr, const char *TblName) +CFE_Status_t CFE_TBL_GetInfo(CFE_TBL_Info_t *TblInfoPtr, const char *TblName) { int32 Status = CFE_SUCCESS; int16 RegIndx; @@ -1473,7 +1473,7 @@ int32 CFE_TBL_GetInfo(CFE_TBL_Info_t *TblInfoPtr, const char *TblName) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_DumpToBuffer(CFE_TBL_Handle_t TblHandle) +CFE_Status_t CFE_TBL_DumpToBuffer(CFE_TBL_Handle_t TblHandle) { int32 Status; CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; @@ -1517,7 +1517,7 @@ int32 CFE_TBL_DumpToBuffer(CFE_TBL_Handle_t TblHandle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_Modified(CFE_TBL_Handle_t TblHandle) +CFE_Status_t CFE_TBL_Modified(CFE_TBL_Handle_t TblHandle) { int32 Status; CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; @@ -1588,7 +1588,7 @@ int32 CFE_TBL_Modified(CFE_TBL_Handle_t TblHandle) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId, CFE_MSG_FcnCode_t CommandCode, +CFE_Status_t CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId, CFE_MSG_FcnCode_t CommandCode, uint32 Parameter) { int32 Status; diff --git a/modules/time/fsw/src/cfe_time_api.c b/modules/time/fsw/src/cfe_time_api.c index 2bf4e9bd1..f6eb1246e 100644 --- a/modules/time/fsw/src/cfe_time_api.c +++ b/modules/time/fsw/src/cfe_time_api.c @@ -762,7 +762,7 @@ void CFE_TIME_ExternalTone(void) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TIME_RegisterSynchCallback(CFE_TIME_SynchCallbackPtr_t CallbackFuncPtr) +CFE_Status_t CFE_TIME_RegisterSynchCallback(CFE_TIME_SynchCallbackPtr_t CallbackFuncPtr) { int32 Status; CFE_ES_AppId_t AppId; @@ -804,7 +804,7 @@ int32 CFE_TIME_RegisterSynchCallback(CFE_TIME_SynchCallbackPtr_t CallbackFuncPtr * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TIME_UnregisterSynchCallback(CFE_TIME_SynchCallbackPtr_t CallbackFuncPtr) +CFE_Status_t CFE_TIME_UnregisterSynchCallback(CFE_TIME_SynchCallbackPtr_t CallbackFuncPtr) { int32 Status; CFE_ES_AppId_t AppId; From 9c28130fa10eec0ccac53db19b01f0778a8b445a Mon Sep 17 00:00:00 2001 From: Zachary Gonzalez Date: Mon, 17 May 2021 17:49:11 -0500 Subject: [PATCH 5/8] Partial #1474, Resolved API function/prototype mismatches --- modules/core_api/fsw/inc/cfe_es.h | 36 +-- modules/core_api/fsw/inc/cfe_evs.h | 8 +- modules/core_api/fsw/inc/cfe_msg.h | 4 +- modules/core_api/fsw/inc/cfe_resourceid.h | 2 +- modules/core_api/fsw/inc/cfe_sb.h | 4 +- modules/core_api/fsw/inc/cfe_tbl.h | 7 +- .../core_api/ut-stubs/src/ut_time_handlers.c | 229 ------------------ modules/es/fsw/src/cfe_es_api.c | 4 +- modules/es/fsw/src/cfe_es_mempool.c | 12 +- modules/evs/fsw/src/cfe_evs.c | 2 +- modules/msg/fsw/src/cfe_msg_ccsdsext.c | 24 +- modules/msg/fsw/src/cfe_msg_ccsdspri.c | 34 +-- modules/msg/fsw/src/cfe_msg_msgid_shared.c | 2 +- modules/msg/fsw/src/cfe_msg_msgid_v1.c | 4 +- modules/msg/fsw/src/cfe_msg_msgid_v2.c | 4 +- modules/msg/fsw/src/cfe_msg_sechdr_checksum.c | 8 +- modules/msg/fsw/src/cfe_msg_sechdr_fc.c | 8 +- modules/msg/fsw/src/cfe_msg_sechdr_time.c | 8 +- modules/sb/fsw/src/cfe_sb_api.c | 2 +- modules/tbl/fsw/src/cfe_tbl_api.c | 10 +- 20 files changed, 89 insertions(+), 323 deletions(-) delete mode 100644 modules/core_api/ut-stubs/src/ut_time_handlers.c diff --git a/modules/core_api/fsw/inc/cfe_es.h b/modules/core_api/fsw/inc/cfe_es.h index 79f8d8481..edaf23745 100644 --- a/modules/core_api/fsw/inc/cfe_es.h +++ b/modules/core_api/fsw/inc/cfe_es.h @@ -112,14 +112,14 @@ CFE_Status_t CFE_ES_AppID_ToIndex(CFE_ES_AppId_t AppID, uint32 *Idx); * back to the original LibID value. The caller should retain the original ID * for future use. * - * @param[in] LibID Library ID to convert + * @param[in] LibId Library ID to convert * @param[out] Idx Buffer where the calculated index will be stored * * @return Execution status, see @ref CFEReturnCodes * @retval #CFE_SUCCESS @copybrief CFE_SUCCESS * @retval #CFE_ES_ERR_RESOURCEID_NOT_VALID @copybrief CFE_ES_ERR_RESOURCEID_NOT_VALID */ -int32 CFE_ES_LibID_ToIndex(CFE_ES_LibId_t LibID, uint32 *Idx); +int32 CFE_ES_LibID_ToIndex(CFE_ES_LibId_t LibId, uint32 *Idx); /** * @brief Obtain an index value correlating to an ES Task ID @@ -162,14 +162,14 @@ CFE_Status_t CFE_ES_TaskID_ToIndex(CFE_ES_TaskId_t TaskID, uint32 *Idx); * back to the original CounterID value. The caller should retain the original ID * for future use. * - * @param[in] CounterID Counter ID to convert + * @param[in] CounterId Counter ID to convert * @param[out] Idx Buffer where the calculated index will be stored * * @return Execution status, see @ref CFEReturnCodes * @retval #CFE_SUCCESS @copybrief CFE_SUCCESS * @retval #CFE_ES_ERR_RESOURCEID_NOT_VALID @copybrief CFE_ES_ERR_RESOURCEID_NOT_VALID */ -CFE_Status_t CFE_ES_CounterID_ToIndex(CFE_ES_CounterId_t CounterID, uint32 *Idx); +CFE_Status_t CFE_ES_CounterID_ToIndex(CFE_ES_CounterId_t CounterId, uint32 *Idx); /** @} */ @@ -357,7 +357,7 @@ void CFE_ES_ExitApp(uint32 ExitStatus); ** \par Assumptions, External Events, and Notes: ** None ** -** \param[in] ExitStatus A pointer to a variable containing the Application's +** \param[in] RunStatus A pointer to a variable containing the Application's ** desired run status. Acceptable values are: ** \arg #CFE_ES_RunStatus_APP_RUN - \copybrief CFE_ES_RunStatus_APP_RUN ** \arg #CFE_ES_RunStatus_APP_EXIT - \copybrief CFE_ES_RunStatus_APP_EXIT @@ -370,7 +370,7 @@ void CFE_ES_ExitApp(uint32 ExitStatus); ** \sa #CFE_ES_ExitApp ** ******************************************************************************/ -bool CFE_ES_RunLoop(uint32 *ExitStatus); +bool CFE_ES_RunLoop(uint32 *RunStatus); /*****************************************************************************/ /** @@ -1029,9 +1029,9 @@ void CFE_ES_ProcessAsyncEvent(void); ** This is indicated by a #CFE_SUCCESS return code, and in this case the calling application should ** ensure that it also calls CFE_ES_CopyToCDS() to fill the block with valid data. ** -** \param[in, out] HandlePtr Pointer Application's variable that will contain the CDS Memory Block Handle. -** HandlePtr is the handle of the CDS block that can be used in -** #CFE_ES_CopyToCDS and #CFE_ES_RestoreFromCDS. +** \param[in, out] CDSHandlePtr Pointer Application's variable that will contain the CDS Memory Block Handle. +** HandlePtr is the handle of the CDS block that can be used in +** #CFE_ES_CopyToCDS and #CFE_ES_RestoreFromCDS. ** ** \param[in] BlockSize The number of bytes needed in the CDS. ** @@ -1050,7 +1050,7 @@ void CFE_ES_ProcessAsyncEvent(void); ** \sa #CFE_ES_CopyToCDS, #CFE_ES_RestoreFromCDS ** ******************************************************************************/ -CFE_Status_t CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *HandlePtr, size_t BlockSize, const char *Name); +CFE_Status_t CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *CDSHandlePtr, size_t BlockSize, const char *Name); /*****************************************************************************/ /** @@ -1311,7 +1311,7 @@ int32 CFE_ES_PoolDelete(CFE_ES_MemHandle_t PoolID); ** \param[in, out] BufPtr A pointer to the Application's pointer in which will be stored the address of the ** allocated memory buffer. *BufPtr is the address of the requested buffer. ** -** \param[in] PoolID The handle to the memory pool as returned by #CFE_ES_PoolCreate or #CFE_ES_PoolCreateNoSem. +** \param[in] Handle The handle to the memory pool as returned by #CFE_ES_PoolCreate or #CFE_ES_PoolCreateNoSem. ** ** \param[in] Size The size of the buffer requested. NOTE: The size allocated may be larger. ** @@ -1324,7 +1324,7 @@ int32 CFE_ES_PoolDelete(CFE_ES_MemHandle_t PoolID); *#CFE_ES_GetPoolBufInfo ** ******************************************************************************/ -int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t PoolID, size_t Size); +int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t Handle, size_t Size); /*****************************************************************************/ /** @@ -1336,9 +1336,9 @@ int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t PoolID, ** \par Assumptions, External Events, and Notes: ** None ** -** \param[in] PoolID The handle to the memory pool as returned by #CFE_ES_PoolCreate or #CFE_ES_PoolCreateNoSem. +** \param[in] Handle The handle to the memory pool as returned by #CFE_ES_PoolCreate or #CFE_ES_PoolCreateNoSem. ** -** \param[in] BufPtr A pointer to the memory buffer to provide status for. +** \param[in] BufPtr A pointer to the memory buffer to provide status for. ** ** \return Execution status, see \ref CFEReturnCodes ** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS @@ -1350,7 +1350,7 @@ int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t PoolID, *#CFE_ES_PutPoolBuf ** ******************************************************************************/ -CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_t BufPtr); +CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t Handle, CFE_ES_MemPoolBuf_t BufPtr); /*****************************************************************************/ /** @@ -1362,9 +1362,9 @@ CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_ ** \par Assumptions, External Events, and Notes: ** None ** -** \param[in] PoolID The handle to the memory pool as returned by #CFE_ES_PoolCreate or #CFE_ES_PoolCreateNoSem. +** \param[in] Handle The handle to the memory pool as returned by #CFE_ES_PoolCreate or #CFE_ES_PoolCreateNoSem. ** -** \param[in] BufPtr A pointer to the memory buffer to be released. +** \param[in] BufPtr A pointer to the memory buffer to be released. ** ** \return Bytes released, or error code \ref CFEReturnCodes ** \retval #CFE_ES_ERR_RESOURCEID_NOT_VALID \copybrief CFE_ES_ERR_RESOURCEID_NOT_VALID @@ -1374,7 +1374,7 @@ CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_ *#CFE_ES_GetPoolBufInfo ** ******************************************************************************/ -int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_t BufPtr); +int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t Handle, CFE_ES_MemPoolBuf_t BufPtr); /*****************************************************************************/ /** diff --git a/modules/core_api/fsw/inc/cfe_evs.h b/modules/core_api/fsw/inc/cfe_evs.h index b6c8f6b1b..422132616 100644 --- a/modules/core_api/fsw/inc/cfe_evs.h +++ b/modules/core_api/fsw/inc/cfe_evs.h @@ -89,9 +89,9 @@ ** The structure of an event message filter depends on the FilterScheme selected. ** (see Filter Schemes mentioned above) ** -** \param[in] NumFilteredEvents The number of event message filters included in this call. This must be less than +** \param[in] NumEventFilters The number of event message filters included in this call. This must be less than ** or equal to the maximum number of events allowed per application -*(#CFE_PLATFORM_EVS_MAX_EVENT_FILTERS). +** (#CFE_PLATFORM_EVS_MAX_EVENT_FILTERS). ** ** \param[in] FilterScheme The event filtering scheme that this application will use. For the first ** implementation of the event services, only filter type #CFE_EVS_EventFilter_BINARY @@ -106,9 +106,7 @@ ** \sa #CFE_EVS_Unregister ** **/ -CFE_Status_t CFE_EVS_Register(const void *Filters, /* Pointer to an array of filters */ - uint16 NumFilteredEvents, /* How many elements in the array? */ - uint16 FilterScheme); /* Filtering Algorithm to be implemented */ +CFE_Status_t CFE_EVS_Register(const void *Filters, uint16 NumEventFilters, uint16 FilterScheme); /** ** \brief Cleanup internal structures used by the event manager for the calling Application. diff --git a/modules/core_api/fsw/inc/cfe_msg.h b/modules/core_api/fsw/inc/cfe_msg.h index 2ce5542f2..aa013fe15 100644 --- a/modules/core_api/fsw/inc/cfe_msg.h +++ b/modules/core_api/fsw/inc/cfe_msg.h @@ -607,7 +607,7 @@ CFE_Status_t CFE_MSG_GetMsgTime(const CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTim * - Note default implementation of command messages do not have a time field. * * \param[in, out] MsgPtr A pointer to the message. - * \param[in] Time The time to include in the message. This will usually be a time + * \param[in] NewTime The time to include in the message. This will usually be a time * from #CFE_TIME_GetTime. * * \return Execution status, see \ref CFEReturnCodes @@ -615,7 +615,7 @@ CFE_Status_t CFE_MSG_GetMsgTime(const CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTim * \retval #CFE_MSG_BAD_ARGUMENT \copybrief CFE_MSG_BAD_ARGUMENT * \retval #CFE_MSG_WRONG_MSG_TYPE \copybrief CFE_MSG_WRONG_MSG_TYPE */ -CFE_Status_t CFE_MSG_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t Time); +CFE_Status_t CFE_MSG_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t NewTime); /**\}*/ diff --git a/modules/core_api/fsw/inc/cfe_resourceid.h b/modules/core_api/fsw/inc/cfe_resourceid.h index 597d2e297..5cb5e223e 100644 --- a/modules/core_api/fsw/inc/cfe_resourceid.h +++ b/modules/core_api/fsw/inc/cfe_resourceid.h @@ -203,7 +203,7 @@ uint32 CFE_ResourceId_GetSerial(CFE_ResourceId_t ResourceId); * */ CFE_ResourceId_t CFE_ResourceId_FindNext(CFE_ResourceId_t StartId, uint32 TableSize, - bool (*CheckFunc)(CFE_ResourceId_t)); + bool (*CheckFunc)(CFE_ResourceId_t)); /** * @brief Internal routine to aid in converting an ES resource ID to an array index diff --git a/modules/core_api/fsw/inc/cfe_sb.h b/modules/core_api/fsw/inc/cfe_sb.h index ebcdc01bb..3967688bd 100644 --- a/modules/core_api/fsw/inc/cfe_sb.h +++ b/modules/core_api/fsw/inc/cfe_sb.h @@ -173,7 +173,7 @@ CFE_Status_t CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 Opts); ** ** \param[in] PipeId The pipe ID of the pipe to get options from. ** -** \param[out] *OptPtr A bit field of options. +** \param[out] *OptsPtr A bit field of options. ** ** \return Execution status, see \ref CFEReturnCodes ** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS @@ -181,7 +181,7 @@ CFE_Status_t CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 Opts); ** ** \sa #CFE_SB_CreatePipe #CFE_SB_DeletePipe #CFE_SB_SetPipeOpts #CFE_SB_GetPipeIdByName #CFE_SB_PIPEOPTS_IGNOREMINE **/ -CFE_Status_t CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptPtr); +CFE_Status_t CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptsPtr); /*****************************************************************************/ /** diff --git a/modules/core_api/fsw/inc/cfe_tbl.h b/modules/core_api/fsw/inc/cfe_tbl.h index 8fa42f9c3..b9938b370 100644 --- a/modules/core_api/fsw/inc/cfe_tbl.h +++ b/modules/core_api/fsw/inc/cfe_tbl.h @@ -183,11 +183,8 @@ ** ** \sa #CFE_TBL_Unregister, #CFE_TBL_Share **/ -CFE_Status_t CFE_TBL_Register(CFE_TBL_Handle_t * TblHandlePtr, /* Returned Handle */ - const char * Name, /* Application specific name */ - size_t Size, /* Size, in bytes, of table */ - uint16 TblOptionFlags, /* Tbl Options Settings */ - CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr); /* Ptr to func that validates tbl */ +CFE_Status_t CFE_TBL_Register(CFE_TBL_Handle_t *TblHandlePtr, const char *Name, size_t Size, uint16 TblOptionFlags, + CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr); /*****************************************************************************/ /** diff --git a/modules/core_api/ut-stubs/src/ut_time_handlers.c b/modules/core_api/ut-stubs/src/ut_time_handlers.c deleted file mode 100644 index 1f6c9c13f..000000000 --- a/modules/core_api/ut-stubs/src/ut_time_handlers.c +++ /dev/null @@ -1,229 +0,0 @@ -/* -** GSC-18128-1, "Core Flight Executive Version 6.7" -** -** Copyright (c) 2006-2019 United States Government as represented by -** the Administrator of the National Aeronautics and Space Administration. -** All Rights Reserved. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** File: ut_time_stubs.c -** -** Purpose: -** Unit test stubs for Time routines -** -** Notes: -** Minimal work is done, only what is required for unit testing -** -*/ - -/* -** Includes -*/ -#include -#include -#include "cfe_time.h" - -#include "utstubs.h" - -/* -** Functions -*/ - -/*------------------------------------------------------------ - * - * Default handler for CFE_TIME_Print coverage stub function - * - *------------------------------------------------------------*/ -void UT_DefaultHandler_CFE_TIME_Print(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) -{ - char * PrintBuffer = UT_Hook_GetArgValueByName(Context, "PrintBuffer", char *); - CFE_TIME_SysTime_t TimeToPrint = UT_Hook_GetArgValueByName(Context, "TimeToPrint", CFE_TIME_SysTime_t); - - snprintf(PrintBuffer, CFE_TIME_PRINTED_STRING_SIZE, "UT %u.%u -", (unsigned int)TimeToPrint.Seconds, - (unsigned int)TimeToPrint.Subseconds); -} - -/*------------------------------------------------------------ - * - * Default handler for CFE_TIME_GetTime coverage stub function - * - *------------------------------------------------------------*/ -void UT_DefaultHandler_CFE_TIME_GetTime(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) -{ - static CFE_TIME_SysTime_t SimTime = {0}; - CFE_TIME_SysTime_t Result = {0}; - int32 status; - - UT_Stub_GetInt32StatusCode(Context, &status); - - if (status >= 0) - { - if (UT_Stub_CopyToLocal(UT_KEY(CFE_TIME_GetTime), &Result, sizeof(Result)) < sizeof(Result)) - { - SimTime.Seconds++; - SimTime.Subseconds++; - Result = SimTime; - } - } - - UT_Stub_SetReturnValue(FuncKey, Result); -} - -/*------------------------------------------------------------ - * - * Default handler for CFE_TIME_Add coverage stub function - * - *------------------------------------------------------------*/ -void UT_DefaultHandler_CFE_TIME_Add(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) -{ - CFE_TIME_SysTime_t Time1 = UT_Hook_GetArgValueByName(Context, "Time1", CFE_TIME_SysTime_t); - CFE_TIME_SysTime_t Time2 = UT_Hook_GetArgValueByName(Context, "Time2", CFE_TIME_SysTime_t); - - static CFE_TIME_SysTime_t SimTime = {0}; - CFE_TIME_SysTime_t Result = {0}; - int32 status; - - UT_Stub_GetInt32StatusCode(Context, &status); - - if (status >= 0) - { - if (UT_Stub_CopyToLocal(UT_KEY(CFE_TIME_Add), (uint8 *)&Result, sizeof(Result)) < sizeof(Result)) - { - SimTime.Seconds++; - SimTime.Subseconds++; - Result = SimTime; - } - } - - UT_Stub_SetReturnValue(FuncKey, Result); -} - -/*------------------------------------------------------------ - * - * Default handler for CFE_TIME_GetMET coverage stub function - * - *------------------------------------------------------------*/ -void UT_DefaultHandler_CFE_TIME_GetMET(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) -{ - int32 status; - CFE_TIME_SysTime_t Result = {0}; - - UT_Stub_GetInt32StatusCode(Context, &status); - if (status >= 0) - { - UT_Stub_CopyToLocal(UT_KEY(CFE_TIME_GetMET), &Result, sizeof(Result)); - } - - UT_Stub_SetReturnValue(FuncKey, Result); -} - -/*------------------------------------------------------------ - * - * Default handler for CFE_TIME_GetSTCF coverage stub function - * - *------------------------------------------------------------*/ -void UT_DefaultHandler_CFE_TIME_GetSTCF(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) -{ - int32 status; - CFE_TIME_SysTime_t Result = {0}; - - UT_Stub_GetInt32StatusCode(Context, &status); - if (status >= 0) - { - UT_Stub_CopyToLocal(UT_KEY(CFE_TIME_GetSTCF), &Result, sizeof(Result)); - } - - UT_Stub_SetReturnValue(FuncKey, Result); -} - -/*------------------------------------------------------------ - * - * Default handler for CFE_TIME_GetTAI coverage stub function - * - *------------------------------------------------------------*/ -void UT_DefaultHandler_CFE_TIME_GetTAI(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) -{ - int32 status; - CFE_TIME_SysTime_t Result = {0}; - - UT_Stub_GetInt32StatusCode(Context, &status); - if (status >= 0) - { - UT_Stub_CopyToLocal(UT_KEY(CFE_TIME_GetTAI), &Result, sizeof(Result)); - } - - UT_Stub_SetReturnValue(FuncKey, Result); -} - -/*------------------------------------------------------------ - * - * Default handler for CFE_TIME_GetUTC coverage stub function - * - *------------------------------------------------------------*/ -void UT_DefaultHandler_CFE_TIME_GetUTC(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) -{ - int32 status; - CFE_TIME_SysTime_t Result = {0}; - - UT_Stub_GetInt32StatusCode(Context, &status); - if (status >= 0) - { - UT_Stub_CopyToLocal(UT_KEY(CFE_TIME_GetUTC), &Result, sizeof(Result)); - } - - UT_Stub_SetReturnValue(FuncKey, Result); -} - -/*------------------------------------------------------------ - * - * Default handler for CFE_TIME_MET2SCTime coverage stub function - * - *------------------------------------------------------------*/ -void UT_DefaultHandler_CFE_TIME_MET2SCTime(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) -{ - int32 status; - CFE_TIME_SysTime_t Result = {0}; - - UT_Stub_GetInt32StatusCode(Context, &status); - if (status >= 0) - { - UT_Stub_CopyToLocal(UT_KEY(CFE_TIME_MET2SCTime), &Result, sizeof(Result)); - } - - UT_Stub_SetReturnValue(FuncKey, Result); -} - -/*------------------------------------------------------------ - * - * Default handler for CFE_TIME_Subtract coverage stub function - * - *------------------------------------------------------------*/ -void UT_DefaultHandler_CFE_TIME_Subtract(void *UserObj, UT_EntryKey_t FuncKey, const UT_StubContext_t *Context) -{ - CFE_TIME_SysTime_t Time1 = UT_Hook_GetArgValueByName(Context, "Time1", CFE_TIME_SysTime_t); - CFE_TIME_SysTime_t Time2 = UT_Hook_GetArgValueByName(Context, "Time2", CFE_TIME_SysTime_t); - - int32 status; - CFE_TIME_SysTime_t Result = {0}; - - UT_Stub_GetInt32StatusCode(Context, &status); - if (status >= 0) - { - UT_Stub_CopyToLocal(UT_KEY(CFE_TIME_Subtract), &Result, sizeof(Result)); - } - - UT_Stub_SetReturnValue(FuncKey, Result); -} diff --git a/modules/es/fsw/src/cfe_es_api.c b/modules/es/fsw/src/cfe_es_api.c index 3d99b712c..e58327320 100644 --- a/modules/es/fsw/src/cfe_es_api.c +++ b/modules/es/fsw/src/cfe_es_api.c @@ -1274,8 +1274,8 @@ CFE_Status_t CFE_ES_GetTaskInfo(CFE_ES_TaskInfo_t *TaskInfo, CFE_ES_TaskId_t Tas * *-----------------------------------------------------------------*/ CFE_Status_t CFE_ES_CreateChildTask(CFE_ES_TaskId_t *TaskIdPtr, const char *TaskName, - CFE_ES_ChildTaskMainFuncPtr_t FunctionPtr, CFE_ES_StackPointer_t StackPtr, - size_t StackSize, CFE_ES_TaskPriority_Atom_t Priority, uint32 Flags) + CFE_ES_ChildTaskMainFuncPtr_t FunctionPtr, CFE_ES_StackPointer_t StackPtr, + size_t StackSize, CFE_ES_TaskPriority_Atom_t Priority, uint32 Flags) { int32 ReturnCode; CFE_ES_AppRecord_t * AppRecPtr; diff --git a/modules/es/fsw/src/cfe_es_mempool.c b/modules/es/fsw/src/cfe_es_mempool.c index 8a2fb300f..96c8a3d30 100644 --- a/modules/es/fsw/src/cfe_es_mempool.c +++ b/modules/es/fsw/src/cfe_es_mempool.c @@ -170,7 +170,7 @@ CFE_ES_MemPoolRecord_t *CFE_ES_LocateMemPoolRecordByID(CFE_ES_MemHandle_t PoolID * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_PoolCreateNoSem(CFE_ES_MemHandle_t *PoolID, void *MemPtr, size_t Size) +CFE_Status_t CFE_ES_PoolCreateNoSem(CFE_ES_MemHandle_t *PoolID, void *MemPtr, size_t Size) { return CFE_ES_PoolCreateEx(PoolID, MemPtr, Size, CFE_PLATFORM_ES_POOL_MAX_BUCKETS, &CFE_ES_MemPoolDefSize[0], CFE_ES_NO_MUTEX); @@ -184,7 +184,7 @@ int32 CFE_ES_PoolCreateNoSem(CFE_ES_MemHandle_t *PoolID, void *MemPtr, size_t Si * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_PoolCreate(CFE_ES_MemHandle_t *PoolID, void *MemPtr, size_t Size) +CFE_Status_t CFE_ES_PoolCreate(CFE_ES_MemHandle_t *PoolID, void *MemPtr, size_t Size) { return CFE_ES_PoolCreateEx(PoolID, MemPtr, Size, CFE_PLATFORM_ES_POOL_MAX_BUCKETS, &CFE_ES_MemPoolDefSize[0], CFE_ES_USE_MUTEX); @@ -198,8 +198,8 @@ int32 CFE_ES_PoolCreate(CFE_ES_MemHandle_t *PoolID, void *MemPtr, size_t Size) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_PoolCreateEx(CFE_ES_MemHandle_t *PoolID, void *MemPtr, size_t Size, uint16 NumBlockSizes, - const size_t *BlockSizes, bool UseMutex) +CFE_Status_t CFE_ES_PoolCreateEx(CFE_ES_MemHandle_t *PoolID, void *MemPtr, size_t Size, uint16 NumBlockSizes, + const size_t *BlockSizes, bool UseMutex) { int32 Status; CFE_ResourceId_t PendingID; @@ -496,7 +496,7 @@ int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t Handle, * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t Handle, CFE_ES_MemPoolBuf_t BufPtr) +CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t Handle, CFE_ES_MemPoolBuf_t BufPtr) { int32 Status; CFE_ES_MemPoolRecord_t *PoolRecPtr; @@ -641,7 +641,7 @@ int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t Handle, CFE_ES_MemPoolBuf_t BufPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_ES_GetMemPoolStats(CFE_ES_MemPoolStats_t *BufPtr, CFE_ES_MemHandle_t Handle) +CFE_Status_t CFE_ES_GetMemPoolStats(CFE_ES_MemPoolStats_t *BufPtr, CFE_ES_MemHandle_t Handle) { CFE_ES_AppId_t AppId; CFE_ES_MemPoolRecord_t *PoolRecPtr; diff --git a/modules/evs/fsw/src/cfe_evs.c b/modules/evs/fsw/src/cfe_evs.c index a8844fee3..f34cc7d69 100644 --- a/modules/evs/fsw/src/cfe_evs.c +++ b/modules/evs/fsw/src/cfe_evs.c @@ -316,7 +316,7 @@ CFE_Status_t CFE_EVS_ResetFilter(int16 EventID) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_EVS_ResetAllFilters(void) +CFE_Status_t CFE_EVS_ResetAllFilters(void) { int32 Status; CFE_ES_AppId_t AppID; diff --git a/modules/msg/fsw/src/cfe_msg_ccsdsext.c b/modules/msg/fsw/src/cfe_msg_ccsdsext.c index b7794d977..c18d3e4cf 100644 --- a/modules/msg/fsw/src/cfe_msg_ccsdsext.c +++ b/modules/msg/fsw/src/cfe_msg_ccsdsext.c @@ -66,7 +66,7 @@ void CFE_MSG_SetDefaultCCSDSExt(CFE_MSG_Message_t *MsgPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetEDSVersion(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_EDSVersion_t *Version) +CFE_Status_t CFE_MSG_GetEDSVersion(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_EDSVersion_t *Version) { if (MsgPtr == NULL || Version == NULL) @@ -88,7 +88,7 @@ int32 CFE_MSG_GetEDSVersion(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_EDSVersion_ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetEDSVersion(CFE_MSG_Message_t *MsgPtr, CFE_MSG_EDSVersion_t Version) +CFE_Status_t CFE_MSG_SetEDSVersion(CFE_MSG_Message_t *MsgPtr, CFE_MSG_EDSVersion_t Version) { if (MsgPtr == NULL || (Version > (CFE_MSG_EDSVER_MASK >> CFE_MSG_EDSVER_SHIFT))) { @@ -108,7 +108,7 @@ int32 CFE_MSG_SetEDSVersion(CFE_MSG_Message_t *MsgPtr, CFE_MSG_EDSVersion_t Vers * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetEndian(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Endian_t *Endian) +CFE_Status_t CFE_MSG_GetEndian(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Endian_t *Endian) { if (MsgPtr == NULL || Endian == NULL) @@ -136,9 +136,9 @@ int32 CFE_MSG_GetEndian(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Endian_t *Endia * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetEndian(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Endian_t Endian) +CFE_Status_t CFE_MSG_SetEndian(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Endian_t Endian) { - int32 status = CFE_SUCCESS; + CFE_Status_t status = CFE_SUCCESS; if (MsgPtr == NULL) { @@ -169,7 +169,7 @@ int32 CFE_MSG_SetEndian(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Endian_t Endian) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetPlaybackFlag(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_PlaybackFlag_t *PlayFlag) +CFE_Status_t CFE_MSG_GetPlaybackFlag(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_PlaybackFlag_t *PlayFlag) { if (MsgPtr == NULL || PlayFlag == NULL) @@ -197,9 +197,9 @@ int32 CFE_MSG_GetPlaybackFlag(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_PlaybackF * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetPlaybackFlag(CFE_MSG_Message_t *MsgPtr, CFE_MSG_PlaybackFlag_t PlayFlag) +CFE_Status_t CFE_MSG_SetPlaybackFlag(CFE_MSG_Message_t *MsgPtr, CFE_MSG_PlaybackFlag_t PlayFlag) { - int32 status = CFE_SUCCESS; + CFE_Status_t status = CFE_SUCCESS; if (MsgPtr == NULL) { @@ -230,7 +230,7 @@ int32 CFE_MSG_SetPlaybackFlag(CFE_MSG_Message_t *MsgPtr, CFE_MSG_PlaybackFlag_t * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetSubsystem(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Subsystem_t *Subsystem) +CFE_Status_t CFE_MSG_GetSubsystem(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Subsystem_t *Subsystem) { if (MsgPtr == NULL || Subsystem == NULL) @@ -251,7 +251,7 @@ int32 CFE_MSG_GetSubsystem(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Subsystem_t * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetSubsystem(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Subsystem_t Subsystem) +CFE_Status_t CFE_MSG_SetSubsystem(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Subsystem_t Subsystem) { if (MsgPtr == NULL || ((Subsystem & ~CFE_MSG_SUBSYS_MASK) != 0)) { @@ -271,7 +271,7 @@ int32 CFE_MSG_SetSubsystem(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Subsystem_t Subsys * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetSystem(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_System_t *System) +CFE_Status_t CFE_MSG_GetSystem(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_System_t *System) { if (MsgPtr == NULL || System == NULL) @@ -292,7 +292,7 @@ int32 CFE_MSG_GetSystem(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_System_t *Syste * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetSystem(CFE_MSG_Message_t *MsgPtr, CFE_MSG_System_t System) +CFE_Status_t CFE_MSG_SetSystem(CFE_MSG_Message_t *MsgPtr, CFE_MSG_System_t System) { if (MsgPtr == NULL) { diff --git a/modules/msg/fsw/src/cfe_msg_ccsdspri.c b/modules/msg/fsw/src/cfe_msg_ccsdspri.c index f04d48339..86b5392ed 100644 --- a/modules/msg/fsw/src/cfe_msg_ccsdspri.c +++ b/modules/msg/fsw/src/cfe_msg_ccsdspri.c @@ -72,7 +72,7 @@ void CFE_MSG_SetDefaultCCSDSPri(CFE_MSG_Message_t *MsgPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetHeaderVersion(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_HeaderVersion_t *Version) +CFE_Status_t CFE_MSG_GetHeaderVersion(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_HeaderVersion_t *Version) { if (MsgPtr == NULL || Version == NULL) @@ -94,7 +94,7 @@ int32 CFE_MSG_GetHeaderVersion(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_HeaderVe * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetHeaderVersion(CFE_MSG_Message_t *MsgPtr, CFE_MSG_HeaderVersion_t Version) +CFE_Status_t CFE_MSG_SetHeaderVersion(CFE_MSG_Message_t *MsgPtr, CFE_MSG_HeaderVersion_t Version) { if (MsgPtr == NULL || (Version > (CFE_MSG_CCSDSVER_MASK >> CFE_MSG_CCSDSVER_SHIFT))) { @@ -114,7 +114,7 @@ int32 CFE_MSG_SetHeaderVersion(CFE_MSG_Message_t *MsgPtr, CFE_MSG_HeaderVersion_ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetType(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Type_t *Type) +CFE_Status_t CFE_MSG_GetType(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Type_t *Type) { if (MsgPtr == NULL || Type == NULL) @@ -142,9 +142,9 @@ int32 CFE_MSG_GetType(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Type_t *Type) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetType(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Type_t Type) +CFE_Status_t CFE_MSG_SetType(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Type_t Type) { - int32 status = CFE_SUCCESS; + CFE_Status_t status = CFE_SUCCESS; if (MsgPtr == NULL) { @@ -175,7 +175,7 @@ int32 CFE_MSG_SetType(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Type_t Type) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetHasSecondaryHeader(const CFE_MSG_Message_t *MsgPtr, bool *HasSecondary) +CFE_Status_t CFE_MSG_GetHasSecondaryHeader(const CFE_MSG_Message_t *MsgPtr, bool *HasSecondary) { if (MsgPtr == NULL || HasSecondary == NULL) @@ -196,7 +196,7 @@ int32 CFE_MSG_GetHasSecondaryHeader(const CFE_MSG_Message_t *MsgPtr, bool *HasSe * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetHasSecondaryHeader(CFE_MSG_Message_t *MsgPtr, bool HasSecondary) +CFE_Status_t CFE_MSG_SetHasSecondaryHeader(CFE_MSG_Message_t *MsgPtr, bool HasSecondary) { if (MsgPtr == NULL) { @@ -223,7 +223,7 @@ int32 CFE_MSG_SetHasSecondaryHeader(CFE_MSG_Message_t *MsgPtr, bool HasSecondary * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetApId(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_ApId_t *ApId) +CFE_Status_t CFE_MSG_GetApId(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_ApId_t *ApId) { if (MsgPtr == NULL || ApId == NULL) @@ -244,7 +244,7 @@ int32 CFE_MSG_GetApId(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_ApId_t *ApId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetApId(CFE_MSG_Message_t *MsgPtr, CFE_MSG_ApId_t ApId) +CFE_Status_t CFE_MSG_SetApId(CFE_MSG_Message_t *MsgPtr, CFE_MSG_ApId_t ApId) { if (MsgPtr == NULL || ((ApId & ~CFE_MSG_APID_MASK) != 0)) { @@ -264,7 +264,7 @@ int32 CFE_MSG_SetApId(CFE_MSG_Message_t *MsgPtr, CFE_MSG_ApId_t ApId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetSegmentationFlag(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_SegmentationFlag_t *SegFlag) +CFE_Status_t CFE_MSG_GetSegmentationFlag(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_SegmentationFlag_t *SegFlag) { uint16 rawval; @@ -303,10 +303,10 @@ int32 CFE_MSG_GetSegmentationFlag(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Segme * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetSegmentationFlag(CFE_MSG_Message_t *MsgPtr, CFE_MSG_SegmentationFlag_t SegFlag) +CFE_Status_t CFE_MSG_SetSegmentationFlag(CFE_MSG_Message_t *MsgPtr, CFE_MSG_SegmentationFlag_t SegFlag) { - uint16 rawval = 0; - int32 status = CFE_SUCCESS; + uint16 rawval = 0; + CFE_Status_t status = CFE_SUCCESS; if (MsgPtr == NULL) { @@ -348,7 +348,7 @@ int32 CFE_MSG_SetSegmentationFlag(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Segmentatio * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetSequenceCount(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_SequenceCount_t *SeqCnt) +CFE_Status_t CFE_MSG_GetSequenceCount(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_SequenceCount_t *SeqCnt) { if (MsgPtr == NULL || SeqCnt == NULL) @@ -369,7 +369,7 @@ int32 CFE_MSG_GetSequenceCount(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Sequence * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetSequenceCount(CFE_MSG_Message_t *MsgPtr, CFE_MSG_SequenceCount_t SeqCnt) +CFE_Status_t CFE_MSG_SetSequenceCount(CFE_MSG_Message_t *MsgPtr, CFE_MSG_SequenceCount_t SeqCnt) { if (MsgPtr == NULL || ((SeqCnt & ~CFE_MSG_SEQCNT_MASK) != 0)) { @@ -409,7 +409,7 @@ CFE_MSG_SequenceCount_t CFE_MSG_GetNextSequenceCount(CFE_MSG_SequenceCount_t Seq * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetSize(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t *Size) +CFE_Status_t CFE_MSG_GetSize(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t *Size) { if (MsgPtr == NULL || Size == NULL) @@ -430,7 +430,7 @@ int32 CFE_MSG_GetSize(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t *Size) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetSize(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t Size) +CFE_Status_t CFE_MSG_SetSize(CFE_MSG_Message_t *MsgPtr, CFE_MSG_Size_t Size) { if (MsgPtr == NULL || Size < CFE_MSG_SIZE_OFFSET || Size > (0xFFFF + CFE_MSG_SIZE_OFFSET)) { diff --git a/modules/msg/fsw/src/cfe_msg_msgid_shared.c b/modules/msg/fsw/src/cfe_msg_msgid_shared.c index 293730dad..84ebb1d94 100644 --- a/modules/msg/fsw/src/cfe_msg_msgid_shared.c +++ b/modules/msg/fsw/src/cfe_msg_msgid_shared.c @@ -33,7 +33,7 @@ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetTypeFromMsgId(CFE_SB_MsgId_t MsgId, CFE_MSG_Type_t *Type) +CFE_Status_t CFE_MSG_GetTypeFromMsgId(CFE_SB_MsgId_t MsgId, CFE_MSG_Type_t *Type) { CFE_MSG_Message_t msg; diff --git a/modules/msg/fsw/src/cfe_msg_msgid_v1.c b/modules/msg/fsw/src/cfe_msg_msgid_v1.c index 5b56c36b6..57ddc8480 100644 --- a/modules/msg/fsw/src/cfe_msg_msgid_v1.c +++ b/modules/msg/fsw/src/cfe_msg_msgid_v1.c @@ -35,7 +35,7 @@ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetMsgId(const CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t *MsgId) +CFE_Status_t CFE_MSG_GetMsgId(const CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t *MsgId) { CFE_SB_MsgId_Atom_t msgidval; @@ -59,7 +59,7 @@ int32 CFE_MSG_GetMsgId(const CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t *MsgId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) +CFE_Status_t CFE_MSG_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) { CFE_SB_MsgId_Atom_t msgidval = CFE_SB_MsgIdToValue(MsgId); diff --git a/modules/msg/fsw/src/cfe_msg_msgid_v2.c b/modules/msg/fsw/src/cfe_msg_msgid_v2.c index 4757db1a5..c3093dca5 100644 --- a/modules/msg/fsw/src/cfe_msg_msgid_v2.c +++ b/modules/msg/fsw/src/cfe_msg_msgid_v2.c @@ -55,7 +55,7 @@ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetMsgId(const CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t *MsgId) +CFE_Status_t CFE_MSG_GetMsgId(const CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t *MsgId) { CFE_SB_MsgId_Atom_t msgidval; @@ -90,7 +90,7 @@ int32 CFE_MSG_GetMsgId(const CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t *MsgId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) +CFE_Status_t CFE_MSG_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) { CFE_SB_MsgId_Atom_t msgidval = CFE_SB_MsgIdToValue(MsgId); diff --git a/modules/msg/fsw/src/cfe_msg_sechdr_checksum.c b/modules/msg/fsw/src/cfe_msg_sechdr_checksum.c index 404222959..bd06b8184 100644 --- a/modules/msg/fsw/src/cfe_msg_sechdr_checksum.c +++ b/modules/msg/fsw/src/cfe_msg_sechdr_checksum.c @@ -61,9 +61,9 @@ CFE_MSG_Checksum_t CFE_MSG_ComputeCheckSum(const CFE_MSG_Message_t *MsgPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GenerateChecksum(CFE_MSG_Message_t *MsgPtr) +CFE_Status_t CFE_MSG_GenerateChecksum(CFE_MSG_Message_t *MsgPtr) { - uint32 status; + CFE_Status_t status; CFE_MSG_Type_t type; bool hassechdr = false; CFE_MSG_CommandHeader_t *cmd = (CFE_MSG_CommandHeader_t *)MsgPtr; @@ -100,10 +100,10 @@ int32 CFE_MSG_GenerateChecksum(CFE_MSG_Message_t *MsgPtr) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_ValidateChecksum(const CFE_MSG_Message_t *MsgPtr, bool *IsValid) +CFE_Status_t CFE_MSG_ValidateChecksum(const CFE_MSG_Message_t *MsgPtr, bool *IsValid) { - uint32 status; + CFE_Status_t status; CFE_MSG_Type_t type; bool hassechdr = false; diff --git a/modules/msg/fsw/src/cfe_msg_sechdr_fc.c b/modules/msg/fsw/src/cfe_msg_sechdr_fc.c index 6eb2911e1..29adbb963 100644 --- a/modules/msg/fsw/src/cfe_msg_sechdr_fc.c +++ b/modules/msg/fsw/src/cfe_msg_sechdr_fc.c @@ -34,9 +34,9 @@ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetFcnCode(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_FcnCode_t *FcnCode) +CFE_Status_t CFE_MSG_GetFcnCode(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_FcnCode_t *FcnCode) { - uint32 status; + CFE_Status_t status; CFE_MSG_Type_t type; bool hassechdr = false; CFE_MSG_CommandHeader_t *cmd = (CFE_MSG_CommandHeader_t *)MsgPtr; @@ -69,9 +69,9 @@ int32 CFE_MSG_GetFcnCode(const CFE_MSG_Message_t *MsgPtr, CFE_MSG_FcnCode_t *Fcn * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetFcnCode(CFE_MSG_Message_t *MsgPtr, CFE_MSG_FcnCode_t FcnCode) +CFE_Status_t CFE_MSG_SetFcnCode(CFE_MSG_Message_t *MsgPtr, CFE_MSG_FcnCode_t FcnCode) { - uint32 status; + CFE_Status_t status; CFE_MSG_Type_t type; bool hassechdr = false; CFE_MSG_CommandHeader_t *cmd = (CFE_MSG_CommandHeader_t *)MsgPtr; diff --git a/modules/msg/fsw/src/cfe_msg_sechdr_time.c b/modules/msg/fsw/src/cfe_msg_sechdr_time.c index 66fb9156d..6bec344e0 100644 --- a/modules/msg/fsw/src/cfe_msg_sechdr_time.c +++ b/modules/msg/fsw/src/cfe_msg_sechdr_time.c @@ -35,10 +35,10 @@ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t NewTime) +CFE_Status_t CFE_MSG_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t NewTime) { - uint32 status; + CFE_Status_t status; CFE_MSG_Type_t type; bool hassechdr = false; CFE_MSG_TelemetryHeader_t *tlm = (CFE_MSG_TelemetryHeader_t *)MsgPtr; @@ -76,10 +76,10 @@ int32 CFE_MSG_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t NewTime) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_MSG_GetMsgTime(const CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t *Time) +CFE_Status_t CFE_MSG_GetMsgTime(const CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t *Time) { - uint32 status; + CFE_Status_t status; CFE_MSG_Type_t type; bool hassechdr = false; CFE_MSG_TelemetryHeader_t *tlm = (CFE_MSG_TelemetryHeader_t *)MsgPtr; diff --git a/modules/sb/fsw/src/cfe_sb_api.c b/modules/sb/fsw/src/cfe_sb_api.c index 11ff5ece6..f991a2cd9 100644 --- a/modules/sb/fsw/src/cfe_sb_api.c +++ b/modules/sb/fsw/src/cfe_sb_api.c @@ -494,7 +494,7 @@ int32 CFE_SB_DeletePipeFull(CFE_SB_PipeId_t PipeId, CFE_ES_AppId_t AppId) * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -CFE_Stauts_t CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 Opts) +CFE_Status_t CFE_SB_SetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 Opts) { CFE_SB_PipeD_t *PipeDscPtr; CFE_ES_AppId_t AppID; diff --git a/modules/tbl/fsw/src/cfe_tbl_api.c b/modules/tbl/fsw/src/cfe_tbl_api.c index 7a01f68a5..68db48dcd 100644 --- a/modules/tbl/fsw/src/cfe_tbl_api.c +++ b/modules/tbl/fsw/src/cfe_tbl_api.c @@ -49,7 +49,7 @@ * *-----------------------------------------------------------------*/ CFE_Status_t CFE_TBL_Register(CFE_TBL_Handle_t *TblHandlePtr, const char *Name, size_t Size, uint16 TblOptionFlags, - CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr) + CFE_TBL_CallbackFuncPtr_t TblValidationFuncPtr) { CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; CFE_TBL_RegistryRec_t * RegRecPtr = NULL; @@ -1122,10 +1122,10 @@ CFE_Status_t CFE_TBL_GetAddresses(void **TblPtrs[], uint16 NumTables, const CFE_ * See description in header file for argument/return detail * *-----------------------------------------------------------------*/ -int32 CFE_TBL_ReleaseAddresses(uint16 NumTables, const CFE_TBL_Handle_t TblHandles[]) +CFE_Status_t CFE_TBL_ReleaseAddresses(uint16 NumTables, const CFE_TBL_Handle_t TblHandles[]) { - int32 Status = CFE_SUCCESS; - uint16 i; + CFE_Status_t Status = CFE_SUCCESS; + uint16 i; for (i = 0; i < NumTables; i++) { @@ -1589,7 +1589,7 @@ CFE_Status_t CFE_TBL_Modified(CFE_TBL_Handle_t TblHandle) * *-----------------------------------------------------------------*/ CFE_Status_t CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId, CFE_MSG_FcnCode_t CommandCode, - uint32 Parameter) + uint32 Parameter) { int32 Status; CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; From d7073fa29aaca5025e1d52ad62178016e9c50961 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 24 May 2021 16:19:06 -0400 Subject: [PATCH 6/8] HOTFIX IC 2021-05-19, table build with app name mismatch For a table build where the app name passed to cfe_add_tables does not match the actual app name, it must use the APP_DYNAMIC_TARGET_LIST and APP_STATIC_TARGET_LIST variables to get the target list for installation. --- cmake/arch_build.cmake | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/cmake/arch_build.cmake b/cmake/arch_build.cmake index e8781da79..7c2e6466e 100644 --- a/cmake/arch_build.cmake +++ b/cmake/arch_build.cmake @@ -150,19 +150,18 @@ function(add_cfe_tables APP_NAME TBL_SRC_FILES) if (TGTNAME) set (TABLE_TGTLIST ${TGTNAME}) - else() + elseif (TARGET ${APP_NAME}) set (TABLE_TGTLIST ${TGTLIST_${APP_NAME}}) - endif() - - # The first parameter should match the name of an app that was - # previously defined using "add_cfe_app". If target-scope properties - # are used for include directories and compile definitions, this is needed - # to compile tables with the same include path/definitions as the app has. - # However historically this could have been any string, which still works - # if directory-scope properties are used for includes, so this is not - # an error. - if (NOT TARGET ${APP_NAME}) + else() + # The first parameter should match the name of an app that was + # previously defined using "add_cfe_app". If target-scope properties + # are used for include directories and compile definitions, this is needed + # to compile tables with the same include path/definitions as the app has. + # However historically this could have been any string, which still works + # if directory-scope properties are used for includes, so this is not + # an error. message("NOTE: \"${APP_NAME}\" passed to add_cfe_tables is not a previously-defined application target") + set (TABLE_TGTLIST ${APP_STATIC_TARGET_LIST} ${APP_DYNAMIC_TARGET_LIST}) endif() # The table source must be compiled using the same "include_directories" From da3f996d2a5ba6d701fd72c997e5a1676b4b9f00 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Wed, 19 May 2021 19:27:05 +0000 Subject: [PATCH 7/8] Fix #1552, Updated stubs for function/prototype scrub --- modules/core_api/ut-stubs/src/cfe_es_stubs.c | 28 +++++++++---------- modules/core_api/ut-stubs/src/cfe_evs_stubs.c | 4 +-- modules/core_api/ut-stubs/src/cfe_msg_stubs.c | 4 +-- modules/core_api/ut-stubs/src/cfe_sb_stubs.c | 4 +-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/core_api/ut-stubs/src/cfe_es_stubs.c b/modules/core_api/ut-stubs/src/cfe_es_stubs.c index e4c84be40..4e778ed58 100644 --- a/modules/core_api/ut-stubs/src/cfe_es_stubs.c +++ b/modules/core_api/ut-stubs/src/cfe_es_stubs.c @@ -115,11 +115,11 @@ CFE_Status_t CFE_ES_CopyToCDS(CFE_ES_CDSHandle_t Handle, void *DataToCopy) * Generated stub function for CFE_ES_CounterID_ToIndex() * ---------------------------------------------------- */ -CFE_Status_t CFE_ES_CounterID_ToIndex(CFE_ES_CounterId_t CounterID, uint32 *Idx) +CFE_Status_t CFE_ES_CounterID_ToIndex(CFE_ES_CounterId_t CounterId, uint32 *Idx) { UT_GenStub_SetupReturnBuffer(CFE_ES_CounterID_ToIndex, CFE_Status_t); - UT_GenStub_AddParam(CFE_ES_CounterID_ToIndex, CFE_ES_CounterId_t, CounterID); + UT_GenStub_AddParam(CFE_ES_CounterID_ToIndex, CFE_ES_CounterId_t, CounterId); UT_GenStub_AddParam(CFE_ES_CounterID_ToIndex, uint32 *, Idx); UT_GenStub_Execute(CFE_ES_CounterID_ToIndex, Basic, NULL); @@ -468,12 +468,12 @@ int32 CFE_ES_GetModuleInfo(CFE_ES_AppInfo_t *ModuleInfo, CFE_ResourceId_t Resour * Generated stub function for CFE_ES_GetPoolBuf() * ---------------------------------------------------- */ -int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t PoolID, size_t Size) +int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t Handle, size_t Size) { UT_GenStub_SetupReturnBuffer(CFE_ES_GetPoolBuf, int32); UT_GenStub_AddParam(CFE_ES_GetPoolBuf, CFE_ES_MemPoolBuf_t *, BufPtr); - UT_GenStub_AddParam(CFE_ES_GetPoolBuf, CFE_ES_MemHandle_t, PoolID); + UT_GenStub_AddParam(CFE_ES_GetPoolBuf, CFE_ES_MemHandle_t, Handle); UT_GenStub_AddParam(CFE_ES_GetPoolBuf, size_t, Size); UT_GenStub_Execute(CFE_ES_GetPoolBuf, Basic, UT_DefaultHandler_CFE_ES_GetPoolBuf); @@ -486,11 +486,11 @@ int32 CFE_ES_GetPoolBuf(CFE_ES_MemPoolBuf_t *BufPtr, CFE_ES_MemHandle_t PoolID, * Generated stub function for CFE_ES_GetPoolBufInfo() * ---------------------------------------------------- */ -CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_t BufPtr) +CFE_Status_t CFE_ES_GetPoolBufInfo(CFE_ES_MemHandle_t Handle, CFE_ES_MemPoolBuf_t BufPtr) { UT_GenStub_SetupReturnBuffer(CFE_ES_GetPoolBufInfo, CFE_Status_t); - UT_GenStub_AddParam(CFE_ES_GetPoolBufInfo, CFE_ES_MemHandle_t, PoolID); + UT_GenStub_AddParam(CFE_ES_GetPoolBufInfo, CFE_ES_MemHandle_t, Handle); UT_GenStub_AddParam(CFE_ES_GetPoolBufInfo, CFE_ES_MemPoolBuf_t, BufPtr); UT_GenStub_Execute(CFE_ES_GetPoolBufInfo, Basic, NULL); @@ -614,11 +614,11 @@ void CFE_ES_IncrementTaskCounter(void) * Generated stub function for CFE_ES_LibID_ToIndex() * ---------------------------------------------------- */ -int32 CFE_ES_LibID_ToIndex(CFE_ES_LibId_t LibID, uint32 *Idx) +int32 CFE_ES_LibID_ToIndex(CFE_ES_LibId_t LibId, uint32 *Idx) { UT_GenStub_SetupReturnBuffer(CFE_ES_LibID_ToIndex, int32); - UT_GenStub_AddParam(CFE_ES_LibID_ToIndex, CFE_ES_LibId_t, LibID); + UT_GenStub_AddParam(CFE_ES_LibID_ToIndex, CFE_ES_LibId_t, LibId); UT_GenStub_AddParam(CFE_ES_LibID_ToIndex, uint32 *, Idx); UT_GenStub_Execute(CFE_ES_LibID_ToIndex, Basic, NULL); @@ -744,11 +744,11 @@ void CFE_ES_ProcessAsyncEvent(void) * Generated stub function for CFE_ES_PutPoolBuf() * ---------------------------------------------------- */ -int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_t BufPtr) +int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t Handle, CFE_ES_MemPoolBuf_t BufPtr) { UT_GenStub_SetupReturnBuffer(CFE_ES_PutPoolBuf, int32); - UT_GenStub_AddParam(CFE_ES_PutPoolBuf, CFE_ES_MemHandle_t, PoolID); + UT_GenStub_AddParam(CFE_ES_PutPoolBuf, CFE_ES_MemHandle_t, Handle); UT_GenStub_AddParam(CFE_ES_PutPoolBuf, CFE_ES_MemPoolBuf_t, BufPtr); UT_GenStub_Execute(CFE_ES_PutPoolBuf, Basic, NULL); @@ -761,11 +761,11 @@ int32 CFE_ES_PutPoolBuf(CFE_ES_MemHandle_t PoolID, CFE_ES_MemPoolBuf_t BufPtr) * Generated stub function for CFE_ES_RegisterCDS() * ---------------------------------------------------- */ -CFE_Status_t CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *HandlePtr, size_t BlockSize, const char *Name) +CFE_Status_t CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *CDSHandlePtr, size_t BlockSize, const char *Name) { UT_GenStub_SetupReturnBuffer(CFE_ES_RegisterCDS, CFE_Status_t); - UT_GenStub_AddParam(CFE_ES_RegisterCDS, CFE_ES_CDSHandle_t *, HandlePtr); + UT_GenStub_AddParam(CFE_ES_RegisterCDS, CFE_ES_CDSHandle_t *, CDSHandlePtr); UT_GenStub_AddParam(CFE_ES_RegisterCDS, size_t, BlockSize); UT_GenStub_AddParam(CFE_ES_RegisterCDS, const char *, Name); @@ -862,11 +862,11 @@ CFE_Status_t CFE_ES_RestoreFromCDS(void *RestoreToMemory, CFE_ES_CDSHandle_t Han * Generated stub function for CFE_ES_RunLoop() * ---------------------------------------------------- */ -bool CFE_ES_RunLoop(uint32 *ExitStatus) +bool CFE_ES_RunLoop(uint32 *RunStatus) { UT_GenStub_SetupReturnBuffer(CFE_ES_RunLoop, bool); - UT_GenStub_AddParam(CFE_ES_RunLoop, uint32 *, ExitStatus); + UT_GenStub_AddParam(CFE_ES_RunLoop, uint32 *, RunStatus); UT_GenStub_Execute(CFE_ES_RunLoop, Basic, UT_DefaultHandler_CFE_ES_RunLoop); diff --git a/modules/core_api/ut-stubs/src/cfe_evs_stubs.c b/modules/core_api/ut-stubs/src/cfe_evs_stubs.c index 72fd2ec5c..4ee8afc67 100644 --- a/modules/core_api/ut-stubs/src/cfe_evs_stubs.c +++ b/modules/core_api/ut-stubs/src/cfe_evs_stubs.c @@ -38,12 +38,12 @@ extern void UT_DefaultHandler_CFE_EVS_SendTimedEvent(void *, UT_EntryKey_t, cons * Generated stub function for CFE_EVS_Register() * ---------------------------------------------------- */ -CFE_Status_t CFE_EVS_Register(const void *Filters, uint16 NumFilteredEvents, uint16 FilterScheme) +CFE_Status_t CFE_EVS_Register(const void *Filters, uint16 NumEventFilters, uint16 FilterScheme) { UT_GenStub_SetupReturnBuffer(CFE_EVS_Register, CFE_Status_t); UT_GenStub_AddParam(CFE_EVS_Register, const void *, Filters); - UT_GenStub_AddParam(CFE_EVS_Register, uint16, NumFilteredEvents); + UT_GenStub_AddParam(CFE_EVS_Register, uint16, NumEventFilters); UT_GenStub_AddParam(CFE_EVS_Register, uint16, FilterScheme); UT_GenStub_Execute(CFE_EVS_Register, Basic, NULL); diff --git a/modules/core_api/ut-stubs/src/cfe_msg_stubs.c b/modules/core_api/ut-stubs/src/cfe_msg_stubs.c index 759cfd74c..1c5b6059f 100644 --- a/modules/core_api/ut-stubs/src/cfe_msg_stubs.c +++ b/modules/core_api/ut-stubs/src/cfe_msg_stubs.c @@ -492,12 +492,12 @@ CFE_Status_t CFE_MSG_SetMsgId(CFE_MSG_Message_t *MsgPtr, CFE_SB_MsgId_t MsgId) * Generated stub function for CFE_MSG_SetMsgTime() * ---------------------------------------------------- */ -CFE_Status_t CFE_MSG_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t Time) +CFE_Status_t CFE_MSG_SetMsgTime(CFE_MSG_Message_t *MsgPtr, CFE_TIME_SysTime_t NewTime) { UT_GenStub_SetupReturnBuffer(CFE_MSG_SetMsgTime, CFE_Status_t); UT_GenStub_AddParam(CFE_MSG_SetMsgTime, CFE_MSG_Message_t *, MsgPtr); - UT_GenStub_AddParam(CFE_MSG_SetMsgTime, CFE_TIME_SysTime_t, Time); + UT_GenStub_AddParam(CFE_MSG_SetMsgTime, CFE_TIME_SysTime_t, NewTime); UT_GenStub_Execute(CFE_MSG_SetMsgTime, Basic, NULL); diff --git a/modules/core_api/ut-stubs/src/cfe_sb_stubs.c b/modules/core_api/ut-stubs/src/cfe_sb_stubs.c index 35035222a..10c14c53c 100644 --- a/modules/core_api/ut-stubs/src/cfe_sb_stubs.c +++ b/modules/core_api/ut-stubs/src/cfe_sb_stubs.c @@ -133,12 +133,12 @@ CFE_Status_t CFE_SB_GetPipeName(char *PipeNameBuf, size_t PipeNameSize, CFE_SB_P * Generated stub function for CFE_SB_GetPipeOpts() * ---------------------------------------------------- */ -CFE_Status_t CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptPtr) +CFE_Status_t CFE_SB_GetPipeOpts(CFE_SB_PipeId_t PipeId, uint8 *OptsPtr) { UT_GenStub_SetupReturnBuffer(CFE_SB_GetPipeOpts, CFE_Status_t); UT_GenStub_AddParam(CFE_SB_GetPipeOpts, CFE_SB_PipeId_t, PipeId); - UT_GenStub_AddParam(CFE_SB_GetPipeOpts, uint8 *, OptPtr); + UT_GenStub_AddParam(CFE_SB_GetPipeOpts, uint8 *, OptsPtr); UT_GenStub_Execute(CFE_SB_GetPipeOpts, Basic, NULL); From 6428e8241df309ab96a8dfc361efe90a66b5f465 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 25 May 2021 22:23:11 -0400 Subject: [PATCH 8/8] IC:2021-05-25, Bump to v6.8.0-rc1+dev593 --- README.md | 11 +++++++++++ modules/core_api/fsw/inc/cfe_version.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 213f95c7e..ffbb07e7b 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,17 @@ The detailed cFE user's guide can be viewed at https://github.com/nasa/cFE/pull/1568> and + + ### Development Build: v6.8.0-rc1+dev580 - Adds `CFE_MSG_GetNextSequenceCount` so the auto-increment of the local sequence counter works when sending tlm (and increment is enabled). Updates unit tests and adds the old-style stub. The unit tests check for the correct rollover behavior.Sequence count will roll over based on the mask. Before the fix the sequence counter would "stick" in telemetry until the passed in value rolled over. diff --git a/modules/core_api/fsw/inc/cfe_version.h b/modules/core_api/fsw/inc/cfe_version.h index f91fed482..2b9284959 100644 --- a/modules/core_api/fsw/inc/cfe_version.h +++ b/modules/core_api/fsw/inc/cfe_version.h @@ -28,7 +28,7 @@ #define CFE_VERSION_H /* Development Build Macro Definitions */ -#define CFE_BUILD_NUMBER 580 /*!< Development Build: Number of commits since baseline */ +#define CFE_BUILD_NUMBER 593 /*!< Development Build: Number of commits since baseline */ #define CFE_BUILD_BASELINE \ "v6.8.0-rc1" /*!< Development Build: git tag that is the base for the current development \ */