Skip to content

Commit

Permalink
Fix nasa#261, Clarify table never loaded error
Browse files Browse the repository at this point in the history
Documentation/comment change only.
Moved get address specific information from error code to API.
  • Loading branch information
skliper committed Mar 13, 2020
1 parent 784fe09 commit 0f60675
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 1 addition & 6 deletions fsw/cfe-core/src/inc/cfe_error.h
Original file line number Diff line number Diff line change
Expand Up @@ -1036,12 +1036,7 @@
/**
* @brief Never Loaded
*
* This is an error indicating that the table has never been loaded from
* either a file or a copy from a block of memory so the contents that the
* returned pointer is pointing to are zeros.
* <B> NOTE: Unlike other most other errors, this error condition still
* returns a valid table pointer. This pointer must be released with the
* #CFE_TBL_ReleaseAddress API before the table can be loaded with data. </B>
* Table has not been loaded with data.
*
*/
#define CFE_TBL_ERR_NEVER_LOADED ((int32)0xcc000005)
Expand Down
10 changes: 10 additions & 0 deletions fsw/cfe-core/src/inc/cfe_tbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,11 @@ int32 CFE_TBL_Modified( CFE_TBL_Handle_t TblHandle );
** either a #CFE_TBL_Update call or any blocking call (e.g. - pending on software
** bus message, etc). Table updates cannot occur while table addresses have not
** been released.
** -# #CFE_TBL_ERR_NEVER_LOADED will be returned if the table has never been
** loaded (either from file or from a block of memory), but the function
** will still return a valid table pointer to a table with all zero content.
** This pointer mush be released with the #CFE_TBL_ReleaseAddress API before
** the table can be loaded with data.
**
** \param[in] TblPtr The address of a pointer that will be loaded with the address of
** the first byte of the table. This pointer can then be typecast
Expand Down Expand Up @@ -681,6 +686,11 @@ int32 CFE_TBL_ReleaseAddress( CFE_TBL_Handle_t TblHandle );
** either a #CFE_TBL_Update call or any blocking call (e.g. - pending on software
** bus message, etc). Table updates cannot occur while table addresses have not
** been released.
** -# #CFE_TBL_ERR_NEVER_LOADED will be returned if the table has never been
** loaded (either from file or from a block of memory), but the function
** will still return a valid table pointer to a table with all zero content.
** This pointer mush be released with the #CFE_TBL_ReleaseAddress API before
** the table can be loaded with data.
**
** \param[in] TblPtrs Array of Pointers to variables that calling Application
** wishes to hold the start addresses of the Tables.
Expand Down

0 comments on commit 0f60675

Please sign in to comment.