GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
probe_rate.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2005,2013 Free Software Foundation, Inc.
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef INCLUDED_BLOCKS_PROBE_RATE_H
12#define INCLUDED_BLOCKS_PROBE_RATE_H
13
14#include <gnuradio/blocks/api.h>
15#include <gnuradio/sync_block.h>
16
17namespace gr {
18namespace blocks {
19
20/*!
21 * \brief throughput measurement
22 * \ingroup measurement_tools_blk
23 */
24class BLOCKS_API probe_rate : virtual public sync_block
25{
26public:
27 // gr::blocks::probe_rate::sptr
28 typedef std::shared_ptr<probe_rate> sptr;
29
30 /*!
31 * \brief Make a throughput measurement block
32 * \param itemsize size of each stream item
33 * \param update_rate_ms minimum update time in milliseconds
34 * \param alpha gain for running average filter
35 */
36 static sptr
37 make(size_t itemsize, double update_rate_ms = 500.0, double alpha = 0.0001);
38
39 virtual void set_alpha(double alpha) = 0;
40
41 virtual double rate() = 0;
42
43 bool start() override = 0;
44 bool stop() override = 0;
45};
46
47} /* namespace blocks */
48} /* namespace gr */
49
50#endif /* INCLUDED_BLOCKS_PROBE_RATE_H */
throughput measurement
Definition: probe_rate.h:25
static sptr make(size_t itemsize, double update_rate_ms=500.0, double alpha=0.0001)
Make a throughput measurement block.
virtual double rate()=0
bool start() override=0
Called to enable drivers, etc for i/o devices.
bool stop() override=0
Called to disable drivers, etc for i/o devices.
std::shared_ptr< probe_rate > sptr
Definition: probe_rate.h:28
virtual void set_alpha(double alpha)=0
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GR_RUNTIME_API size_t itemsize(types::vector_type type)
GNU Radio logging wrapper.
Definition: basic_block.h:29