From b9aa9ca64d9954432de1a473141af1726215b1f3 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Tue, 25 May 2021 17:34:27 +0000 Subject: [PATCH] Fix #1391, EVS/FS documentation cleanup --- modules/core_api/fsw/inc/cfe_fs.h | 5 +- .../core_api/fsw/inc/cfe_fs_extern_typedefs.h | 2 +- .../fsw/inc/cfe_evs_log_typedef.h | 2 +- modules/evs/fsw/src/cfe_evs_task.c | 50 ++++--------------- 4 files changed, 14 insertions(+), 45 deletions(-) diff --git a/modules/core_api/fsw/inc/cfe_fs.h b/modules/core_api/fsw/inc/cfe_fs.h index 0354bd95c..13aa0f103 100644 --- a/modules/core_api/fsw/inc/cfe_fs.h +++ b/modules/core_api/fsw/inc/cfe_fs.h @@ -58,12 +58,11 @@ ** -# The File has already been successfully opened using #OS_OpenCreate and ** the caller has a legitimate File Descriptor. ** -** \param[in] FileDes File Descriptor obtained from a previous call to #OS_OpenCreate -** that is associated with the file whose header is to be read. -** ** \param[in, out] Hdr Pointer to a variable of type #CFE_FS_Header_t that will be ** filled with the contents of the Standard cFE File Header. *Hdr is the contents of the ** Standard cFE File Header for the specified file. +** \param[in] FileDes File Descriptor obtained from a previous call to #OS_OpenCreate +** that is associated with the file whose header is to be read. ** ** \return Execution status, see \ref CFEReturnCodes ** diff --git a/modules/core_api/fsw/inc/cfe_fs_extern_typedefs.h b/modules/core_api/fsw/inc/cfe_fs_extern_typedefs.h index d1780b544..c882eeec2 100644 --- a/modules/core_api/fsw/inc/cfe_fs_extern_typedefs.h +++ b/modules/core_api/fsw/inc/cfe_fs_extern_typedefs.h @@ -213,7 +213,7 @@ typedef struct CFE_FS_Header uint32 SubType; /**< \brief Type of \c ContentType, if necessary */ /**< Standard SubType definitions can be found \link #CFE_FS_SubType_ES_ERLOG here \endlink */ - uint32 Length; /**< \brief Length of primary header */ + uint32 Length; /**< \brief Length of this header to support external processing */ uint32 SpacecraftID; /**< \brief Spacecraft that generated the file */ uint32 ProcessorID; /**< \brief Processor that generated the file */ uint32 ApplicationID; /**< \brief Application that generated the file */ diff --git a/modules/core_private/fsw/inc/cfe_evs_log_typedef.h b/modules/core_private/fsw/inc/cfe_evs_log_typedef.h index 66da533b0..a4ba33db8 100644 --- a/modules/core_private/fsw/inc/cfe_evs_log_typedef.h +++ b/modules/core_private/fsw/inc/cfe_evs_log_typedef.h @@ -40,7 +40,7 @@ typedef struct { uint16 Next; /**< \brief Index of the next entry in the local event log */ - uint16 LogCount; /**< \brief Local Event Kog counter */ + uint16 LogCount; /**< \brief Local Event Log counter */ uint8 LogFullFlag; /**< \brief Local Event Log full flag */ uint8 LogMode; /**< \brief Local Event Logging mode (overwrite/discard) */ uint16 LogOverflowCounter; /**< \brief Local Event Log overflow counter */ diff --git a/modules/evs/fsw/src/cfe_evs_task.c b/modules/evs/fsw/src/cfe_evs_task.c index 4bef19928..74feac64f 100644 --- a/modules/evs/fsw/src/cfe_evs_task.c +++ b/modules/evs/fsw/src/cfe_evs_task.c @@ -718,10 +718,7 @@ int32 CFE_EVS_SetFilterCmd(const CFE_EVS_SetFilterCmd_t *data) EVS_AppData_t * AppDataPtr; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retreive application data */ @@ -1011,10 +1008,7 @@ int32 CFE_EVS_EnableAppEventTypeCmd(const CFE_EVS_EnableAppEventTypeCmd_t *data) int32 Status; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retrieve application data */ @@ -1079,10 +1073,7 @@ int32 CFE_EVS_DisableAppEventTypeCmd(const CFE_EVS_DisableAppEventTypeCmd_t *dat int32 Status; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retreive application data */ @@ -1147,10 +1138,7 @@ int32 CFE_EVS_EnableAppEventsCmd(const CFE_EVS_EnableAppEventsCmd_t *data) int32 Status; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retrieve application data */ @@ -1199,10 +1187,7 @@ int32 CFE_EVS_DisableAppEventsCmd(const CFE_EVS_DisableAppEventsCmd_t *data) int32 Status; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retreive application data */ @@ -1251,10 +1236,7 @@ int32 CFE_EVS_ResetAppCounterCmd(const CFE_EVS_ResetAppCounterCmd_t *data) int32 Status; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retreive application data */ @@ -1304,10 +1286,7 @@ int32 CFE_EVS_ResetFilterCmd(const CFE_EVS_ResetFilterCmd_t *data) EVS_AppData_t * AppDataPtr; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retreive application data */ @@ -1371,10 +1350,7 @@ int32 CFE_EVS_ResetAllFiltersCmd(const CFE_EVS_ResetAllFiltersCmd_t *data) uint32 i; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retreive application data */ @@ -1427,10 +1403,7 @@ int32 CFE_EVS_AddEventFilterCmd(const CFE_EVS_AddEventFilterCmd_t *data) EVS_AppData_t * AppDataPtr; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retreive application data */ @@ -1514,10 +1487,7 @@ int32 CFE_EVS_DeleteEventFilterCmd(const CFE_EVS_DeleteEventFilterCmd_t *data) EVS_AppData_t * AppDataPtr; char LocalName[OS_MAX_API_NAME]; - /* - * Althgouh EVS_GetApplicationInfo() does not require a null terminated argument, - * the value is passed to EVS_SendEvent which does require termination (normal C string) - */ + /* Copy appname from command, ensures NULL termination */ CFE_SB_MessageStringGet(LocalName, (char *)CmdPtr->AppName, NULL, sizeof(LocalName), sizeof(CmdPtr->AppName)); /* Retreive application data */