Buffer for sensor data. It is used by chart control.
More...
#include <TimeSerieBuffer.h>
|
| TimeSerieBuffer (float time_step, float factor_y, int reserved_size, int size) |
| Constructor. More...
|
|
| TimeSerieBuffer (float time_step, float factor_y, int size) |
| Constructor. More...
|
|
bool | SetSize (int size) |
| Sets actual buffer size. It has to be less or equal to reserved_size.
|
|
float | SetTimeStep (float time_step) |
| Sets time interval between samples in buffer.
|
|
float | SetFactorY (float factor_y) |
| Sets scale factor for mesaurements.
|
|
void | Set (unsigned int index, float value) |
| Puts value into buffer. More...
|
|
int * | Y () |
| Returns point to vaues array. It is used for direct access to internal buffer.
|
|
void | MinMax (float &min_x, float &max_x, float &min_y, float &max_y) |
| Returns min and max value for buffer data.
|
|
float | X (unsigned int index) |
| Returns X that is calculated from index in buffer (see time_step parameter)
|
|
float | Y (unsigned int index) |
| Returns scaled value Y from buffer for specified index.
|
|
unsigned int | StartIndex () |
| Returns start index in buffer. For this class is always 0.
|
|
unsigned int | Size () |
| Returns buffer size.
|
|
|
void | initialize (float time_step, float factor_y, int reserved_size, int size) |
| Initialize internal buffer.
|
|
Buffer for sensor data. It is used by chart control.
TimeSerieBuffer::TimeSerieBuffer |
( |
float |
time_step, |
|
|
float |
factor_y, |
|
|
int |
reserved_size, |
|
|
int |
size |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
time_step | time interval between samples in buffer |
factor_y | scale factor for measurements. Data can be stored as volts measured directly on board pins and this factor transform them into phisical units |
reserved_size | expected buffer size. This value allows buffer allocation only once. This is highly recomended because memory allocation is expencive operation. Mutiple allocation leads also to memory fragmentation. |
size | actual buffer size |
TimeSerieBuffer::TimeSerieBuffer |
( |
float |
time_step, |
|
|
float |
factor_y, |
|
|
int |
size |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
time_step | time interval between samples in buffer |
factor_y | scale factor for measurements. Data can be stored as volts measured directly on board pins and this factor transform them into phisical units |
size | actual buffer size. reserved_size=size |
void TimeSerieBuffer::Set |
( |
unsigned int |
index, |
|
|
float |
value |
|
) |
| |
|
inline |
Puts value into buffer.
- Parameters
-
index | index in buffer. It has to be less than size |
value | value to save in the buffer |
The documentation for this class was generated from the following file: