Skip to content

Commit

Permalink
Fix #1407, Add error report on EVS failure during log header write
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed May 5, 2023
1 parent e3b6767 commit 4eeba08
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions modules/evs/fsw/inc/cfe_evs_eventids.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,17 @@
*/
#define CFE_EVS_ERR_CRDATFILE_EID 13

/**
* \brief EVS Write File Header to Log File Failure Event ID
*
* \par Type: ERROR
*
* \par Cause:
*
* Bytes written during Write File Header to Log File was not equal to the expected header size.
*/
#define CFE_EVS_WRITE_HEADER_ERR_EID 14

/**
* \brief EVS Invalid Command Code Received Event ID
*
Expand Down
6 changes: 6 additions & 0 deletions modules/evs/fsw/src/cfe_evs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ int32 CFE_EVS_WriteLogDataFileCmd(const CFE_EVS_WriteLogDataFileCmd_t *data)
LogFilename);
}
}
else
{
EVS_SendEvent(CFE_EVS_WRITE_HEADER_ERR_EID, CFE_EVS_EventType_ERROR,
"Write File Header to Log File Error: WriteHdr RC: %d, Expected: %d, filename = %s",
(int)BytesWritten, (int)sizeof(LogFileHdr), LogFilename);
}

OS_close(LogFileHandle);
}
Expand Down

0 comments on commit 4eeba08

Please sign in to comment.