GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
burst_tagger.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2010,2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef INCLUDED_GR_BURST_TAGGER_H
24 #define INCLUDED_GR_BURST_TAGGER_H
25 
26 #include <gnuradio/blocks/api.h>
27 #include <gnuradio/sync_block.h>
28 
29 namespace gr {
30  namespace blocks {
31 
32  /*!
33  * \brief Sets a burst on/off tag based on the value of the trigger input.
34  * \ingroup peak_detectors_blk
35  * \ingroup stream_tag_tools_blk
36  *
37  * \details
38  * This block takes two inputs, a signal stream on the input
39  * stream 0 and a trigger stream of shorts on input stream 1. If
40  * the trigger stream goes above 0, a tag with the key "burst"
41  * will be transmitted as a pmt::PMT_T. When the trigger signal
42  * falls below 0, the "burst" tag will be transmitted as
43  * pmt::PMT_F.
44  *
45  * The signal on stream 0 is retransmitted to output stream 0.
46  */
47  class BLOCKS_API burst_tagger : virtual public sync_block
48  {
49  public:
50  // gr::blocks::burst_tagger::sptr
51  typedef boost::shared_ptr<burst_tagger> sptr;
52 
53  /*!
54  * Build a burst tagger gnuradio/blocks.
55  *
56  * \param itemsize itemsize of the signal stream on input 0.
57  */
58  static sptr make(size_t itemsize);
59 
60  /*!
61  * For the true burst tag, change the key name to \p key and a
62  * new value of \p value.
63  */
64  virtual void set_true_tag(const std::string &key, bool value) = 0;
65 
66  /*!
67  * For the false burst tag, change the key name to \p key and a
68  * new value of \p value.
69  */
70  virtual void set_false_tag(const std::string &key, bool value) = 0;
71  };
72 
73  } /* namespace blocks */
74 } /* namespace gr */
75 
76 #endif /* INCLUDED_GR_BURST_TAGGER_H */
boost::shared_ptr< burst_tagger > sptr
Definition: burst_tagger.h:51
Sets a burst on/off tag based on the value of the trigger input.
Definition: burst_tagger.h:47
Include this header to use the message passing features.
Definition: logger.h:131
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:30
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
BLOCKS_API size_t itemsize(vector_type type)