47 #ifndef _MIRA_TAPERECORDER_H_ 48 #define _MIRA_TAPERECORDER_H_ 71 template <
typename Reflector>
75 r.member(
"Codecs",
codecs,
"The codecs used for this channel",
76 std::list<BinarySerializerCodecPtr>());
79 r.member(
"Compress", compress,
"Should the data be stored compressed",
false);
83 "Compression level (0=none, 1..9=best speed to best compression, -1=default)", 0);
85 r.member(
"Interval",
interval,
"Stores only data in that interval (if 0 stores all data)",
88 "Avoid data loss while recording this channel by reading all data from a channel since last recording",
92 std::list<BinarySerializerCodecPtr>
codecs;
109 template <
typename Reflector>
112 r.member(
"Channels",
channels,
"The channels to be recorded");
114 "Record all transformation channels?",
false);
116 "The maximum size of a message block in bytes",
118 r.member(
"Filename",
filename,
"The filename for the output tape");
120 "Automatically extend filename by timestamp?",
false);
168 template <
typename Reflector>
171 r.property(
"MaxMessageBlockSize", mMaxMessageBlockSize,
172 "The maximum size of a message block in bytes");
186 MIRA_DEPRECATED(
"Please use int compressionLevel(=0/-1) instead of bool compress(=false/true)",
187 void addChannel(
const std::string& channelID,
188 const std::list<BinarySerializerCodecPtr>& codecs,
191 addChannel(channelID, codecs, (compress ? -1 : 0), interval, avoidDataLoss);
207 void addChannel(
const std::string& channelID,
208 const std::list<BinarySerializerCodecPtr>& codecs = std::list<BinarySerializerCodecPtr>(),
209 int compressionLevel = 0,
218 void addChannel(
const std::string& channelID,
241 void stop(
bool finishQueue =
true);
247 size_t storageQueueSize();
258 void processStorageQueue(
int numEntries = 1);
266 mMaxMessageBlockSize = maxMessageBlockSize;
285 void addAllTransformationChannels();
286 Path timestampFilename(
const Path& filenameBase);
290 struct MessageToStore
293 std::string channelID;
300 void storageThread();
301 void storeMessage(MessageToStore& msg);
A tape is a binary file that contains recorded/serialized data of one or multiple channels...
Definition: Tape.h:142
RecordedChannelInfo()
Definition: TapeRecorder.h:66
An object that allows read access to a whole interval of channel data.
Definition: ChannelReadInterval.h:72
Duration interval
Definition: TapeRecorder.h:94
A config that can be passed to the TapeRecorder which contains all settings that should be used for r...
Definition: TapeRecorder.h:105
Class for recording channel data to tape.
Definition: TapeRecorder.h:133
Authority mAuthority
Definition: TapeRecorder.h:305
boost::mutex mStorageMutex
Definition: TapeRecorder.h:315
PropertyHint file(const std::string &filters=std::string(), bool save=false)
Tells the property editor that the path is for a file, and that it should show a "File Open"/"File Sa...
Definition: Path.h:247
Path filename
Definition: TapeRecorder.h:126
A Tape is a representation of recorded channel data in a binary file.
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
boost::filesystem::path Path
Typedef of a Path (shorter version for boost::filesystem::path)
Definition: Path.h:69
MetaTypeDatabase metaDB
Definition: TapeRecorder.h:146
std::map< std::string, ChannelInfo > ChannelMap
Typedef for ChannelInfo pointers.
Definition: TapeRecorder.h:151
std::deque< MessageToStore > mStorageQueue
Definition: TapeRecorder.h:318
std::list< BinarySerializerCodecPtr > codecs
Definition: TapeRecorder.h:92
TypeMetaPtr meta
Definition: TapeRecorder.h:145
ChannelMap mChannels
Definition: TapeRecorder.h:310
ChannelInfo()
Definition: TapeRecorder.h:141
void setMaxMessageBlockSize(uint32 maxMessageBlockSize)
Set the maximum size of the chunks.
Definition: TapeRecorder.h:264
int compressionLevel
Definition: TapeRecorder.h:93
Provides MIRA_CLASS_SERIALIZATION macro and includes the major headers of the serialization framework...
An object that allows read access to data of a channel.
Definition: ChannelReadWrite.h:440
boost::condition_variable mStorageThreadCondition
Definition: TapeRecorder.h:314
uint8 VersionType
Definition: ReflectorInterface.h:72
bool mFirstCallbackMessage
Definition: TapeRecorder.h:309
Wrapper class for boost::posix_time::ptime for adding more functionality to it.
Definition: Time.h:421
uint32 maxMessageBlockSize
Definition: TapeRecorder.h:125
uint64 recordCounter
Definition: TapeRecorder.h:144
#define MIRA_FRAMEWORK_EXPORT
Definition: FrameworkExports.h:61
sec_type seconds() const
Returns normalized number of seconds (0..59)
Definition: Time.h:283
Use this class to represent time durations.
Definition: Time.h:104
Informations about a recorded channel.
Definition: TapeRecorder.h:138
boost::thread mStorageThread
Definition: TapeRecorder.h:313
RecordedChannelInfoMap channels
Definition: TapeRecorder.h:123
void reflect(Reflector &r)
Definition: TapeRecorder.h:169
Authorities act as a facade to the framework.
Definition: Authority.h:94
bool mStorageThreadStarted
Definition: TapeRecorder.h:316
uint32 mMaxMessageBlockSize
Definition: TapeRecorder.h:306
boost::shared_ptr< TypeMeta > TypeMetaPtr
Definition: MetaSerializer.h:309
volatile bool mStorageThreadTerminationRequest
Definition: TapeRecorder.h:319
tick_type microseconds() const
Returns normalized number of microseconds (0..999)
Definition: Time.h:293
Tape mTape
Definition: TapeRecorder.h:307
bool timestampFilename
Definition: TapeRecorder.h:127
std::map< std::string, RecordedChannelInfo > RecordedChannelInfoMap
A map of recorded channel settings.
Definition: TapeRecorder.h:99
Contains all settings for a recorded channel like compression, codecs,...
Definition: TapeRecorder.h:62
bool isRecording() const
Returns whether TapeRecorder is currently gathering data after record was called. ...
Definition: TapeRecorder.h:272
Time expected
Definition: TapeRecorder.h:143
MIRA_DEPRECATED("Please use int compressionLevel(=0/-1) instead of bool compress(=false/true)", void addChannel(const std::string &channelID, const std::list< BinarySerializerCodecPtr > &codecs, bool compress, Duration interval=Duration::microseconds(0), bool avoidDataLoss=false))
Add a channel to the list of recorded channels.
Definition: TapeRecorder.h:186
Duration mInitialWaitForDataDuration
Definition: TapeRecorder.h:311
bool mIsRecording
Definition: TapeRecorder.h:308
#define MIRA_REFLECT_VERSION(reflector, versionNumber)
Macro that should be used to specify the (reflected) version of the class.
Definition: ReflectorInterface.h:874
void reflect(Reflector &r)
Definition: TapeRecorder.h:110
PerformanceStatistics stats
Definition: TapeRecorder.h:147
bool recordTransforms
Definition: TapeRecorder.h:124
The framework that holds all manager classes and provides startup and shutdown of all framework relat...
Typename typeName(bool cvqualify=true)
Returns a compiler and platform independent typename of T.
Definition: Typename.h:103
bool avoidDataLoss
Definition: TapeRecorder.h:95
void reflect(Reflector &r)
Definition: TapeRecorder.h:72