Marsyas
0.6.0-alpha
|
TmVirtualTime reads the insamples information to advance the timer. More...
#include <TmVirtualTime.h>
Inherits TmTimer.
Public Member Functions | |
mrs_natural | intervalsize (std::string interval) |
convert the given interval into a number of samples. | |
mrs_natural | readTimeSrc () |
get the difference between the current source control value and its value since it was last read. | |
void | setSource (MarSystem *ms) |
set the MarSystem that contains the read control. | |
TmVirtualTime () | |
empty constructor. The read source MarSystem and control are zero values and must be updated using setReadCtrl(...) Given the default name: Virtual as in "TmSampleTime/Virtual" | |
TmVirtualTime (std::string name) | |
named constructor. The read source MarSystem and control are zero values and must be updated using setReadCtrl(...). Given the default name: "TmSampleTime/name" | |
TmVirtualTime (std::string name, MarSystem *ms) | |
main constructor. Has identifier "TmSampleCount/Virtual" | |
TmVirtualTime (const TmVirtualTime &s) | |
copy constructor | |
virtual void | updtimer (std::string cname, TmControlValue value) |
update timer values. | |
virtual | ~TmVirtualTime () |
TmVirtualTime reads the insamples information to advance the timer.
Definition at line 39 of file TmVirtualTime.h.
TmVirtualTime | ( | ) |
empty constructor. The read source MarSystem and control are zero values and must be updated using setReadCtrl(...) Given the default name: Virtual as in "TmSampleTime/Virtual"
Definition at line 26 of file TmVirtualTime.cpp.
TmVirtualTime | ( | std::string | name | ) |
named constructor. The read source MarSystem and control are zero values and must be updated using setReadCtrl(...). Given the default name: "TmSampleTime/name"
name | a unique name to call this timer |
Definition at line 31 of file TmVirtualTime.cpp.
TmVirtualTime | ( | std::string | name, |
MarSystem * | ms | ||
) |
main constructor. Has identifier "TmSampleCount/Virtual"
ms | the MarSystem that contains the control to read |
name | the control name to read |
Definition at line 36 of file TmVirtualTime.cpp.
TmVirtualTime | ( | const TmVirtualTime & | s | ) |
~TmVirtualTime | ( | ) | [virtual] |
Definition at line 46 of file TmVirtualTime.cpp.
mrs_natural intervalsize | ( | std::string | interval | ) | [virtual] |
convert the given interval into a number of samples.
The interval must fall within sample time which can include standard time units: us, ms, s, m, h, d. The sample rate used for this function is the value of the mrs_real/israte control of the source MarSystem.
interval | the interval to calculate |
Implements TmTimer.
Definition at line 83 of file TmVirtualTime.cpp.
mrs_natural readTimeSrc | ( | ) | [virtual] |
get the difference between the current source control value and its value since it was last read.
Implements TmTimer.
Definition at line 62 of file TmVirtualTime.cpp.
set the MarSystem that contains the read control.
This method sets the read source to the parameter without checking. It then attempts to get the MarControlPtr for the control unless the read source is NULL or the read ctrl path is "". No warnings are produced.
ms | read source MarSystem |
Definition at line 49 of file TmVirtualTime.cpp.
void updtimer | ( | std::string | cname, |
TmControlValue | value | ||
) | [virtual] |
update timer values.
Allowable control values for this timer are: MarSystem/source, and mrs_string/control.
cname | the control name of a timer value |
value | the value to update the control with |
Reimplemented from TmTimer.
Definition at line 91 of file TmVirtualTime.cpp.