SF2 Core Class Library
Sensor Fusion Framework (SF2)
|
Public Member Functions | |
TimestampedValue (T &value) | |
Default constructor for a TimestampedValue<T>; initializes all values to reasonable defaults. | |
TimestampedValue (T &src, long timestamp) | |
Constructor allowing a TimestampedValue<T> to be created from a T object and a timestamp. More... | |
TimestampedValue (TimestampedValue< T > &src) | |
Copy constructor; initializes all values to that of the source TimestampedValue<T>. More... | |
long | getTimestamp () |
Returns the timestamp for this TimestampedValue. | |
void | setTimestamp (long timestamp) |
void | set (TimestampedValue< T > &src) |
Initalizes this TimestampedValue to be equal to the source TimestampedValue. More... | |
void | set (T &src, long timestamp) |
Initializes this TimestampedValue to be equal to the source value object and a timestamp. More... | |
T & | getValue () |
bool | getInterpolated () |
If true, this TimestampedValue<T> was interpolated, otherwise it is an actual (measured) TimestampedValue<T> | |
void | setInterpolated (bool interpolated) |
Modifies this TimestampedValue<T>'s interpolated state; if true, this TimestampedValue<T> was interpolated; otherwise, it is an actual (measured) TimestampedValue<T>. | |
void | interpolate (TimestampedValue< T > &to, double time_ratio, TimestampedValue< T > &out) |
Modifies this TimestampedValue (representing the "from" value) to represent a new value and Timestamp value which is located at a ratio (in time) between itself and a "to" TimestampedValue. More... | |
void | copy (TimestampedValue< T > &t) |
Initalizes this TimestampedValue to be equal to the source TimestampedValue. More... | |
bool | getValid () |
Returns whether this TimestampedValue is valid or not. More... | |
void | setValid (bool valid) |
Sets whether this TimestampedValue is valid or not. More... | |
TimestampedValue< T > * | instantiate_copy () |
IQuantity & | getQuantity () |
Protected Attributes | |
T | value |
long | timestamp |
uint8_t | flags |
Static Protected Attributes | |
static const uint8_t | valid_flag = 0x01 |
static const uint8_t | interpolated_flag = 0x02 |
|
inline |
Constructor allowing a TimestampedValue<T> to be created from a T object and a timestamp.
src | - source T object |
timestamp | - timestamp representing the time at which the source value is valid. |
|
inline |
Copy constructor; initializes all values to that of the source TimestampedValue<T>.
src | - source TimestampedValue<T> |
|
inlinevirtual |
Initalizes this TimestampedValue to be equal to the source TimestampedValue.
src | - source TimestampedValue |
Implements IValueInterpolator< TimestampedValue< T > >.
|
inlinevirtual |
Returns whether this TimestampedValue is valid or not.
This can be used when the TimestampedValue is stored within a statically-allocated data structure, allowing reuse of the same object without requiring the destruction/reconstruction of a new object.
Implements ITimestampedValue.
|
inlinevirtual |
Modifies this TimestampedValue (representing the "from" value) to represent a new value and Timestamp value which is located at a ratio (in time) between itself and a "to" TimestampedValue.
This actual method of interpolation used depends upon the value type (T).
Implements IValueInterpolator< TimestampedValue< T > >.
|
inline |
Initalizes this TimestampedValue to be equal to the source TimestampedValue.
src | - source TimestampedValue |
|
inline |
Initializes this TimestampedValue to be equal to the source value object and a timestamp.
src | - source Quaternion |
timestamp | - timestamp representing the time at which the source value object is valid. |
|
inlinevirtual |
Sets whether this TimestampedValue is valid or not.
This can be used when the TimestampedValue is stored within a statically-allocated data structure, allowing reuse of the same object without requiring the destruction/reconstruction of a new object.
Implements ITimestampedValue.