GNU Radio 3.7.1 C++ API
|
throttle flow of samples such that the average rate does not exceed samples_per_sec. More...
#include <throttle.h>
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) |
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.
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.
virtual void gr::blocks::throttle::set_sample_rate | ( | double | rate | ) | [pure virtual] |
Sets the sample rate in samples per second.