GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
rfnoc_rx_streamer.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2019 Ettus Research, a National Instruments Brand.
4  * Copyright 2020 Free Software Foundation, Inc.
5  *
6  * SPDX-License-Identifier: GPL-3.0-or-later
7  */
8 
9 #ifndef INCLUDED_GR_UHD_RFNOC_RX_STREAMER_H
10 #define INCLUDED_GR_UHD_RFNOC_RX_STREAMER_H
11 
12 #include <gnuradio/sync_block.h>
13 #include <gnuradio/uhd/api.h>
15 #include <uhd/stream.hpp>
16 
17 namespace gr {
18 namespace uhd {
19 
20 /*! RFNoC Rx Streamer: Block to handle data flow from an RFNoC flow graph into
21  * a GNU Radio flow graph.
22  *
23  * Use this block for ingress into a GNU Radio flow graph. "Rx" is from the
24  * viewpoint of the GNU Radio flow graph. For example, if the GNU Radio flow
25  * graph is receiving samples from a radio, use this block to transport the
26  * samples into GNU Radio.
27  *
28  * Note: The input ports of this block can only connect to other RFNoC blocks.
29  *
30  * \ingroup uhd_blk
31  */
33 {
34 public:
35  typedef std::shared_ptr<rfnoc_rx_streamer> sptr;
36 
37  /*!
38  * \param graph Reference to the graph this block is connected to
39  * \param num_chans Number of input- and output ports
40  * \param stream_args These will be passed on to
41  * rfnoc_graph::create_rx_streamer, see that for details.
42  * The cpu_format and otw_format parts of these args will
43  * be used to determine the in- and output signatures of
44  * this block.
45  * \param vlen Vector length
46  * \param issue_stream_cmd_on_start If true, the streamer sends a stream
47  * command upstream.
48  * \param start_time_set If true, set start time spec to the stream command
49  * \param start_time The time spec for the stream command if start_time_set is true
50  */
51  static sptr make(rfnoc_graph::sptr graph,
52  const size_t num_chans,
53  const ::uhd::stream_args_t& stream_args,
54  const size_t vlen = 1,
55  const bool issue_stream_cmd_on_start = true,
56  const bool start_time_set = false,
57  const ::uhd::time_spec_t& start_time = ::uhd::time_spec_t(0.0));
58 
59  //! Return the unique ID associated with the underlying RFNoC streamer
60  virtual std::string get_unique_id() const = 0;
61 };
62 
63 } // namespace uhd
64 } // namespace gr
65 
66 #endif /* INCLUDED_GR_UHD_RFNOC_RX_STREAMER_H */
synchronous 1:1 input to output with history
Definition: sync_block.h:26
std::shared_ptr< rfnoc_graph > sptr
Definition: rfnoc_graph.h:32
Definition: rfnoc_rx_streamer.h:33
static sptr make(rfnoc_graph::sptr graph, const size_t num_chans, const ::uhd::stream_args_t &stream_args, const size_t vlen=1, const bool issue_stream_cmd_on_start=true, const bool start_time_set=false, const ::uhd::time_spec_t &start_time=::uhd::time_spec_t(0.0))
virtual std::string get_unique_id() const =0
Return the unique ID associated with the underlying RFNoC streamer.
std::shared_ptr< rfnoc_rx_streamer > sptr
Definition: rfnoc_rx_streamer.h:35
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29