MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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/lgrCore.h>
13 #include <lgrUtil/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  DtU32 entityId;
99  DtU32 flags;
100  };
101 
104  {
105  DtNetFloat64 time;
106  DtNetU64 filePosition;
107  DtNetU32 packetSize;
108  };
109 
113  {
114  DtNetU32 numEntries;
115  DtNetU32 unused;
116  };
117 
118  typedef std::vector<IndexEntry> CheckpointEntryList;
120  };
121 }
122 
123 #endif

Document ID: Generated on Wed Jun 5 18:45:18 EDT 2019 from SVN revision 198968
Copyright © 2019 VT MAK. All Rights Reserved (www.mak.com)