MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrLegacyCheckpointedFormat.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 lgrLegacyCheckpointedFormat_H_
10 #define lgrLegacyCheckpointedFormat_H_
11 
13 #include <vlutil/vlNetTypes.h>
14 
15 namespace MAKLogger
16 {
17 
18  class DtLgrPacketIndexer;
19 
25  {
26  protected:
28  public:
30 
31  private:
36  public:
37 
38  const static DtNetU32 theEOFMagic;
39 
49  virtual void initializeSerialMode(DtFilePosition firstPacket = 0,
50  DtFilePosition lastPacket = 0, bool skipCheckpointRead=false);
51 
53  virtual void copyMetaData(const DtLgrFileFormatter* formatter);
54 
59  virtual bool seekToFirstPacket(int type);
60 
65  virtual bool seekToLastPacket(int type);
66 
70  virtual bool seekToFirstPacketBeforeTime(int type,double time);
71 
76  virtual bool seekToFirstPacketAfterTime(int type,double time);
77 
78 
84  virtual bool seekToNextPacket(int type);
85 
90  virtual bool seekToPreviousPacketOfType(int type);
91 
94  virtual void writePacket(const DtPacket& packet);
95 
102  virtual size_t writePacket(const DtPacket& packet,void* memory,size_t memorySize,
103  int fileWriteBufferOffset = -1);
104 
106  virtual bool hasCheckpoints() const;
107 
109  virtual bool isEofValid() const;
110 
112  virtual double duration() const;
113 
115  virtual void setDuration(double duration);
116 
117  protected:
118 
121  virtual void initReadEndMetaData();
122 
124  virtual void readRecordingInfoMetaData();
125 
127  virtual void decodeRecordingInfoPacket(const DtPacket& packet);
128 
130  virtual void writeRecordingData();
131 
133  virtual void readIndexTableMetaData();
134 
136  virtual void writeIndexTable();
137 
139  virtual bool checkEofMagic();
140 
142  virtual void writeEofMagic();
143 
145  virtual bool jumpToIndex(int index);
146 
148  virtual DtPacket* encodePacket(DtPacket::DtPacketType type);
149 
151  virtual void decodePacket(DtPacket* packet);
152 
154  virtual void indexCheckpoint(double time, DtFilePosition position, int size);
155 
157  virtual void linkCheckpoint(const DtPacket& packet);
158 
160  virtual void linkCheckpoint(const DtPacket& packet, void* memory, int fileWriteBufferOffset);
161 
163  virtual bool refreshCheckpoints(double time);
164 
167  virtual bool readCheckpointsToTime(double time);
168 
170 
171  virtual DtLgrPacketIndexer* packetIndexer();
172  virtual const DtLgrPacketIndexer* packetIndexer() const;
174 
175  protected:
176 
178  double myDuration;
188  };
189 }
190 
191 #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)