 |
F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
|
Go to the documentation of this file.
7 #include <Fw/Types/Assert.hpp>
23 m_fileName(), m_file(), m_maxFileSize(0), m_openFile(false), m_currentFileSize(0)
71 status = (writeSize > 0);
100 (void) strncpy(fileNameFinal,fileName,
106 bool failedSuffix =
false;
116 if (suffix >= maxBackups) {
122 "%s%d",fileName,suffix);
137 (void) strncpy(fileNameFinal,fileName,
@ STRING_SIZE
Storage for string.
bool set_log_file(const char *fileName, const U32 maxSize, const U32 maxBackups=10)
Set log file and max size.
@ NOT_OPENED
file hasn't been opened yet
Status write(const void *buffer, NATIVE_INT_TYPE &size, bool waitForDone=true)
write size; will return amount written or errno
@ OP_OK
Operation was successful.
Status open(const char *fileName, Mode mode)
open file. Writing creates file if it doesn't exist
bool write_to_log(const char *const buf, const U32 size)
Write the passed buf to the log if possible.
@ OPEN_CREATE
Open file for writing and truncates file if it exists, ie same flags as creat()
U32 string_length(const CHAR *source, U32 max_len)
get the length of the source string or max_len if the string is longer than max_len.
@ OP_OK
Operation was successful.
Status getFileSize(const char *path, U64 &size)
append file origin to destination file. If boolean true, creates a brand new file if the destination ...