MAK Data Logger API Documentation for HLA
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 "lgrDriver.h"
15 #include "lgrExportType.h"
16 #include "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  const ExportTypeMap& exportTypes() const;
98 
99  public:
100 
101  static const DtString& exportLoggerFileType();
102 
103  static const DtString& exportMultipleFileType();
104 
105  protected:
106 
108  virtual void finishEditOperation();
109 
111  void convertOperation();
112 
114  void exportOperation( const DtString& fileFormat,
115  const DtString& filename, const DtAbsoluteTime& startTime,
116  const DtAbsoluteTime& endTime, const DtRelativeTime& offset,
117  bool checkpoint, bool openAfterExport, bool silentSpawnThread);
118 
124  void mergeOperation( const DtString& filename,
125  const DtRelativeTime& offset);
126 
128  void offsetOperation(const DtRelativeTime& offset);
129 
132  void completeFileOperation( bool success,DtString outputName,
133  bool selectAll);
134 
137  virtual void exportToFile(const DtString& fileExportType, const DtString& filename,
138  DtAbsoluteTime startTime, DtAbsoluteTime endTime, DtRelativeTime offset,
139  bool checkpoint, bool openAfterExport, bool silentSpawnThread);
140 
143  void exportToMultipleFiles(const DtString& destination, DtAbsoluteTime startTime,
144  DtAbsoluteTime endTime, DtRelativeTime offset, bool checkpoint,
145  bool openAfterExport, bool silentSpawnThread);
146 
149  virtual void exportToPrinter(const DtString& exportType,
150  DtLgrPacketPrinter* printer, const DtString& destination,
151  DtAbsoluteTime startTime, DtAbsoluteTime endTime,
152  DtRelativeTime offset, bool generateData, bool silentSpawnThread);
153 
155  virtual void clearSectionOperation(const DtAbsoluteTime& start,
156  const DtAbsoluteTime& end);
157 
159  virtual void cutSectionOperation(const DtAbsoluteTime& start,
160  const DtAbsoluteTime& end);
161 
167  virtual bool preparePlaybackFileAndPrinter(DtLgrFileInput** fileInput,
168  DtLgrPacketPrinterOutput** printerOutput, DtLgrPacketPrinter* printer,
169  const DtString& destination);
170 
176  bool prepareRecordFileAndPrinter(DtLgrFileInput** fileInput,
177  DtLgrPacketPrinterOutput** printerOutput, DtLgrPacketPrinter* printer,
178  const DtString& printerDestination,DtFilePosition firstPacket,
179  DtFilePosition lastPacket);
180 
187  virtual bool preparePlaybackFileForEditing(DtLgrFileInput** fileInput,
188  DtLgrFileOutput** fileOutput);
189 
196  virtual bool prepareRecordFileForEditing( DtLgrFileInput** fileInput,
197  DtLgrFileOutput** fileOutput, const DtString& filename,
198  DtFilePosition firstPacekt,DtFilePosition lastPacket);
199 
201  virtual bool prepareFileForInput(const DtLgrFileInput* existingInput,
202  DtLgrFileInput** secondaryInput, const DtString& filename );
203 
208  virtual DtLgrPlaybackDriver* getPlaybackDriver(bool checkForFileOpen) const;
209 
212  virtual DtLgrRecordDriver* getRecordDriver() const;
213 
214 
215  protected:
216 
218  DtLgrSystemDriver& mySystemDriver;
219 
222 
224  PacketPrinterMap myExportPrinters;
225 
227  ExportTypeMap myExportTypes;
228 
231  int myPacketOperationCount;
232 
234  DtString myCurrentOperationName;
235 
238  bool myDeleteSecondaryInputFlag;
239 
240  protected:
243  static DtLgrExportType theExportLoggerFileType;
244 
247  static DtLgrExportType theExportMultipleFileType;
248 
249  };
250 
251 }
252 
253 #endif

Document ID: Generated on Mon Jan 19 08:20:14 EST 2015 from SVN revision 149581
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)