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-2025 MAK Technologies, Inc
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  virtual DtLgrPacketIndexer* packetIndexer();
172  virtual const DtLgrPacketIndexer* packetIndexer() const;
174 
175  protected:
176 
178  double myDuration;
188  };
189 }
190 
191 #endif
DtFilePosition myDescriptionDataPosition
Definition: lgrLegacyCheckpointedFormat.h:183
Contains MAKLogger::DtLgrLegacyUncheckpointedFormat class.
bool myLinkedCheckpoints
Definition: lgrLegacyCheckpointedFormat.h:184
DtInt64 DtFilePosition
The position in a file, stored as a 64bit unsigned integer.
Definition: filePosition.h:18
bool myDisableIndexer
Definition: lgrLegacyCheckpointedFormat.h:185
DtLgrPacketIndexer * myPacketIndexer
Definition: lgrLegacyCheckpointedFormat.h:177
DtPacketType
MIGRATION Info Same values as LtPacketKind in Logger 3.x versions.
Definition: packet.h:47
DtFilePosition myIndexTablePosition
Definition: lgrLegacyCheckpointedFormat.h:182
The class which implements the legacy (Logger 3.x) uncheckpointed file format.
Definition: lgrLegacyUncheckpointedFormat.h:26
double myDuration
Definition: lgrLegacyCheckpointedFormat.h:178
An abstract logger file formatter.
Definition: lgrFileFormatter.h:33
A generic packed of typed binary data.
Definition: packet.h:41
DtFilePosition myRecordingInfoPosition
Definition: lgrLegacyCheckpointedFormat.h:181
bool myEofMagicIsValid
Definition: lgrLegacyCheckpointedFormat.h:179
#define DT_DLL_LGRCORE
Definition: lgrCore.h:19
The format for checkpointed files.
Definition: lgrLegacyCheckpointedFormat.h:24
double myCheckpointSearchEndTime
Definition: lgrLegacyCheckpointedFormat.h:187
Indexes packets in a file.
Definition: lgrPacketIndexer.h:24
bool myEofMagicIsSet
Definition: lgrLegacyCheckpointedFormat.h:180
static const DtNetU32 theEOFMagic
Definition: lgrLegacyCheckpointedFormat.h:38
DtFilePosition myCheckpointSearchEndPosition
Definition: lgrLegacyCheckpointedFormat.h:186
Base logger class which represents the basic Logger file.
Definition: loggerFile.h:25
virtual bool seekToNextPacket()
Seek to the next packet.

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)