GNU Radio 3.6.5 C++ API

gr::blocks::peak_detector2_fb Class Reference

Detect the peak of a signal. More...

#include <peak_detector2_fb.h>

Inheritance diagram for gr::blocks::peak_detector2_fb:
gr_sync_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter gr::blocks::peak_detector2_fb_impl

List of all members.

Public Types

typedef boost::shared_ptr
< peak_detector2_fb
sptr

Public Member Functions

virtual void set_threshold_factor_rise (float thr)=0
 Set the threshold factor value for the rise time.
virtual void set_look_ahead (int look)=0
 Set the look-ahead factor.
virtual void set_alpha (int alpha)=0
 Set the running average alpha.
virtual float threshold_factor_rise ()=0
 Get the threshold factor value for the rise time.
virtual int look_ahead ()=0
 Get the look-ahead factor value.
virtual float alpha ()=0
 Get the alpha value of the running average.

Static Public Member Functions

static sptr make (float threshold_factor_rise=7, int look_ahead=1000, float alpha=0.001)

Detailed Description

Detect the peak of a signal.

If a peak is detected, this block outputs a 1, or it outputs 0's. A separate debug output may be connected, to view the internal EWMA described below.


Member Typedef Documentation


Member Function Documentation

virtual float gr::blocks::peak_detector2_fb::alpha ( ) [pure virtual]

Get the alpha value of the running average.

Returns:
alpha

Implemented in gr::blocks::peak_detector2_fb_impl.

virtual int gr::blocks::peak_detector2_fb::look_ahead ( ) [pure virtual]

Get the look-ahead factor value.

Returns:
look-ahead factor

Implemented in gr::blocks::peak_detector2_fb_impl.

static sptr gr::blocks::peak_detector2_fb::make ( float  threshold_factor_rise = 7,
int  look_ahead = 1000,
float  alpha = 0.001 
) [static]

Build a peak detector block with float in, byte out.

Parameters:
threshold_factor_riseThe threshold factor determins when a peak is present. An EWMA average of the signal is calculated and when the value of the signal goes over threshold_factor_rise*average, we call the peak.
look_aheadThe look-ahead value is used when the threshold is found to locate the peak within this range.
alphaThe gain value of a single-pole moving average filter.
virtual void gr::blocks::peak_detector2_fb::set_alpha ( int  alpha) [pure virtual]

Set the running average alpha.

Parameters:
alphanew alpha for running average

Implemented in gr::blocks::peak_detector2_fb_impl.

virtual void gr::blocks::peak_detector2_fb::set_look_ahead ( int  look) [pure virtual]

Set the look-ahead factor.

Parameters:
looknew look-ahead factor

Implemented in gr::blocks::peak_detector2_fb_impl.

virtual void gr::blocks::peak_detector2_fb::set_threshold_factor_rise ( float  thr) [pure virtual]

Set the threshold factor value for the rise time.

Parameters:
thrnew threshold factor

Implemented in gr::blocks::peak_detector2_fb_impl.

virtual float gr::blocks::peak_detector2_fb::threshold_factor_rise ( ) [pure virtual]

Get the threshold factor value for the rise time.

Returns:
threshold factor

Implemented in gr::blocks::peak_detector2_fb_impl.


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