GNU Radio 3.6.5.1 C++ API
bin_statistics_f.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2006,2013 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
7
* GNU Radio is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3, or (at your option)
10
* any later version.
11
*
12
* GNU Radio is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with GNU Radio; see the file COPYING. If not, write to
19
* the Free Software Foundation, Inc., 51 Franklin Street,
20
* Boston, MA 02110-1301, USA.
21
*/
22
23
#ifndef INCLUDED_GR_BIN_STATISTICS_F_H
24
#define INCLUDED_GR_BIN_STATISTICS_F_H
25
26
#include <
blocks/api.h
>
27
#include <
gr_sync_block.h
>
28
#include <
gr_msg_queue.h
>
29
#include <
gr_feval.h
>
30
31
namespace
gr {
32
namespace
blocks {
33
34
/*!
35
* \brief control scanning and record frequency domain statistics
36
* \ingroup sink_blk
37
*/
38
class
BLOCKS_API
bin_statistics_f
:
virtual
public
gr_sync_block
39
{
40
protected
:
41
std::vector<float>
d_max
;
// per bin maxima
42
43
virtual
size_t
vlen()
const
= 0;
44
virtual
double
center_freq()
const
= 0;
45
virtual
gr_msg_queue_sptr
msgq()
const
= 0;
46
47
virtual
void
reset_stats() = 0;
48
virtual
void
accrue_stats(
const
float
*input) = 0;
49
virtual
void
send_stats() = 0;
50
51
public
:
52
// gr::blocks::bin_statistics_f::sptr
53
typedef
boost::shared_ptr<bin_statistics_f>
sptr
;
54
55
/*!
56
* Build a bin statistics block. See qa_bin_statistics.py and
57
* gr-uhd/examples/python/usrp_spectrum_sense.py for examples of
58
* its use, specifically how to use the callback function.
59
*
60
* \param vlen vector length
61
* \param msgq message queue
62
* \param tune a gr_feval_dd callback function
63
* \param tune_delay number of samples for the tune delay
64
* \param dwell_delay number of samples for the dwell delay
65
*/
66
static
sptr
make(
unsigned
int
vlen,
// vector length
67
gr_msg_queue_sptr
msgq,
68
gr_feval_dd
*tune,
// callback
69
size_t
tune_delay,
// samples
70
size_t
dwell_delay);
// samples
71
};
72
73
}
/* namespace blocks */
74
}
/* namespace gr */
75
76
#endif
/* INCLUDED_GR_BIN_STATISTICS_F_H */
gr-blocks
include
blocks
bin_statistics_f.h
Generated on Mon Aug 19 2013 15:37:29 for GNU Radio 3.6.5.1 C++ API by
1.8.1.2