int priority() const
Get the priority of this validator.
uint32_t get_timeout() const
Get the timeout value.
static constexpr uint32_t ERROR_FLAG_NO_ERROR
Data validator error states.
bool used() const
Get the used status of this validator.
static const constexpr unsigned VALUE_EQUAL_COUNT_DEFAULT
if the sensor value is the same (accumulated also between axes) this many times, flag it ...
void reset_state()
Reset the error state of this validator.
static constexpr uint32_t ERROR_FLAG_TIMEOUT
float _lp[dimensions]
low pass value
float _value[dimensions]
last value
float _vibe[dimensions]
vibration level, in sensor unit
static constexpr uint32_t ERROR_FLAG_STALE_DATA
int _priority
sensor nominal priority
unsigned _value_equal_count
equal values in a row
static constexpr uint32_t ERROR_FLAG_HIGH_ERRCOUNT
float _rms[dimensions]
root mean square error
float _M2[dimensions]
RMS component value.
void print()
Print the validator value.
void set_timeout(uint32_t timeout_interval_us)
Set the timeout value.
void setSibling(DataValidator *new_sibling)
Set the sibling to the next node in the group.
uint32_t _timeout_interval
interval in which the datastream times out in us
uint32_t _error_mask
sensor error state
uint64_t _event_count
total data counter
uint32_t state() const
Get the error state of this validator.
float * rms()
Get the RMS values of this validator.
float _mean[dimensions]
mean of value
unsigned _value_equal_count_threshold
when to consider an equal count as a problem
static constexpr uint32_t ERROR_FLAG_NO_DATA
float * value()
Get the values of this validator.
DataValidator * sibling()
Get the next sibling in the group.
static constexpr uint32_t ERROR_FLAG_HIGH_ERRDENSITY
void set_equal_value_threshold(uint32_t threshold)
Set the equal count threshold.
uint64_t _error_count
error count
int _error_density
ratio between successful reads and errors
DataValidator operator=(const DataValidator &)=delete
float * vibration_offset()
Get the vibration offset.
void put(uint64_t timestamp, float val, uint64_t error_count, int priority)
Put an item into the validator.
uint64_t _time_last
last timestamp
static const constexpr unsigned NORETURN_ERRCOUNT
if the error count reaches this value, return sensor as invalid
float confidence(uint64_t timestamp)
Get the confidence of this validator.
DataValidator * _sibling
sibling in the group
static const constexpr float ERROR_DENSITY_WINDOW
window in measurement counts for errors
uint64_t error_count() const
Get the error count of this validator.
static const unsigned dimensions