| PX4 Firmware
    PX4 Autopilot Software http://px4.io | 
#include <validation/data_validator.h>Go to the source code of this file.
| Functions | |
| void | insert_values_around_mean (DataValidator *validator, const float mean, uint32_t count, float *rms_err, uint64_t *timestamp_io) | 
| Insert a series of samples around a mean value.  More... | |
| void | dump_validator_state (DataValidator *validator) | 
| Print out the state of a DataValidator.  More... | |
| void | fill_validator_with_samples (DataValidator *validator, const float incr_value, float *value_io, uint64_t *timestamp_io) | 
| Insert a time series of samples into the validator.  More... | |
| void dump_validator_state | ( | DataValidator * | validator | ) | 
Print out the state of a DataValidator.
| validator | 
Definition at line 64 of file tests_common.cpp.
References DataValidator::ERROR_FLAG_NO_DATA, DataValidator::ERROR_FLAG_STALE_DATA, DataValidator::ERROR_FLAG_TIMEOUT, DataValidator::print(), state, and DataValidator::state().
Referenced by test_error_tracking(), test_put(), and test_stale_detector().
| void fill_validator_with_samples | ( | DataValidator * | validator, | 
| const float | incr_value, | ||
| float * | value_io, | ||
| uint64_t * | timestamp_io | ||
| ) | 
Insert a time series of samples into the validator.
| validator | |
| incr_value | The amount to increment the value by on each iteration | 
| value_io | (in/out) in: initial value, out: final value | 
| timestamp_io | (in/out) in: initial timestamp, out: final timestamp | 
Definition at line 77 of file tests_common.cpp.
References equal_value_count, DataValidator::put(), DataValidator::set_equal_value_threshold(), and DataValidator::set_timeout().
Referenced by test_put(), test_sensor_failure(), and test_stale_detector().
| void insert_values_around_mean | ( | DataValidator * | validator, | 
| const float | mean, | ||
| uint32_t | count, | ||
| float * | rms_err, | ||
| uint64_t * | timestamp_io | ||
| ) | 
Insert a series of samples around a mean value.
| validator | The validator under test | 
| mean | The mean value | 
| count | The number of samples to insert in the validator | 
| rms_err | (out) calculated rms error of the inserted samples | 
| timestamp_io | (in/out) in: start timestamp, out: last timestamp | 
Definition at line 38 of file tests_common.cpp.
References f(), DataValidator::put(), and matrix::sqrt().
Referenced by test_rms_calculation(), and test_vibration().