MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 <lgrUtil/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 
35  {
43  StopOnDurationOrSize
44  };
45 
47 
50  static DtLgrRecordInterface* create(DtLogger&);
51 
54  static DtLgrRecordInterface* createNonThreadsafe(DtLogger& logger,
55  const DtLgrRecordDriver& driver);
56 
57  protected:
58 
60  DtLgrRecordInterface(DtLogger& logger,const DtLgrRecordDriver& driver);
61 
62 
63  public:
64  virtual ~DtLgrRecordInterface();
65 
67 
70  virtual void startNewFile(const DtString& filename, const DtString& description, bool overwrite) const;
71 
73  virtual void recordToMultipleFiles(const DtString& filename, const DtString& description) const;
74 
77  virtual void closeFile() const;
78 
80  virtual void setStopCondition(StopCondition,bool close) const;
81 
85  virtual void setStopDuration(DtRelativeTime duration) const;
86 
90  virtual void setStopSize(DtU64 filesize) const;
91 
93  virtual void setPauseOnRecordAs(bool record) const;
94 
96  virtual void record() const;
97 
99  virtual void pause() const;
100 
102  virtual void unpause() const;
103 
105  virtual void stop(bool closeAndOpenForPlayback) const;
106 
108  virtual void setCheckpointParameters(DtCheckpointPolicy::Policy policy,
109  int size,int count,DtAbsoluteTime time, bool checkpointInteractions) const;
110 
112  virtual void cancelRecording() const;
113 
116  virtual void saveRecordedData(const DtString& filename, const DtString& description,
117  bool onlySinceLastSaveData, double outputDuration) const;
118 
120  virtual void setRecordToMultipleFilesSettings(double duration,
121  const DtString& namingConvention) const;
122 
124  virtual void setMediaStreamConfiguration(const DtString& streamConfiguration) const;
125 
127  virtual void setMediaStreamPipeline(const DtString& pipelines);
128 
130  virtual void setIsRecordingMediaStream(bool doRecord);
131 
133  virtual void setMediaRecordStreamParameters(int port) const;
134 
136  virtual void setMediaRecordByDefault(bool enableRecord) const;
137 
139 
141 
144  virtual bool isFileLoaded() const;
145 
147  virtual bool isFileEmpty() const;
148 
150  virtual const DtString& filename() const;
151 
153  virtual bool isRecording() const;
154 
156  virtual bool isPaused() const;
157 
159  virtual bool isStopped() const;
160 
162  virtual bool pauseOnRecordAs() const;
163 
165  int checkpointPolicyId() const;
166 
168  int checkpointCount() const;
169 
171  int checkpointSize() const;
172 
174  DtAbsoluteTime checkpointTime() const;
175 
177  bool interactionsCheckpointed() const;
178 
180  double multipleFileDuration() const;
181 
183  const DtString& multipleFileNamingConvention() const;
184 
186  virtual const DtString& mediaStreamConfiguration() const;
187 
189  bool isRecordingMediaStream() const;
190 
192  int mediaRecordPort() const;
193 
195  bool mediaRecordByDefault() const;
197 
199  void newFileOpened(DtResponse);
201  void newFileFailed(DtResponse);
202  void newFileClosed(DtResponse);
203  void recordingChanged(DtResponse);
204  void recordingPausedChanged(DtResponse);
205  void pauseOnRecordAsChanged(DtResponse);
206  void checkpointParametersChanged(DtResponse);
207  void fileEmptyChanged(DtResponse);
208  void recordToMultipleFilesChanged(DtResponse);
209  void mediaRecordFromStreamConfigurationChanged(DtResponse response);
210  void mediaRecordStreamParametersChanged(DtResponse response);
211  void mediaRecordByDefaultChanged(DtResponse response);
212  void recordingMediaStreamChanged(DtResponse response);
213 
215 
217  DtValueSignal<DtString> newFileOpenedSignal;
228 
229  protected:
230 
231  void connectResponseHandler(DtLgrCommandId id,
232  void (DtLgrRecordInterface::* function)(DtResponse));
233 
234  DtString myNewFileName;
235  DtString myErrorMessage;
252 
253  };
254 
255 }
256 
257 #endif
DtString myNewFileName
Definition: lgrRecordInterface.h:234
bool myIsFileLoadedFlag
Definition: lgrRecordInterface.h:239
DtString myMediaStreamConfiguration
Definition: lgrRecordInterface.h:248
DtValueSignal< bool > mediaRecordByDefaultChangedSignal
Response signal handlers.
Definition: lgrRecordInterface.h:225
DtValueSignal< int > mediaRecordPortChangedSignal
Response signal handlers.
Definition: lgrRecordInterface.h:224
int myCheckpointPolicy
Definition: lgrRecordInterface.h:241
Relative Time, an elapsed duration of time, no implied measurement, could be seconds/cycles or ticks ...
Definition: absoluteTime.h:28
bool myCheckpointInteractions
Definition: lgrRecordInterface.h:245
bool myIsRecordingMediaStream
Definition: lgrRecordInterface.h:249
DtBoost::shared_ptr< const DtCommand > DtResponse
Definition: lgrCommand.h:174
Normal stop condition, stop when the user requests.
Definition: lgrRecordInterface.h:37
DtLgrRecordCommandFactory Factory
Definition: lgrRecordInterface.h:46
DtValueSignal< bool > recordingMediaStreamChangedSignal
Response signal handlers.
Definition: lgrRecordInterface.h:226
int myCheckpointCount
Definition: lgrRecordInterface.h:242
bool myPauseOnRecordAs
Definition: lgrRecordInterface.h:238
Stop when the max duration set is reached.
Definition: lgrRecordInterface.h:39
bool myEmptyFlag
Definition: lgrRecordInterface.h:240
The factory responsible for creating recording commands.
Definition: lgrRecordCommandFactory.h:24
DtValueSignal< bool > recordingPausedChangedSignal
Response signal handlers.
Definition: lgrRecordInterface.h:221
bool myMediaRecordByDefault
Definition: lgrRecordInterface.h:251
DtString myErrorMessage
Definition: lgrRecordInterface.h:235
Contains MAKLogger::DtAbsoluteTime and MAKLogger::DtRelativeTime classes.
The class responsible for controlling the logger recording functionality.
Definition: lgrRecordDriver.h:37
DtString myMultipleFileNamingConvention
Definition: lgrRecordInterface.h:247
bool myPausedFlag
Definition: lgrRecordInterface.h:237
Contains MAKLogger::DtCheckpointPolicy and MAKLogger::DtCheckpointBySize and MAKLogger::DtCheckpointB...
int myCheckpointSize
Definition: lgrRecordInterface.h:243
#define DT_DLL_LGRCORE
Definition: lgrCore.h:19
int myMediaRecordPort
Definition: lgrRecordInterface.h:250
bool myRecordingFlag
Definition: lgrRecordInterface.h:236
StopCondition
Stop conditions for the logger.
Definition: lgrRecordInterface.h:34
Stop when the max size is reached.
Definition: lgrRecordInterface.h:41
DtValueSignal< bool > pauseOnRecordAsChangedSignal
Response signal handlers.
Definition: lgrRecordInterface.h:222
DtLogger provides the core system structure and controls the execution model for the underlying objec...
Definition: logger.h:35
The class responsible for interfacing with the logger recording functionality.
Definition: lgrRecordInterface.h:28
DtAbsoluteTime myCheckpointTime
Definition: lgrRecordInterface.h:244
DtValueSignal< bool > recordingChangedSignal
Response signal handlers.
Definition: lgrRecordInterface.h:220
short DtLgrCommandId
Definition: lgrCommand.h:25
DtValueSignal< DtString > newFileFailedSignal
Response signal handlers.
Definition: lgrRecordInterface.h:219
Policy
Definition: lgrCheckpointPolicy.h:37
The class for interfacing with the loggers time state.
Definition: lgrTimeInterface.h:21
DtValueSignal< DtString > mediaStreamConfigurationChangedSignal
Response signal handlers.
Definition: lgrRecordInterface.h:223
double myMultipleFileDuration
Definition: lgrRecordInterface.h:246
Absolute Time, a particular measured instance in time, could be thought of as a set of relative times...
Definition: absoluteTime.h:82
Contains MAKLogger::DtLgrTimeInterface subclass of MAKLogger::DtLgrSystemInterface.

Document ID: Generated on Thu Jul 14 15:45:33 EDT 2022 from SVN revision 244827
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)