MAK Data Logger API Documentation for DIS
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
libsrc
lgrCore
lgrPacketIndexer.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
******************************************************************************/
5
8
9
#ifndef lgrPacketIndexer_H_
10
#define lgrPacketIndexer_H_
11
12
#include "
lgrCore.h
"
13
#include "
filePosition.h
"
14
15
#include <vector>
16
#include <vlutil/vlNetTypes.h>
17
18
namespace
MAKLogger
19
{
20
class
DtPacket;
21
24
class
DT_DLL_LGRCORE
DtLgrPacketIndexer
25
{
26
public
:
28
DtLgrPacketIndexer
();
29
31
~
DtLgrPacketIndexer
();
32
33
private
:
35
DtLgrPacketIndexer
(
const
DtLgrPacketIndexer
&);
37
DtLgrPacketIndexer
& operator=(
const
DtLgrPacketIndexer
&);
38
public
:
39
42
int
addEntry(
double
time,
DtFilePosition
position,
int
size);
43
46
void
removeEntry(
int
index);
47
49
void
clearEntries();
50
53
int
firstIndex();
54
57
int
lastIndex();
58
60
int
indexCount()
const
;
61
64
int
getIndexAtOrBeforeTime(
double
time);
65
68
int
getIndexAtOrAfterTime(
double
time);
69
72
DtFilePosition
getPositionOfIndex(
int
index);
73
76
double
getTimeOfIndex(
int
index);
77
80
int
getSizeOfIndex(
int
index);
81
83
DtPacket
* encodePacket()
const
;
84
89
void
decodePacket(
const
DtPacket
* packet);
90
91
protected
:
92
93
struct
IndexEntry
94
{
95
double
time
;
96
DtFilePosition
filePosition
;
97
DtU32
packetSize
;
98
};
99
101
struct
NetIndexEntry
102
{
103
DtNetFloat64
time
;
104
DtNetU64
filePosition
;
105
DtNetU32
packetSize
;
106
};
107
110
struct
NetIndexTable
111
{
112
DtNetU32
numEntries
;
113
DtNetU32
unused
;
114
};
115
116
typedef
std::vector<IndexEntry>
CheckpointEntryList
;
117
CheckpointEntryList
myCheckpointEntries
;
118
};
119
}
120
121
#endif
Document ID: Generated on Sun Dec 15 18:04:30 EST 2013 from SVN revision 134418
Copyright © 2005-2012 VT MÄK. All Rights Reserved (
www.mak.com
)