C12Adapter Opensource C++ Interface
|
Page format of the monitor file. More...
Public Member Functions | |
void | OnceBeforeWrite () |
Update packet so it is ready to be written. More... | |
bool | OnceAfterRead () |
Verify packet integrity and prepare it for handling. | |
Public Attributes | |
Muint32 | m_signature |
Page header signature, equal to constant FILE_HEADER_SIGNATURE. More... | |
Muint32 | m_lastPageIndex |
Last finished page index, if the file is released. More... | |
Muint32 | m_pageCounter |
Page counter. More... | |
Muint32 | m_firstMessageOffset |
First consistent message offset on this page. More... | |
char | m_body [PAGE_BODY_SIZE] |
Body, stream of messages. More... | |
Muint32 | m_checksum |
Checksum, sum of all quadruples of bytes in the page excluding the checksum itself. More... | |
Page format of the monitor file.
Unused message body is filled with zeros.
void MLogFile::LogFilePage::OnceBeforeWrite | ( | ) |
Update packet so it is ready to be written.
Possibly obfuscate and calculate and update checksum.
char MLogFile::LogFilePage::m_body[PAGE_BODY_SIZE] |
Body, stream of messages.
Messages follow one after another, byte aligned. Each message starts with the message code, then the timestamp, then the size, and then the body. Unused message body is filled with zeros (there is no message code zero).
Muint32 MLogFile::LogFilePage::m_checksum |
Checksum, sum of all quadruples of bytes in the page excluding the checksum itself.
Checksum is used to determine that the page has been written fully and successfully. This is part of the page footer.
Muint32 MLogFile::LogFilePage::m_firstMessageOffset |
First consistent message offset on this page.
If the page has a middle of a message, or a tail of the last one, this property will equal to 0xFFFFFFFF. Correspondingly, if the page starts with the message, this is zero. This is part of the page header.
Muint32 MLogFile::LogFilePage::m_lastPageIndex |
Last finished page index, if the file is released.
If this is not the first page, or if the file was not closed normally, it will be 0xFFFFFFFF. This is part of the page header.
Muint32 MLogFile::LogFilePage::m_pageCounter |
Page counter.
Starts at zero, for every successfully written page this counter is incremented. A proper file will have a range of page counters.
Muint32 MLogFile::LogFilePage::m_signature |
Page header signature, equal to constant FILE_HEADER_SIGNATURE.
This is part of the page header.