131 FilterFifo3F() =
delete;
133 FilterFifo3F(
size_t size)
147 unsafeGetFilterFifo()
158 push(
const xrt_vec3 &sample, uint64_t timestamp_ns)
169 get(
size_t num,
xrt_vec3 *out_sample, uint64_t *out_timestamp_ns)
180 filter(uint64_t start_ns, uint64_t stop_ns,
struct xrt_vec3 *out_average)
void m_ff_f64_push(struct m_ff_f64 *ff, const double *sample, uint64_t timestamp_ns)
Pushes a sample at the given timepoint, pushing samples out of order yields unspecified behaviour,...
Definition: m_filter_fifo.c:258
bool m_ff_f64_get(struct m_ff_f64 *ff, size_t num, double *out_sample, uint64_t *out_timestamp_ns)
Return the sample at the index, 0 means the last sample push, 1 second-to-last, etc.
Definition: m_filter_fifo.c:271
void m_ff_f64_alloc(struct m_ff_f64 **ff_out, size_t num)
Allocates a filter fifo tracking num samples and fills it with num samples at timepoint zero.
Definition: m_filter_fifo.c:231
void m_ff_vec3_f32_free(struct m_ff_vec3_f32 **ff_ptr)
Frees the given filter fifo and all its samples.
Definition: m_filter_fifo.c:79
void m_ff_vec3_f32_push(struct m_ff_vec3_f32 *ff, const struct xrt_vec3 *sample, uint64_t timestamp_ns)
Pushes a sample at the given timepoint, pushing samples out of order yields unspecified behaviour,...
Definition: m_filter_fifo.c:98
void m_ff_vec3_f32_alloc(struct m_ff_vec3_f32 **ff_out, size_t num)
Allocates a filter fifo tracking num samples and fills it with num samples at timepoint zero.
Definition: m_filter_fifo.c:71
size_t m_ff_vec3_f32_filter(struct m_ff_vec3_f32 *ff, uint64_t start_ns, uint64_t stop_ns, struct xrt_vec3 *out_average)
Averages all samples in the fifo between the two timepoints, returns number of samples sampled,...
Definition: m_filter_fifo.c:125
bool m_ff_vec3_f32_get(struct m_ff_vec3_f32 *ff, size_t num, struct xrt_vec3 *out_sample, uint64_t *out_timestamp_ns)
Return the sample at the index, zero means the last sample push, one second last and so on.
Definition: m_filter_fifo.c:111
void m_ff_f64_free(struct m_ff_f64 **ff_ptr)
Frees the given filter fifo and all its samples.
Definition: m_filter_fifo.c:239
size_t m_ff_f64_filter(struct m_ff_f64 *ff, uint64_t start_ns, uint64_t stop_ns, double *out_average)
Averages all samples in the fifo between the two timepoints, returns number of samples sampled,...
Definition: m_filter_fifo.c:285
size_t m_ff_vec3_f32_get_num(struct m_ff_vec3_f32 *ff)
Return the number of samples that can fill the fifo.
Definition: m_filter_fifo.c:92
size_t m_ff_f64_get_num(struct m_ff_f64 *ff)
Return the number of samples that can fill the fifo.
Definition: m_filter_fifo.c:252
Definition: m_filter_fifo.c:183
Definition: m_filter_fifo.c:23
A 3 element vector with single floats.
Definition: xrt_defines.h:271
static const cJSON * get(const cJSON *json, const char *f)
Less typing.
Definition: u_json.c:36
Common defines and enums for XRT.