XTOS / OPEN SOURCE REAL-TIME SYSTEMOPEN SOURCE · VERSION 0.9.0 · BUILD FROM SOURCE
libxtos-signalxtos_bandpass_process

xtos_bandpass_process

Runs the band-pass baseline’s high-pass and low-pass stages in sequence.

On this page

Declaration

c
#include <xtos/signal.h>

int xtos_bandpass_process(struct xtos_bandpass_filter *filter,
                          const double *input,
                          double *output,
                          size_t count);

Parameters

ParameterTypeDescription
filterstruct xtos_bandpass_filter *Non-NULL state; do not share the same state concurrently.
inputconst double *Non-NULL input with at least count entries; it may equal output exactly.
outputdouble *Non-NULL output with at least count entries; do not use partially overlapping arrays.
countsize_tNumber of elements; zero is allowed.

Return value

Returns 0 on success and -1 for invalid arguments; success updates both stage states.

Errors

errnoCondition
EINVALfilter, input, or output is NULL.

Notes

  • The implementation calls two non-allocating process stages; it does not check input NaN/Inf.
  • Exact in-place processing is supported; do not reinitialize for every analysis window when filtering a continuous signal.

Example

Source

This reference describes headers and implementation at OpenXTOS commit dd313955ad57542bcd2af8827157d1bbd0cf5e83.