MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
FileHeader.h
Go to the documentation of this file.
1
#ifndef _MADARA_FILE_HEADER_H_
2
#define _MADARA_FILE_HEADER_H_
3
11
#include "
madara/utility/stdint.h
"
12
#include "madara/MADARA_export.h"
13
14
namespace
madara
15
{
16
namespace
knowledge
17
{
35
class
MADARA_Export
FileHeader
36
{
37
public
:
38
42
FileHeader
();
43
47
virtual
~
FileHeader
();
48
54
static
uint32_t encoded_size (
void
);
55
64
virtual
const
char
* read (
const
char
* buffer,
65
int64_t & buffer_remaining);
66
75
virtual
char
* write (
char
* buffer, int64_t & buffer_remaining);
76
82
virtual
bool
equals (
const
FileHeader
& other);
83
88
static
inline
bool
file_header_test
(
const
char
* buffer)
89
{
90
return
strncmp (&(buffer[32]),
"KaRL"
, 4) == 0;
91
}
92
96
uint64_t
size
;
97
101
uint64_t
states
;
102
106
uint64_t
initial_timestamp
;
107
111
uint64_t
last_timestamp
;
112
116
char
file_type[8];
117
121
uint32_t
karl_version
;
122
126
char
originator[64];
127
};
128
}
129
}
130
131
132
#endif // _MADARA_FILE_HEADER_H_
madara::knowledge::FileHeader
Defines a file header which is the default for KaRL checkpointing.
Definition:
FileHeader.h:35
madara::knowledge::FileHeader::initial_timestamp
uint64_t initial_timestamp
the timestamp for the initial checkpointing
Definition:
FileHeader.h:106
madara::knowledge::FileHeader::last_timestamp
uint64_t last_timestamp
the timestamp for the last checkpoint
Definition:
FileHeader.h:111
madara::knowledge::FileHeader::size
uint64_t size
the size of this header plus the updates
Definition:
FileHeader.h:96
madara::knowledge::FileHeader::karl_version
uint32_t karl_version
Version of KaRL installed when file was created.
Definition:
FileHeader.h:121
madara::knowledge::FileHeader::states
uint64_t states
the number of states checkpointed in the file stream
Definition:
FileHeader.h:101
madara::knowledge::FileHeader::file_header_test
static bool file_header_test(const char *buffer)
Tests the buffer for a normal message identifier.
Definition:
FileHeader.h:88
stdint.h
madara::knowledge
Provides functions and classes for the distributed knowledge base.
Definition:
AggregateFilter.h:32
madara
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
include
madara
knowledge
FileHeader.h
Generated on Wed May 9 2018 18:17:15 for MADARA by
1.8.11