GNU Radio 3.6.5 C++ API
|
Detect the peak of a signal and repeat every period samples. More...
#include <gr_regenerate_bb.h>
Public Member Functions | |
void | set_max_regen (unsigned int regen) |
Reset the maximum regeneration count; this will reset the current regen. | |
void | set_period (int period) |
Reset the period of regenerations; this will reset the current regen. | |
int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
just like gr_block::general_work, only this arranges to call consume_each for you | |
Friends | |
GR_CORE_API gr_regenerate_bb_sptr | gr_make_regenerate_bb (int period, unsigned int max_regen) |
Make a regenerate block. |
Detect the peak of a signal and repeat every period samples.
If a peak is detected, this block outputs a 1 repeated every period samples until reset by detection of another 1 on the input or stopped after max_regen regenerations have occurred.
Note that if max_regen=(-1)/ULONG_MAX then the regeneration will run forever.
void gr_regenerate_bb::set_max_regen | ( | unsigned int | regen | ) |
Reset the maximum regeneration count; this will reset the current regen.
void gr_regenerate_bb::set_period | ( | int | period | ) |
Reset the period of regenerations; this will reset the current regen.
int gr_regenerate_bb::work | ( | int | noutput_items, |
gr_vector_const_void_star & | input_items, | ||
gr_vector_void_star & | output_items | ||
) | [virtual] |
just like gr_block::general_work, only this arranges to call consume_each for you
The user must override work to define the signal processing code
Implements gr_sync_block.
GR_CORE_API gr_regenerate_bb_sptr gr_make_regenerate_bb | ( | int | period, |
unsigned int | max_regen | ||
) | [friend] |
Make a regenerate block.
period | The number of samples between regenerations |
max_regen | The maximum number of regenerations to perform; if set to ULONG_MAX, it will regenerate continuously. |