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 #1703, update docs for CFE_FS_BackgroundFileDumpRequest #1704

Merged
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
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 @@ -291,8 +291,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