MAK Data Logger API Documentation for DIS
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 
25  {
26  public:
29 
32 
33  private:
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;
97  DtU32 packetSize;
98  };
99 
102  {
103  DtNetFloat64 time;
104  DtNetU64 filePosition;
105  DtNetU32 packetSize;
106  };
107 
111  {
112  DtNetU32 numEntries;
113  DtNetU32 unused;
114  };
115 
116  typedef std::vector<IndexEntry> CheckpointEntryList;
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)