Skip to content

Commit

Permalink
fix nasa#503 - better events for CFE_TBL_Load()
Browse files Browse the repository at this point in the history
  • Loading branch information
CDKnightNASA committed Apr 21, 2020
1 parent 0648a47 commit fa348b3
Show file tree
Hide file tree
Showing 7 changed files with 412 additions and 372 deletions.
12 changes: 12 additions & 0 deletions fsw/cfe-core/src/inc/cfe_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,18 @@
*/
#define CFE_TBL_MESSAGE_ERROR ((int32)0xcc00002a)

/**
** Error code indicating that the TBL file is shorter than
** indicated in the file header.
*/
#define CFE_TBL_ERR_SHORT_FILE ((int32)0xcc00002b)

/**
** Error code indicating that the TBL file could not be
** opened by the OS.
*/
#define CFE_TBL_ERR_ACCESS ((int32)0xcc00002c)


/**
* @brief Not Implemented
Expand Down
55 changes: 41 additions & 14 deletions fsw/cfe-core/src/inc/cfe_tbl_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
** and when you're done adding, set this to the highest EID you used. It may
** be worthwhile to, on occasion, re-number the EID's to put them back in order.
*/
#define CFE_TBL_MAX_EID 98
#define CFE_TBL_MAX_EID 105

/******************* Macro Definitions ***********************/
/*
Expand Down Expand Up @@ -940,19 +940,8 @@
**/
#define CFE_TBL_UNREGISTER_ERR_EID 92

/** \brief <tt> '\%s Failed to Load '\%s' from \%s, Status=0x\%08X" </tt>
** \event <tt> '\%s Failed to Load '\%s' from \%s, Status=0x\%08X" </tt>
**
** \par Type: ERROR
**
** \par Cause:
**
** This event message is generated when an Application calls #CFE_TBL_Load unsuccessfully.
**
** The \c Status field of the Event Message can be used to identify the reason for the failure
** by looking it up in the cfe_error.h file
**/
#define CFE_TBL_LOAD_ERR_EID 93
/** TODO: document */
#define CFE_TBL_LOAD_VAL_ERR_EID 93

/** \brief <tt> '\%s Failed to Load '\%s' (Invalid Source Type)" </tt>
** \event <tt> '\%s Failed to Load '\%s' (Invalid Source Type)" </tt>
Expand Down Expand Up @@ -1052,6 +1041,44 @@
**/
#define CFE_TBL_PROCESSOR_ID_ERR_EID 98

/** \brief <tt> Attempted to load Dump Only Tbl '%s' </tt>
** \event <tt> Attempted to load Dump Only Tbl '%s' </tt>
**
** \par Type: ERROR
**
** \par Cause:
**
** This event message is generated when an application attempts to load a dump-only table.
**/
#define CFE_TBL_LOAD_DUMPONLY_ERR_EID 99

/** \brief <tt> Load already in progress for '%s' </tt>
** \event <tt> Load already in progress for '%s' </tt>
**
** \par Type: ERROR
**
** \par Cause:
**
** This event message is generated when an application attempts to load a table already
** in progress. Likely due to a race condition.
**/
#define CFE_TBL_LOAD_IN_PROGRESS_ERR_EID 100

/** TODO: document */
#define CFE_TBL_LOAD_SRC_TYPE_ERR_EID 101

/** TODO: document */
#define CFE_TBL_LOAD_FILENAME_LONG_ERR_EID 102

/** TODO: document */
#define CFE_TBL_LOAD_SHORT_FILE_ERR_EID 103

/** TODO: document */
#define CFE_TBL_LOAD_TBLNAME_MISMATCH_ERR_EID 104

/** TODO: document */
#define CFE_TBL_HANDLE_ACCESS_ERR_EID 105

/** \} */


Expand Down
Loading

0 comments on commit fa348b3

Please sign in to comment.