Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1407, Add error report on EVS failure during log header write #2272

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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