summaryrefslogtreecommitdiff
path: root/gr-blocks/include/gnuradio/blocks/probe_signal_v.h
blob: 4c52c74103832635b9309912c607040970ce462b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* -*- c++ -*- */
/*
 * Copyright 2005,2012-2013,2018 Free Software Foundation, Inc.
 *
 * This file is part of GNU Radio
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 */

#ifndef PROBE_SIGNAL_V_H
#define PROBE_SIGNAL_V_H

#include <gnuradio/blocks/api.h>
#include <gnuradio/sync_block.h>
#include <cstdint>
#include <vector>

namespace gr {
namespace blocks {

/*!
 * \brief Sink that allows a vector of samples to be grabbed from Python.
 * \ingroup sink_blk
 * \ingroup measurement_tools_blk
 */
template <class T>
class BLOCKS_API probe_signal_v : virtual public sync_block
{
public:
    typedef std::shared_ptr<probe_signal_v<T>> sptr;

    static sptr make(size_t size);

    virtual std::vector<T> level() const = 0;
};

typedef probe_signal_v<std::uint8_t> probe_signal_vb;
typedef probe_signal_v<std::int16_t> probe_signal_vs;
typedef probe_signal_v<std::int32_t> probe_signal_vi;
typedef probe_signal_v<float> probe_signal_vf;
typedef probe_signal_v<gr_complex> probe_signal_vc;

} /* namespace blocks */
} /* namespace gr */

#endif /* PROBE_SIGNAL_V_H */