MAK Data Logger API Documentation for DIS
lgrRecordInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef lgrRecordInterface_H_
11 #define lgrRecordInterface_H_
12 
13 #include "lgrTimeInterface.h"
14 #include "absoluteTime.h"
15 #include "lgrCheckpointPolicy.h"
16 #include <vlutil/vlString.h>
17 
18 namespace MAKLogger
19 {
20 
21  class DtLogger;
22  class DtLgrRecordDriver;
23  class DtLgrRecordCommandFactory;
24 
29  {
30 
31  public:
32 
34 
37  static DtLgrRecordInterface* create(DtLogger&);
38 
41  static DtLgrRecordInterface* createNonThreadsafe(DtLogger& logger,
42  const DtLgrRecordDriver& driver);
43 
44  protected:
45 
47  DtLgrRecordInterface(DtLogger& logger,const DtLgrRecordDriver& driver);
48 
49 
50  public:
51  virtual ~DtLgrRecordInterface();
52 
54  virtual void startNewFile(const DtString& filename,
55  const DtString& description, bool overwrite) const;
56 
58  virtual void recordToMultipleFiles(const DtString& filename) const;
59 
62  virtual void closeFile() const;
63 
66  {
74  StopOnDurationOrSize
75  };
76 
78  virtual void setStopCondition(StopCondition,bool close) const;
79 
83  virtual void setStopDuration(DtRelativeTime duration) const;
84 
88  virtual void setStopSize(DtU64 filesize) const;
89 
91  virtual void setPauseOnRecordAs(bool record) const;
92 
94  virtual bool isFileLoaded() const;
95 
97  virtual bool isFileEmpty() const;
98 
100  virtual const DtString& filename() const;
101 
103  virtual bool isRecording() const;
104 
106  virtual bool isPaused() const;
107 
109  virtual bool isStopped() const;
110 
112  virtual bool pauseOnRecordAs() const;
113 
115  virtual void record() const;
116 
118  virtual void pause() const;
119 
121  virtual void unpause() const;
122 
124  virtual void stop(bool closeAndOpenForPlayback) const;
125 
127  virtual void setCheckpointParameters(DtCheckpointPolicy::Policy policy,
128  int size,int count,DtAbsoluteTime time)const;
129 
131  virtual void cancelRecording() const;
132 
135  virtual void saveRecordedData(const DtString& filename,
136  bool onlySinceLastSaveData, double outputDuration) const;
137 
139  virtual void setRecordToMultipleFilesSettings(double duration,
140  const DtString& namingConvention) const;
141 
143  int checkpointPolicyId() const;
144 
146  int checkpointCount() const;
147 
149  int checkpointSize() const;
150 
152  DtAbsoluteTime checkpointTime() const;
153 
155  double multipleFileDuration() const;
156 
158  const DtString& multipleFileNamingConvention() const;
159 
161  void newFileOpened(DtResponse);
162  void newFileFailed(DtResponse);
163  void newFileClosed(DtResponse);
164  void recordingChanged(DtResponse);
165  void recordingPausedChanged(DtResponse);
166  void pauseOnRecordAsChanged(DtResponse);
167  void checkpointParametersChanged(DtResponse);
168  void fileEmptyChanged(DtResponse);
169  void recordToMultipleFilesChanged(DtResponse);
170 
176 
177  protected:
178 
179  void connectResponseHandler(DtLgrCommandId id,
180  void (DtLgrRecordInterface::* function)(DtResponse));
181 
182  DtString myNewFileName;
183  DtString myErrorMessage;
193 
196 
197  };
198 
199 }
200 
201 #endif

Document ID: Generated on Thu Apr 10 18:53:01 EDT 2014 from SVN revision 138105
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)