MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lgrEditorDriver.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 
11 #ifndef lgrEditorDriver_H_
12 #define lgrEditorDriver_H_
13 
14 #include <lgrCore/lgrDriver.h>
15 #include <lgrCore/lgrExportType.h>
16 #include <lgrUtil/filePosition.h>
17 #include <map>
18 
19 class DtThread;
20 class DtRunnable;
21 
22 namespace MAKLogger
23 {
24  class DtLgrEditorCommandFactory;
25  class DtLgrEditorInterface;
26  class DtLgrEditorThread;
27  class DtLgrFileInput;
28  class DtLgrFileOutput;
29  class DtLgrPacketPrinter;
30  class DtLgrPacketPrinterOutput;
31  class DtLgrPlaybackDriver;
32  class DtLgrRecordDriver;
33  class DtMessageInput;
34  class DtMessageOutput;
35  class DtMessageState;
36  class DtLgrSystemDriver;
37 
41  {
42  public:
43 
46 
47  typedef std::map<DtString,DtLgrExportType> ExportTypeMap;
48 
50 
51  virtual ~DtLgrEditorDriver();
52 
54  virtual void tick();
55 
56  virtual bool releasePipeline();
57  virtual bool getPipeline();
58  virtual bool hasPipeline() const;
59 
61  virtual DtResponse addExportType(const DtCommand& command);
62 
64  virtual DtResponse exportFile(const DtCommand& command);
65 
67  virtual DtResponse exportSection(const DtCommand& command);
68 
70  virtual DtResponse clearSection(const DtCommand& command);
71 
73  virtual DtResponse cutSection( const DtCommand& command);
74 
76  virtual DtResponse mergeInFile( const DtCommand& command);
77 
79  virtual DtResponse appendFileToEnd( const DtCommand& command);
80 
82  virtual DtResponse prefixFileToStart( const DtCommand& command);
83 
85  virtual DtResponse trimStart( const DtCommand& command);
86 
88  virtual DtResponse offsetTime( const DtCommand& command);
89 
91  virtual DtResponse convertFile( const DtCommand& command);
92 
94  virtual DtResponse recheckpointOnExport( const DtCommand& command);
95 
97  const ExportTypeMap& exportTypes() const;
98 
99 
100  public:
101 
102  static const DtString& exportLoggerFileType();
103 
104  static const DtString& exportMultipleFileType();
105 
106  protected:
107 
109  virtual void finishEditOperation();
110 
112  void convertOperation();
113 
115  void exportOperation( const DtString& fileFormat,
116  const DtString& filename, const DtAbsoluteTime& startTime,
117  const DtAbsoluteTime& endTime, const DtRelativeTime& offset,
118  bool checkpoint, bool openAfterExport, bool silentSpawnThread);
119 
125  void mergeOperation( const DtString& filename,
126  const DtRelativeTime& offset);
127 
129  void offsetOperation(const DtRelativeTime& offset);
130 
133  void completeFileOperation( bool success,DtString outputName,
134  bool selectAll);
135 
138  virtual void exportToFile(const DtString& fileExportType, const DtString& filename,
139  DtAbsoluteTime startTime, DtAbsoluteTime endTime, DtRelativeTime offset,
140  bool checkpoint, bool openAfterExport, bool silentSpawnThread);
141 
144  void exportToMultipleFiles(const DtString& destination, DtAbsoluteTime startTime,
145  DtAbsoluteTime endTime, DtRelativeTime offset, bool checkpoint,
146  bool openAfterExport, bool silentSpawnThread);
147 
150  virtual void exportToPrinter(const DtString& exportType,
151  DtLgrPacketPrinter* printer, const DtString& destination,
152  DtAbsoluteTime startTime, DtAbsoluteTime endTime,
153  DtRelativeTime offset, bool generateData, bool silentSpawnThread);
154 
156  virtual void clearSectionOperation(const DtAbsoluteTime& start,
157  const DtAbsoluteTime& end);
158 
160  virtual void cutSectionOperation(const DtAbsoluteTime& start,
161  const DtAbsoluteTime& end);
162 
168  virtual bool preparePlaybackFileAndPrinter(DtLgrFileInput** fileInput,
169  DtLgrPacketPrinterOutput** printerOutput, DtLgrPacketPrinter* printer,
170  const DtString& destination);
171 
177  bool prepareRecordFileAndPrinter(DtLgrFileInput** fileInput,
178  DtLgrPacketPrinterOutput** printerOutput, DtLgrPacketPrinter* printer,
179  const DtString& printerDestination,DtFilePosition firstPacket,
180  DtFilePosition lastPacket);
181 
188  virtual bool preparePlaybackFileForEditing(DtLgrFileInput** fileInput,
189  DtLgrFileOutput** fileOutput);
190 
197  virtual bool prepareRecordFileForEditing( DtLgrFileInput** fileInput,
198  DtLgrFileOutput** fileOutput, const DtString& filename,
199  DtFilePosition firstPacekt,DtFilePosition lastPacket);
200 
202  virtual bool prepareFileForInput(const DtLgrFileInput* existingInput,
203  DtLgrFileInput** secondaryInput, const DtString& filename );
204 
209  virtual DtLgrPlaybackDriver* getPlaybackDriver(bool checkForFileOpen) const;
210 
213  virtual DtLgrRecordDriver* getRecordDriver() const;
214 
215 
216  protected:
217 
219  DtLgrSystemDriver& mySystemDriver;
220 
223 
225  PacketPrinterMap myExportPrinters;
226 
228  ExportTypeMap myExportTypes;
229 
232  int myPacketOperationCount;
233 
235  DtString myCurrentOperationName;
236 
239  bool myDeleteSecondaryInputFlag;
240 
242  bool myRecheckpointOnExport;
243 
244  protected:
247  static DtLgrExportType theExportLoggerFileType;
248 
251  static DtLgrExportType theExportMultipleFileType;
252 
253  };
254 
255 }
256 
257 #endif

Document ID: Generated on Thu Jul 23 15:05:27 EDT 2020 from SVN revision 215371
Copyright © 2020 MAK Technologies. All Rights Reserved (www.mak.com)