GNU Radio 3.6.5 C++ API

gr::blocks::throttle Class Reference

throttle flow of samples such that the average rate does not exceed samples_per_sec. More...

#include <throttle.h>

Inheritance diagram for gr::blocks::throttle:
gr_sync_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter gr::blocks::throttle_impl

List of all members.

Public Types

typedef boost::shared_ptr
< throttle
sptr

Public Member Functions

virtual void set_sample_rate (double rate)=0
 Sets the sample rate in samples per second.
virtual double sample_rate () const =0
 Get the sample rate in samples per second.

Static Public Member Functions

static sptr make (size_t itemsize, double samples_per_sec)

Detailed Description

throttle flow of samples such that the average rate does not exceed samples_per_sec.

input: one stream of itemsize; output: one stream of itemsize

N.B. this should only be used in GUI apps where there is no other rate limiting block. It is not intended nor effective at precisely controlling the rate of samples. That should be controlled by a source or sink tied to sample clock. E.g., a USRP or audio card.


Member Typedef Documentation


Member Function Documentation

static sptr gr::blocks::throttle::make ( size_t  itemsize,
double  samples_per_sec 
) [static]
virtual double gr::blocks::throttle::sample_rate ( ) const [pure virtual]

Get the sample rate in samples per second.

Implemented in gr::blocks::throttle_impl.

virtual void gr::blocks::throttle::set_sample_rate ( double  rate) [pure virtual]

Sets the sample rate in samples per second.

Implemented in gr::blocks::throttle_impl.


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