GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
take_skip_to_pdu.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 #ifndef INCLUDED_PDU_TAKE_SKIP_TO_PDU_H
12 #define INCLUDED_PDU_TAKE_SKIP_TO_PDU_H
13 
14 #include <gnuradio/pdu/api.h>
15 #include <gnuradio/sync_block.h>
16 
17 namespace gr {
18 namespace pdu {
19 
20 #ifndef MAXIMUM_PDU_SIZE
21 #define MAXIMUM_PDU_SIZE
22 #endif
23 
24 /*!
25  * \brief Extract periodic PDUs from a data stream.
26  * \ingroup pdu_blk
27  *
28  * This block will generate PDUs of size TAKE skipping SKIP samples between
29  *
30  */
31 template <class T>
32 class PDU_API take_skip_to_pdu : virtual public gr::sync_block
33 {
34 public:
35  typedef std::shared_ptr<take_skip_to_pdu<T>> sptr;
36 
37  /*!
38  * \brief Return a shared_ptr to a new instance of pdu::take_skip_to_pdu.
39  *
40  * @param take - size of generated PDUs in samples
41  * @param skip - number of samples to skip between takes
42  */
43  static sptr make(uint32_t take, uint32_t skip);
44 
45  virtual void set_take(uint32_t take) = 0;
46  virtual void set_skip(uint32_t skip) = 0;
47 };
48 
54 } // namespace pdu
55 } // namespace gr
56 
57 #endif /* INCLUDED_PDU_TAKE_SKIP_TO_PDU_H */
Extract periodic PDUs from a data stream.
Definition: take_skip_to_pdu.h:33
static sptr make(uint32_t take, uint32_t skip)
Return a shared_ptr to a new instance of pdu::take_skip_to_pdu.
virtual void set_skip(uint32_t skip)=0
virtual void set_take(uint32_t take)=0
std::shared_ptr< take_skip_to_pdu< T > > sptr
Definition: take_skip_to_pdu.h:35
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()
take_skip_to_pdu< unsigned char > take_skip_to_pdu_b
Definition: take_skip_to_pdu.h:49
take_skip_to_pdu< int > take_skip_to_pdu_i
Definition: take_skip_to_pdu.h:51
take_skip_to_pdu< gr_complex > take_skip_to_pdu_c
Definition: take_skip_to_pdu.h:53
take_skip_to_pdu< short > take_skip_to_pdu_s
Definition: take_skip_to_pdu.h:50
take_skip_to_pdu< float > take_skip_to_pdu_f
Definition: take_skip_to_pdu.h:52
GNU Radio logging wrapper.
Definition: basic_block.h:29