47 #ifndef _MIRA_TAPEPLAYER_H_ 48 #define _MIRA_TAPEPLAYER_H_ 71 mAuthority.checkout();
74 template <
typename Reflector>
84 mStepToChannel.reset();
86 mPlayImmediately =
false;
104 return mStepTo.is_initialized() || mStepToChannel.is_initialized();
133 bool stepTo(
const std::string& channelID);
145 bool stepToAnyOf(
const std::vector<std::string>& channelIDs);
155 mErrorMessage.reset();
179 assert(scaler >= 0.0f);
180 mTimeScaler = 1.0f/scaler;
189 return 1.0f/mTimeScaler;
222 return mErrorMessage.is_initialized();
231 return *mErrorMessage;
243 if (mVisitor == NULL)
245 if (mMessage == mVisitor->end())
246 return mVisitor->getLastMessageTimeOffset();
247 return mMessage.getTimeOffset();
258 if (mVisitor == NULL)
260 if (mMessage == mVisitor->end())
261 return mVisitor->getLastMessageTZOffset();
262 return mMessage.getTZOffset();
float getTimeScaler() const
Get the time scaling factor.
Definition: TapePlayer.h:187
void setTimeScaler(float scaler)
Set the time scaling factor for play back.
Definition: TapePlayer.h:177
bool mPlayImmediately
Definition: TapePlayer.h:302
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Authority * getAuthority()
Return the authority of the player.
Definition: TapePlayer.h:285
boost::optional< Duration > mJumpTo
Definition: TapePlayer.h:306
boost::thread mThread
Definition: TapePlayer.h:298
bool isPaused() const
Is the playback paused.
Definition: TapePlayer.h:94
bool mLoop
Definition: TapePlayer.h:300
TapeVisitor * mVisitor
Definition: TapePlayer.h:310
Time getRelativeStartTime() const
Returns the relative time the player plays back messages to.
Definition: TapePlayer.h:269
Provides MIRA_CLASS_SERIALIZATION macro and includes the major headers of the serialization framework...
void setLoop(bool loop, int32 count=-1)
Turn the loop mode on/off.
Definition: TapePlayer.h:164
Iterator to iterate over all messages in all tapes visited by the visitor.
Definition: TapeVisitor.h:133
Wrapper class for boost::posix_time::ptime for adding more functionality to it.
Definition: Time.h:416
float mTimeScaler
Definition: TapePlayer.h:304
boost::optional< Duration > mStepTo
Definition: TapePlayer.h:307
Authority mAuthority
Definition: TapePlayer.h:297
boost::mutex mConditionMutex
Definition: TapePlayer.h:312
#define MIRA_FRAMEWORK_EXPORT
Definition: FrameworkExports.h:61
int32 mLoopCount
Definition: TapePlayer.h:299
Duration getCurrentMessageTZOffset() const
Get the recorded time zone offset of the tape containing the currently played or to be played message...
Definition: TapePlayer.h:256
Use this class to represent time durations.
Definition: Time.h:104
Authorities act as a facade to the framework.
Definition: Authority.h:94
boost::optional< TapeVisitor::iterator > mStepToChannel
Definition: TapePlayer.h:308
virtual ~TapePlayer()
Definition: TapePlayer.h:68
tick_type microseconds() const
Returns normalized number of microseconds (0..999)
Definition: Time.h:288
boost::condition_variable mCondition
Definition: TapePlayer.h:313
Visitor class to inspect tapes by channels and/or time interval.
Definition: TapeVisitor.h:66
Time mStartTime
Definition: TapePlayer.h:305
Class for playing back tape files.
Definition: TapePlayer.h:62
void reflect(Reflector &r)
Definition: TapePlayer.h:75
static Time now() static Time eternity()
Returns the current utc based time.
Definition: Time.h:479
void step()
Do a single step.
Definition: TapePlayer.h:111
bool mIsPlaying
Definition: TapePlayer.h:303
std::string getErrorMessage() const
Returns the error message of an error that occurred during play back.
Definition: TapePlayer.h:228
bool hasError() const
When an error occurs during play back this method will return true.
Definition: TapePlayer.h:220
tick_type nanoseconds() const
Returns normalized number of nanoseconds (0..999)
Definition: Time.h:293
void pause()
Pauses the play back.
Definition: TapePlayer.h:81
Class implementing a visitor concept for tapes.
boost::optional< std::string > mErrorMessage
Definition: TapePlayer.h:309
bool inStepTo() const
return if we are currently in stepTo mode
Definition: TapePlayer.h:102
The framework that holds all manager classes and provides startup and shutdown of all framework relat...
void stop()
Stops play back.
Definition: TapePlayer.h:150
bool mPause
Definition: TapePlayer.h:301
std::string mNamespacePrefix
Definition: TapePlayer.h:314
TapeVisitor::iterator mMessage
Definition: TapePlayer.h:311
Duration getCurrentMessageTimeOffset() const
Get the recorded time offset of the currently played or to be played message (if currently paused the...
Definition: TapePlayer.h:241
bool isPlaying() const
Are we currently in playback mode (i.e.
Definition: TapePlayer.h:209