Skip to content

Commit

Permalink
Merge pull request #1704 from jphickey/fix-1703-bgfiledump-doc
Browse files Browse the repository at this point in the history
Fix #1703, update docs for CFE_FS_BackgroundFileDumpRequest
  • Loading branch information
astrogeco authored Jul 29, 2021
2 parents e298961 + 05e8904 commit 0865774
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core_api/fsw/inc/cfe_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ CFE_Status_t CFE_FS_ExtractFilenameFromPath(const char *OriginalPath, char *File
** Puts the previously-initialized metadata into the pending request queue
**
** \par Assumptions, External Events, and Notes:
** Metadata structure should be stored in a static memory area (not on heap) as it
** must persist and be accessible by the file writer task throughout the asynchronous
** Metadata structure should be stored in a persistent memory area (not on stack) as
** it must remain accessible by the file writer task throughout the asynchronous
** job operation.
**
** \param[inout] Meta The background file write persistent state object
Expand Down
20 changes: 20 additions & 0 deletions modules/core_api/fsw/inc/cfe_fs_api_typedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ typedef enum
* Data Getter routine provided by requester
*
* Outputs a data block. Should return true if the file is complete (last record/EOF), otherwise return false.
*
* \param[inout] Meta Pointer to the metadata object
* \param[in] RecordNum Incrementing record number counter
* \param[out] Buffer Pointer to buffer data block, should be set by implementation
* \param[out] BufSize Pointer to buffer data size, should be set by implementation
*
* \returns End of file status
* \retval true if at last data record, and output file should be closed
* \retval false if not at last record, more data records to write
*
* \note The implementation of this function must always set the "Buffer" and "BufSize" outputs. If
* no data is avaliable, they may be set to NULL and 0, respectively.
*/
typedef bool (*CFE_FS_FileWriteGetData_t)(void *Meta, uint32 RecordNum, void **Buffer, size_t *BufSize);

Expand All @@ -92,6 +104,14 @@ typedef bool (*CFE_FS_FileWriteGetData_t)(void *Meta, uint32 RecordNum, void **B
*
* Invoked from certain points in the file write process. Implementation may invoke CFE_EVS_SendEvent() appropriately
* to inform of progress.
*
* \param[inout] Meta Pointer to the metadata object
* \param[in] Event Generalized type of event to report (not actual event ID)
* \param[in] Status Generalized status code (may be from OSAL or CFE)
* \param[in] RecordNum Record number counter at which event occurred
* \param[in] BlockSize Size of record being processed when event occured (if applicable)
* \param[in] Position File position/size when event occurred
*
*/
typedef void (*CFE_FS_FileWriteOnEvent_t)(void *Meta, CFE_FS_FileWriteEvent_t Event, int32 Status, uint32 RecordNum,
size_t BlockSize, size_t Position);
Expand Down

0 comments on commit 0865774

Please sign in to comment.