GNU Radio 3.4.2 C++ API
gr_regenerate_bb Class Reference

Detect the peak of a signal and repeat every period samplesIf 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. More...

#include <gr_regenerate_bb.h>

Inheritance diagram for gr_regenerate_bb:

List of all members.

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_regenerate_bb_sptr gr_make_regenerate_bb (int period, unsigned int max_regen)
 Make a regenerate block.

Detailed Description

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.


Member Function Documentation

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.


Friends And Related Function Documentation

gr_regenerate_bb_sptr gr_make_regenerate_bb ( int  period,
unsigned int  max_regen 
) [friend]

Make a regenerate block.

Parameters:
periodThe number of samples between regenerations
max_regenThe maximum number of regenerations to perform; if set to ULONG_MAX, it will regenerate continuously.

The documentation for this class was generated from the following file: