MAK Data Logger API Documentation for DIS
 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 "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 finishThread( const DtCommand& command);
95 
97  virtual DtResponse recheckpointOnExport( const DtCommand& command);
98 
100  const ExportTypeMap& exportTypes() const;
101 
102  public:
103 
104  static const DtString& exportLoggerFileType();
105 
106  static const DtString& exportMultipleFileType();
107 
108  protected:
109 
111  virtual void finishEditOperation();
112 
114  void convertOperation();
115 
117  void exportOperation( const DtString& fileFormat,
118  const DtString& filename, const DtAbsoluteTime& startTime,
119  const DtAbsoluteTime& endTime, const DtRelativeTime& offset,
120  bool checkpoint, bool openAfterExport, bool silentSpawnThread);
121 
127  void mergeOperation( const DtString& filename,
128  const DtRelativeTime& offset);
129 
131  void offsetOperation(const DtRelativeTime& offset);
132 
135  void completeFileOperation( bool success,DtString outputName,
136  bool selectAll);
137 
140  virtual void exportToFile(const DtString& fileExportType, const DtString& filename,
141  DtAbsoluteTime startTime, DtAbsoluteTime endTime, DtRelativeTime offset,
142  bool checkpoint, bool openAfterExport, bool silentSpawnThread);
143 
146  void exportToMultipleFiles(const DtString& destination, DtAbsoluteTime startTime,
147  DtAbsoluteTime endTime, DtRelativeTime offset, bool checkpoint,
148  bool openAfterExport, bool silentSpawnThread);
149 
152  virtual void exportToPrinter(const DtString& exportType,
153  DtLgrPacketPrinter* printer, const DtString& destination,
154  DtAbsoluteTime startTime, DtAbsoluteTime endTime,
155  DtRelativeTime offset, bool generateData, bool silentSpawnThread);
156 
158  virtual void clearSectionOperation(const DtAbsoluteTime& start,
159  const DtAbsoluteTime& end);
160 
162  virtual void cutSectionOperation(const DtAbsoluteTime& start,
163  const DtAbsoluteTime& end);
164 
170  virtual bool preparePlaybackFileAndPrinter(DtLgrFileInput** fileInput,
171  DtLgrPacketPrinterOutput** printerOutput, DtLgrPacketPrinter* printer,
172  const DtString& destination);
173 
179  bool prepareRecordFileAndPrinter(DtLgrFileInput** fileInput,
180  DtLgrPacketPrinterOutput** printerOutput, DtLgrPacketPrinter* printer,
181  const DtString& printerDestination,DtFilePosition firstPacket,
182  DtFilePosition lastPacket);
183 
190  virtual bool preparePlaybackFileForEditing(DtLgrFileInput** fileInput,
191  DtLgrFileOutput** fileOutput);
192 
199  virtual bool prepareRecordFileForEditing( DtLgrFileInput** fileInput,
200  DtLgrFileOutput** fileOutput, const DtString& filename,
201  DtFilePosition firstPacekt,DtFilePosition lastPacket);
202 
204  virtual bool prepareFileForInput(const DtLgrFileInput* existingInput,
205  DtLgrFileInput** secondaryInput, const DtString& filename );
206 
211  virtual DtLgrPlaybackDriver* getPlaybackDriver(bool checkForFileOpen) const;
212 
215  virtual DtLgrRecordDriver* getRecordDriver() const;
216 
217 
218  protected:
219 
221  DtLgrSystemDriver& mySystemDriver;
222 
224  typedef std::map<DtString,DtLgrPacketPrinter*> PacketPrinterMap;
225 
227  PacketPrinterMap myExportPrinters;
228 
230  ExportTypeMap myExportTypes;
231 
234  int myPacketOperationCount;
235 
237  DtString myCurrentOperationName;
238 
241  bool myDeleteSecondaryInputFlag;
242 
244  bool myRecheckpointOnExport;
245 
246  protected:
249  static DtLgrExportType theExportLoggerFileType;
250 
253  static DtLgrExportType theExportMultipleFileType;
254 
255  };
256 
257 }
258 
259 #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)