SampleAndHold Class Reference
This is a Measure operator which, upon occurrence of a designated event, samples its source Measure and then holds its value in a discrete state variable until the next occurrence of the event.
More...
#include <Measure.h>
List of all members.
Detailed Description
template<class T>
class SimTK::Measure_< T >::SampleAndHold
This is a Measure operator which, upon occurrence of a designated event, samples its source Measure and then holds its value in a discrete state variable until the next occurrence of the event.
Any type of data can be sampled this way.
Information available from this Measure:
- the held value (Time stage)
- time of last sample
- the DiscreteVariableIndex holding the sampled value
- a reference to the operand Measure
Study initialization is always considered a sampling event. This measure has no time derivative.
Constructor & Destructor Documentation
Member Function Documentation
EventIndex getEvent |
( |
|
) |
const |
void sample |
( |
State & |
s |
) |
const |
Force this Measure to sample its input at the current time.
void setValue |
( |
State & |
s, |
|
|
const T & |
value | |
|
) |
| | const |
Set the held value to a particular value, unrelated to the source.
The time stamp will be taken from the supplied State.
The documentation for this class was generated from the following file: