MAK Data Logger API Documentation for DIS
 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 
48  virtual void initializeSerialMode(DtFilePosition firstPacket = 0,
49  DtFilePosition lastPacket = 0);
50 
52  virtual void copyMetaData(const DtLgrFileFormatter* formatter);
53 
58  virtual bool seekToFirstPacket(int type);
59 
64  virtual bool seekToLastPacket(int type);
65 
69  virtual bool seekToFirstPacketBeforeTime(int type,double time);
70 
75  virtual bool seekToFirstPacketAfterTime(int type,double time);
76 
77 
83  virtual bool seekToNextPacket(int type);
84 
89  virtual bool seekToPreviousPacketOfType(int type);
90 
93  virtual void writePacket(const DtPacket& packet);
94 
101  virtual size_t writePacket(const DtPacket& packet,void* memory,size_t memorySize,
102  int fileWriteBufferOffset = -1);
103 
105  virtual bool hasCheckpoints() const;
106 
108  virtual bool isEofValid() const;
109 
111  virtual double duration() const;
112 
114  virtual void setDuration(double duration);
115 
116  protected:
117 
120  virtual void initReadEndMetaData();
121 
123  virtual void readRecordingInfoMetaData();
124 
126  virtual void decodeRecordingInfoPacket(const DtPacket& packet);
127 
129  virtual void writeRecordingData();
130 
132  virtual void readIndexTableMetaData();
133 
135  virtual void writeIndexTable();
136 
138  virtual bool checkEofMagic();
139 
141  virtual void writeEofMagic();
142 
144  virtual bool jumpToIndex(int index);
145 
147  virtual DtPacket* encodePacket(DtPacket::DtPacketType type);
148 
150  virtual void decodePacket(DtPacket* packet);
151 
153  virtual void indexCheckpoint(double time, DtFilePosition position, int size);
154 
156  virtual void linkCheckpoint(const DtPacket& packet);
157 
159  virtual void linkCheckpoint(const DtPacket& packet, void* memory, int fileWriteBufferOffset);
160 
162  virtual bool refreshCheckpoints(double time);
163 
166  virtual bool readCheckpointsToTime(double time);
167 
169 
170  virtual DtLgrPacketIndexer* packetIndexer();
171  virtual const DtLgrPacketIndexer* packetIndexer() const;
173 
174  protected:
175 
177  double myDuration;
187  };
188 }
189 
190 #endif

Document ID: Generated on Thu Apr 7 20:50:59 EDT 2016 from SVN revision 163818
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)