![]() |
F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Svc/ActiveTextLogger/LogFile.hpp>
Public Member Functions | |
| LogFile () | |
| Constructor. More... | |
| ~LogFile () | |
| Destructor. More... | |
| bool | set_log_file (const char *fileName, const U32 maxSize, const U32 maxBackups=10) |
| Set log file and max size. More... | |
| bool | write_to_log (const char *const buf, const U32 size) |
| Write the passed buf to the log if possible. More... | |
Public Attributes | |
| Fw::String | m_fileName |
| Os::File | m_file |
| U32 | m_maxFileSize |
| bool | m_openFile |
| U32 | m_currentFileSize |
LogFile struct.
The object is used for writing to a log file. Making it a struct so all members are public, for ease of use in object composition.
Definition at line 22 of file LogFile.hpp.
| Svc::LogFile::LogFile | ( | ) |
Constructor.
Definition at line 22 of file LogFile.cpp.
| Svc::LogFile::~LogFile | ( | ) |
Destructor.
Definition at line 28 of file LogFile.cpp.
| bool Svc::LogFile::set_log_file | ( | const char * | fileName, |
| const U32 | maxSize, | ||
| const U32 | maxBackups = 10 |
||
| ) |
Set log file and max size.
| fileName | The name of the file to create. Must be less than 80 characters. |
| maxSize | The max size of the file |
| maxBackups | The max backups for the file. Default: 10 |
Definition at line 81 of file LogFile.cpp.
| bool Svc::LogFile::write_to_log | ( | const char *const | buf, |
| const U32 | size | ||
| ) |
Write the passed buf to the log if possible.
| buf | The buffer of data to write |
| size | The size of buf |
Definition at line 40 of file LogFile.cpp.
| U32 Svc::LogFile::m_currentFileSize |
Definition at line 70 of file LogFile.hpp.
| Os::File Svc::LogFile::m_file |
Definition at line 61 of file LogFile.hpp.
| Fw::String Svc::LogFile::m_fileName |
Definition at line 58 of file LogFile.hpp.
| U32 Svc::LogFile::m_maxFileSize |
Definition at line 64 of file LogFile.hpp.
| bool Svc::LogFile::m_openFile |
Definition at line 67 of file LogFile.hpp.