MADARA
3.2.3
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/MadaraExport.h"
13
#include <string.h>
14
15
namespace
madara
16
{
17
namespace
knowledge
18
{
36
class
MADARA_EXPORT
FileHeader
37
{
38
public
:
39
43
FileHeader
();
44
48
virtual
~
FileHeader
();
49
55
static
uint32_t encoded_size (
void
);
56
66
virtual
const
char
* read (
const
char
* buffer,
67
int64_t & buffer_remaining);
68
78
virtual
char
* write (
char
* buffer, int64_t & buffer_remaining);
79
85
virtual
bool
equals (
const
FileHeader
& other);
86
91
static
inline
bool
file_header_test
(
const
char
* buffer)
92
{
93
return
strncmp (&(buffer[32]),
"KaRL"
, 4) == 0;
94
}
95
99
uint64_t
size
;
100
104
uint64_t
states
;
105
109
uint64_t
initial_timestamp
;
110
114
uint64_t
last_timestamp
;
115
119
char
file_type[8];
120
124
uint32_t
karl_version
;
125
129
char
originator[64];
130
};
131
}
132
}
133
134
135
#endif // _MADARA_FILE_HEADER_H_
madara::knowledge::FileHeader
Defines a file header which is the default for KaRL checkpointing.
Definition:
FileHeader.h:36
StdInt.h
madara::knowledge::FileHeader::initial_timestamp
uint64_t initial_timestamp
the timestamp for the initial checkpointing
Definition:
FileHeader.h:109
madara::knowledge::FileHeader::last_timestamp
uint64_t last_timestamp
the timestamp for the last checkpoint
Definition:
FileHeader.h:114
madara::knowledge::FileHeader::size
uint64_t size
the size of this header plus the updates
Definition:
FileHeader.h:99
madara::knowledge::FileHeader::karl_version
uint32_t karl_version
Version of KaRL installed when file was created.
Definition:
FileHeader.h:124
madara::knowledge::FileHeader::states
uint64_t states
the number of states checkpointed in the file stream
Definition:
FileHeader.h:104
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:91
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 Thu Jul 12 2018 17:38:25 for MADARA by
1.8.11