GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
ctrlport_probe2_i.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 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_CTRLPORT_PROBE2_I_H
12 #define INCLUDED_CTRLPORT_PROBE2_I_H
13 
14 #include <gnuradio/blocks/api.h>
15 #include <gnuradio/sync_block.h>
16 
17 namespace gr {
18 namespace blocks {
19 
20 /*!
21  * \brief A ControlPort probe to export vectors of signals.
22  * \ingroup measurement_tools_blk
23  * \ingroup controlport_blk
24  *
25  * \details
26  * This block acts as a sink in the flowgraph but also exports
27  * vectors of complex samples over ControlPort. This block holds
28  * the latest \p len number of complex samples so that every query
29  * by a ControlPort client will get the same length vector.
30  */
31 class BLOCKS_API ctrlport_probe2_i : virtual public sync_block
32 {
33 public:
34  // gr::blocks::ctrlport_probe2_i::sptr
35  typedef std::shared_ptr<ctrlport_probe2_i> sptr;
36 
37  /*!
38  * \brief Make a ControlPort probe block.
39  * \param id A string ID to name the probe over ControlPort.
40  * \param desc A string describing the probe.
41  * \param len Number of samples to transmit.
42  * \param disp_mask Mask to set default display params.
43  */
44  static sptr
45  make(const std::string& id, const std::string& desc, int len, unsigned int disp_mask);
46 
47  virtual std::vector<int> get() = 0;
48 
49  virtual void set_length(int len) = 0;
50  virtual int length() const = 0;
51 };
52 
53 } /* namespace blocks */
54 } /* namespace gr */
55 
56 #endif /* INCLUDED_CTRLPORT_PROBE2_I_H */
A ControlPort probe to export vectors of signals.
Definition: ctrlport_probe2_i.h:32
virtual std::vector< int > get()=0
std::shared_ptr< ctrlport_probe2_i > sptr
Definition: ctrlport_probe2_i.h:35
virtual int length() const =0
virtual void set_length(int len)=0
static sptr make(const std::string &id, const std::string &desc, int len, unsigned int disp_mask)
Make a ControlPort probe block.
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
GNU Radio logging wrapper.
Definition: basic_block.h:29