Metalog file header. More...
#include <MetaLog.h>
Public Types | |
enum | { LENGTH = 16 } |
Enumeration containing static header length. More... | |
Public Member Functions | |
void | encode (uint8_t **bufp) const |
Encodes MetaLog file header. More... | |
void | decode (const uint8_t **bufp, size_t *remainp) |
Decodes serialized header. More... | |
Public Attributes | |
uint16_t | version |
MetaLog definition version number More... | |
char | name [14] |
MetaLog definition name (e.g. "mml" or "rsml") More... | |
Metalog file header.
This class is used to facilitate encoding and decoding the header of a MetaLog file. The MetaLog is a server state log that is implemented as a directory containing a set of log files. Each log file holds the complete state and state transitions for the execution of a server. When the server starts, the last state log file is read in its entirety and a new file is created to hold the last known server state plus all subsequent state transitions the occur during the execution of the server. Each state log file begins with a header that is encoded and decoded by this class.
void Header::decode | ( | const uint8_t ** | bufp, |
size_t * | remainp | ||
) |
Decodes serialized header.
bufp | Address of destination buffer pointer (advanced by call). |
remainp | Address of integer holding amount of remaining buffer (decremented by call). |
Definition at line 46 of file MetaLog.cc.
void Header::encode | ( | uint8_t ** | bufp | ) | const |
Encodes MetaLog file header.
The header is encoded as follows:
Encoding | Description |
---|---|
i16 | MetaLog definition version |
char14 | MetaLog definition name (e.g. "mml" or "rsml") |
Definition at line 40 of file MetaLog.cc.
char Hypertable::MetaLog::Header::name[14] |
uint16_t Hypertable::MetaLog::Header::version |