|
MADARA
3.1.8
|
Defines a file header which is the default for KaRL checkpointing. More...
#include <FileHeader.h>
Public Member Functions | |
| FileHeader () | |
| Constructor. More... | |
| virtual | ~FileHeader () |
| Destructor. More... | |
| virtual bool | equals (const FileHeader &other) |
| Compares the fields of this instance to another instance. More... | |
| virtual const char * | read (const char *buffer, int64_t &buffer_remaining) |
| Reads a FileHeader instance from a buffer and updates the amount of buffer room remaining. More... | |
| virtual char * | write (char *buffer, int64_t &buffer_remaining) |
| Writes a FileHeader instance to a buffer and updates the amount of buffer room remaining. More... | |
Static Public Member Functions | |
| static uint32_t | encoded_size (void) |
| Returns the size of the encoded FileHeader class, which may be different from sizeof (FileHeader) because of compiler optimizations for word boundaries. More... | |
| static bool | file_header_test (const char *buffer) |
| Tests the buffer for a normal message identifier. More... | |
Public Attributes | |
| char | file_type [8] |
| file type identifier ("KaRL") More... | |
| uint64_t | initial_timestamp |
| the timestamp for the initial checkpointing More... | |
| uint32_t | karl_version |
| Version of KaRL installed when file was created. More... | |
| uint64_t | last_timestamp |
| the timestamp for the last checkpoint More... | |
| char | originator [64] |
| the originator of the message (host:port) More... | |
| uint64_t | size |
| the size of this header plus the updates More... | |
| uint64_t | states |
| the number of states checkpointed in the file stream More... | |
Defines a file header which is the default for KaRL checkpointing.
Format:
[00] [64 bit file size]
[08] [64 bit states]
[16] [64 bit timestamp]
[24] [64 bit last_timestamp]
[32] [8 byte file_type = "KaRL"]
[40] [32 bit karl_version = version (0.255.255.255)]
[44] [64 byte id = originator]
[108] [Updates]
Definition at line 35 of file FileHeader.h.
| madara::knowledge::FileHeader::FileHeader | ( | ) |
Constructor.
Definition at line 6 of file FileHeader.cpp.
|
virtual |
Destructor.
Definition at line 24 of file FileHeader.cpp.
|
static |
Returns the size of the encoded FileHeader class, which may be different from sizeof (FileHeader) because of compiler optimizations for word boundaries.
Definition at line 29 of file FileHeader.cpp.
|
virtual |
Compares the fields of this instance to another instance.
| other | the other instance to compare against |
Definition at line 164 of file FileHeader.cpp.
|
inlinestatic |
Tests the buffer for a normal message identifier.
Definition at line 88 of file FileHeader.h.
|
virtual |
Reads a FileHeader instance from a buffer and updates the amount of buffer room remaining.
| buffer | the readable buffer where data is stored |
| buffer_remaining | the count of bytes remaining in the buffer to read |
Definition at line 37 of file FileHeader.cpp.
|
virtual |
Writes a FileHeader instance to a buffer and updates the amount of buffer room remaining.
| buffer | the readable buffer where data is stored |
| buffer_remaining | the count of bytes remaining in the buffer to read |
Definition at line 100 of file FileHeader.cpp.
| char madara::knowledge::FileHeader::file_type[8] |
file type identifier ("KaRL")
Definition at line 116 of file FileHeader.h.
| uint64_t madara::knowledge::FileHeader::initial_timestamp |
the timestamp for the initial checkpointing
Definition at line 106 of file FileHeader.h.
| uint32_t madara::knowledge::FileHeader::karl_version |
Version of KaRL installed when file was created.
Definition at line 121 of file FileHeader.h.
| uint64_t madara::knowledge::FileHeader::last_timestamp |
the timestamp for the last checkpoint
Definition at line 111 of file FileHeader.h.
| char madara::knowledge::FileHeader::originator[64] |
the originator of the message (host:port)
Definition at line 126 of file FileHeader.h.
| uint64_t madara::knowledge::FileHeader::size |
the size of this header plus the updates
Definition at line 96 of file FileHeader.h.
| uint64_t madara::knowledge::FileHeader::states |
the number of states checkpointed in the file stream
Definition at line 101 of file FileHeader.h.