class::dsp::SignalQ31

class dsp::SignalQ31
  : public dsp::SignalData< SignalQ31, q31_t, q63_t >

The SignalQ31 class stores a real q1.31 data signal.

Members

SignalQ31(

const arg::Count count
)

SignalQ31()
virtual SignalQ31 abs() const
void abs(

SignalQ31 & output
) const

SignalQ31 add(

q31_t offset_value
) const

virtual SignalQ31 add(

const SignalQ31 & a
) const

SignalQ31 & add_assign(

q31_t offset_value
)

virtual SignalQ31 & add_assign(

const SignalQ31 & a
)

SignalQ31 convolve(

const SignalQ31 & a
) const

void convolve(

SignalQ31 & output,
const SignalQ31 & a
) const

q63_t dot_product(

const SignalQ31 & a
) const

SignalQ31 filter(

const FirFilterQ31 & filter
) const

void filter(

SignalQ31 & output,
const FirFilterQ31 & filter
) const

SignalQ31 filter(

const BiquadFilterQ31 & filter
) const

void filter(

SignalQ31 & output,
const BiquadFilterQ31 & filter
) const

SignalQ31 filter(

const FirDecimateFilterQ31 & filter
)

void filter(

SignalQ31 & output,
const FirDecimateFilterQ31 & filter
)

virtual bool is_api_available() const
virtual q31_t max() const
virtual q31_t max(

u32 & idx
) const

virtual q31_t mean() const
virtual q31_t min() const
virtual q31_t min(

u32 & idx
) const

SignalQ31 multiply(

q31_t value
) const

virtual SignalQ31 multiply(

const SignalQ31 & a
) const

SignalQ31 & multiply_assign(

q31_t value
)

virtual SignalQ31 & multiply_assign(

const SignalQ31 & a
)

virtual SignalQ31 negate() const
void negate(

SignalQ31 & output
) const

virtual q63_t power() const
virtual q31_t rms() const
SignalQ31 scale(

q31_t scale_fraction,
s8 shift
) const

void scale(

SignalQ31 & output,
q31_t scale_fraction,
s8 shift
) const

void shift(

SignalQ31 & output,
s8 value
) const

virtual SignalQ31 shift(

s8 value
) const

virtual SignalQ31 & shift_assign(

s8 value
)

virtual q31_t std() const
virtual SignalQ31 subtract(

const SignalQ31 & a
) const

virtual SignalQ31 & subtract_assign(

const SignalQ31 & a
)

virtual q31_t variance() const
static SignalQ31 create_sin_wave(

u32 wave_freauency,
u32 sampling_frequency,
u32 nsamples,
q31_t phase
)

Details

SignalQ31(

const arg::Count count
)

Constructs a signal with uninitialized values.

Parameters

  • count The number of data points

SignalQ31()

Contructs an empty signal.


virtual SignalQ31 abs() const

Calculates the absolute value of each value in the signal.

Returns

A new signal containing the absolute value of this signal.

This method will allocate a new signal and return it.


void abs(

SignalQ31 & output
) const


SignalQ31 add(

q31_t offset_value
) const


virtual SignalQ31 add(

const SignalQ31 & a
) const


SignalQ31 & add_assign(

q31_t offset_value
)


virtual SignalQ31 & add_assign(

const SignalQ31 & a
)


SignalQ31 convolve(

const SignalQ31 & a
) const


void convolve(

SignalQ31 & output,
const SignalQ31 & a
) const


q63_t dot_product(

const SignalQ31 & a
) const


SignalQ31 filter(

const FirFilterQ31 & filter
) const


void filter(

SignalQ31 & output,
const FirFilterQ31 & filter
) const


SignalQ31 filter(

const BiquadFilterQ31 & filter
) const


void filter(

SignalQ31 & output,
const BiquadFilterQ31 & filter
) const


SignalQ31 filter(

const FirDecimateFilterQ31 & filter
)


void filter(

SignalQ31 & output,
const FirDecimateFilterQ31 & filter
)


virtual bool is_api_available() const

virtual q31_t max() const

Calculates and returns the maximum value of the signal.

This method utilizes the arm_max_q15() function.


virtual q31_t max(

u32 & idx
) const

Calculates and returns the maximum value of the signal.

Parameters

  • idx A reference to the index value of the maximum. This parameter will be written with the location of the maximum value.

This method utilizes the arm_max_q15() function.


virtual q31_t mean() const

Returns the mean value of the signal.

SignalQ31 data(16);

data.fill(10);
printf("Mean is %ld\n", data.mean());

virtual q31_t min() const

Calculates and returns the minimum value of the signal.

This method utilizes the arm_min_q15() function.


virtual q31_t min(

u32 & idx
) const

Calculates and returns the minimum value of the signal.

Parameters

  • idx A reference to the index value of the minimum. This parameter will be written with the location of the minimum value.

This method utilizes the arm_min_q15() function.


SignalQ31 multiply(

q31_t value
) const


virtual SignalQ31 multiply(

const SignalQ31 & a
) const


SignalQ31 & multiply_assign(

q31_t value
)


virtual SignalQ31 & multiply_assign(

const SignalQ31 & a
)


virtual SignalQ31 negate() const

Returns a new signal that a negated copy of this signal.

This method uses dynamic memory allocation.


void negate(

SignalQ31 & output
) const


virtual q63_t power() const

virtual q31_t rms() const

Calculates the RMS value of the signal.


SignalQ31 scale(

q31_t scale_fraction,
s8 shift
) const


void scale(

SignalQ31 & output,
q31_t scale_fraction,
s8 shift
) const


void shift(

SignalQ31 & output,
s8 value
) const


virtual SignalQ31 shift(

s8 value
) const


virtual SignalQ31 & shift_assign(

s8 value
)


virtual q31_t std() const

Calculates and returns the standard deviation value of the signal.

This method utilizes the arm_std_q15() function.


virtual SignalQ31 subtract(

const SignalQ31 & a
) const


virtual SignalQ31 & subtract_assign(

const SignalQ31 & a
)


virtual q31_t variance() const

Calculates and returns the variance value of the signal.

This method utilizes the arm_var_q15() function.


static SignalQ31 create_sin_wave(

u32 wave_freauency,
u32 sampling_frequency,
u32 nsamples,
q31_t phase
)


X

Thanks for Coming!

Subscribe to news and updates