Skip to content

Commit a4d087e

Browse files
authored
Merge pull request nasa#606 from CDKnightNASA/fix-503-tbl_events
Fix nasa#503, better events for CFE_TBL_Load()
2 parents 7566f2f + 72dcd3a commit a4d087e

File tree

6 files changed

+383
-372
lines changed

6 files changed

+383
-372
lines changed

fsw/cfe-core/src/inc/cfe_error.h

+12
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,18 @@
14201420
*/
14211421
#define CFE_TBL_MESSAGE_ERROR ((int32)0xcc00002a)
14221422

1423+
/**
1424+
** Error code indicating that the TBL file is shorter than
1425+
** indicated in the file header.
1426+
*/
1427+
#define CFE_TBL_ERR_SHORT_FILE ((int32)0xcc00002b)
1428+
1429+
/**
1430+
** Error code indicating that the TBL file could not be
1431+
** opened by the OS.
1432+
*/
1433+
#define CFE_TBL_ERR_ACCESS ((int32)0xcc00002c)
1434+
14231435

14241436
/**
14251437
* @brief Not Implemented

fsw/cfe-core/src/inc/cfe_tbl_events.h

+41-14
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
** and when you're done adding, set this to the highest EID you used. It may
4747
** be worthwhile to, on occasion, re-number the EID's to put them back in order.
4848
*/
49-
#define CFE_TBL_MAX_EID 98
49+
#define CFE_TBL_MAX_EID 105
5050

5151
/******************* Macro Definitions ***********************/
5252
/*
@@ -940,19 +940,8 @@
940940
**/
941941
#define CFE_TBL_UNREGISTER_ERR_EID 92
942942

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

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

1044+
/** \brief <tt> Attempted to load Dump Only Tbl '%s' </tt>
1045+
** \event <tt> Attempted to load Dump Only Tbl '%s' </tt>
1046+
**
1047+
** \par Type: ERROR
1048+
**
1049+
** \par Cause:
1050+
**
1051+
** This event message is generated when an application attempts to load a dump-only table.
1052+
**/
1053+
#define CFE_TBL_LOAD_DUMPONLY_ERR_EID 99
1054+
1055+
/** \brief <tt> Load already in progress for '%s' </tt>
1056+
** \event <tt> Load already in progress for '%s' </tt>
1057+
**
1058+
** \par Type: ERROR
1059+
**
1060+
** \par Cause:
1061+
**
1062+
** This event message is generated when an application attempts to load a table already
1063+
** in progress. Likely due to a race condition.
1064+
**/
1065+
#define CFE_TBL_LOAD_IN_PROGRESS_ERR_EID 100
1066+
1067+
/** TODO: document */
1068+
#define CFE_TBL_LOAD_SRC_TYPE_ERR_EID 101
1069+
1070+
/** TODO: document */
1071+
#define CFE_TBL_LOAD_FILENAME_LONG_ERR_EID 102
1072+
1073+
/** TODO: document */
1074+
#define CFE_TBL_LOAD_SHORT_FILE_ERR_EID 103
1075+
1076+
/** TODO: document */
1077+
#define CFE_TBL_LOAD_TBLNAME_MISMATCH_ERR_EID 104
1078+
1079+
/** TODO: document */
1080+
#define CFE_TBL_HANDLE_ACCESS_ERR_EID 105
1081+
10551082
/** \} */
10561083

10571084

0 commit comments

Comments
 (0)