GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
pdu_to_stream.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2021 NTESS LLC.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  *
10  */
11 
12 #ifndef INCLUDED_PDU_PDU_TO_STREAM_H
13 #define INCLUDED_PDU_PDU_TO_STREAM_H
14 
15 #include <gnuradio/pdu.h>
16 #include <gnuradio/pdu/api.h>
17 #include <gnuradio/sync_block.h>
18 
19 namespace gr {
20 namespace pdu {
21 
26 };
27 
28 /*!
29  * \brief Emit a PDU data as a simple GR stream.
30  *
31  * The PDU to Stream block takes data stored in the uniform vector PDU
32  * and emits it with UHD style tx_sob and tx_eob tags. If desired, the
33  * metadata dictionary can contain a tx_time tag which will append a UHD
34  * style tx_time tag to the tx_sob sample causing transmission at a well
35  * defined point in time.
36  *
37  * \ingroup pdu_utils
38  *
39  */
40 template <class T>
41 class PDU_API pdu_to_stream : virtual public gr::sync_block
42 {
43 public:
44  typedef std::shared_ptr<pdu_to_stream<T>> sptr;
45 
46  /*!
47  * \brief Return a shared_ptr to a new instance of pdu_utils::pdu_to_stream_x.
48  *
49  * @param early_pdu_behavior - behavior for bursts received before previous one is
50  * done processing
51  * @param max_queue_size - max number of PDUs to queue
52  */
53  static sptr make(early_pdu_behavior_t early_pdu_behavior,
54  uint32_t max_queue_size = 64);
55 
56  /**
57  * Set Max Queue size
58  *
59  * @param size - maximum number of queued bursts
60  */
61  virtual void set_max_queue_size(uint32_t size) = 0;
62 };
63 
69 } // namespace pdu
70 } // namespace gr
71 
72 #endif /* INCLUDED_PDU_PDU_TO_STREAM_H */
Emit a PDU data as a simple GR stream.
Definition: pdu_to_stream.h:42
virtual void set_max_queue_size(uint32_t size)=0
std::shared_ptr< pdu_to_stream< T > > sptr
Definition: pdu_to_stream.h:44
static sptr make(early_pdu_behavior_t early_pdu_behavior, uint32_t max_queue_size=64)
Return a shared_ptr to a new instance of pdu_utils::pdu_to_stream_x.
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define PDU_API
Definition: gr-pdu/include/gnuradio/pdu/api.h:18
GR_RUNTIME_API const pmt::pmt_t pdu()
pdu_to_stream< short > pdu_to_stream_s
Definition: pdu_to_stream.h:65
pdu_to_stream< short > pdu_to_stream_i
Definition: pdu_to_stream.h:66
early_pdu_behavior_t
Definition: pdu_to_stream.h:22
@ EARLY_BURST_BALK
Definition: pdu_to_stream.h:25
@ EARLY_BURST_APPEND
Definition: pdu_to_stream.h:23
@ EARLY_BURST_DROP
Definition: pdu_to_stream.h:24
pdu_to_stream< float > pdu_to_stream_f
Definition: pdu_to_stream.h:67
pdu_to_stream< gr_complex > pdu_to_stream_c
Definition: pdu_to_stream.h:68
pdu_to_stream< unsigned char > pdu_to_stream_b
Definition: pdu_to_stream.h:64
GNU Radio logging wrapper.
Definition: basic_block.h:29