GNU Radio Manual and C++ API Reference  v3.9.2.0-89-gb7c7001e
The Free & Open Software Radio Ecosystem
ctrlport_probe_c.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2012-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_PROBE_C_H
12 #define INCLUDED_CTRLPORT_PROBE_C_H
13 
14 #include <gnuradio/blocks/api.h>
16 #include <gnuradio/sync_block.h>
17 #include <boost/thread/shared_mutex.hpp>
18 
19 namespace gr {
20 namespace blocks {
21 
22 /*!
23  * \brief A ControlPort probe to export vectors of signals.
24  * \ingroup measurement_tools_blk
25  * \ingroup controlport_blk
26  *
27  * \details
28  * This block acts as a sink in the flowgraph but also exports
29  * vectors of complex samples over ControlPort. This block simply
30  * sends the current vector held in the work function when the
31  * queried by a ControlPort client.
32  */
33 class BLOCKS_API ctrlport_probe_c : virtual public sync_block
34 {
35 public:
36  // gr::blocks::ctrlport_probe_c::sptr
37  typedef std::shared_ptr<ctrlport_probe_c> sptr;
38 
39  /*!
40  * \brief Make a ControlPort probe block.
41  * \param id A string ID to name the probe over ControlPort.
42  * \param desc A string describing the probe.
43  */
44  static sptr make(const std::string& id, const std::string& desc);
45 
46  virtual std::vector<gr_complex> get() = 0;
47 };
48 
49 } /* namespace blocks */
50 } /* namespace gr */
51 
52 #endif /* INCLUDED_CTRLPORT_GR_CTRLPORT_PROBE_C_H */
A ControlPort probe to export vectors of signals.
Definition: ctrlport_probe_c.h:34
virtual std::vector< gr_complex > get()=0
static sptr make(const std::string &id, const std::string &desc)
Make a ControlPort probe block.
std::shared_ptr< ctrlport_probe_c > sptr
Definition: ctrlport_probe_c.h:37
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 for log4cpp library (C++ port of log4j)
Definition: basic_block.h:29