GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
sample_and_hold.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2007,2013,2018 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 
12 #ifndef SAMPLE_AND_HOLD_H
13 #define SAMPLE_AND_HOLD_H
14 
15 #include <gnuradio/blocks/api.h>
16 #include <gnuradio/sync_block.h>
17 #include <cstdint>
18 
19 namespace gr {
20 namespace blocks {
21 
22 /*!
23  * \brief sample and hold circuit
24  * \ingroup level_controllers_blk
25  *
26  * \details
27  * Samples the data stream (input stream 0) and holds the value if
28  * the control signal is 1 (input stream 1).
29  */
30 template <class T>
31 class BLOCKS_API sample_and_hold : virtual public sync_block
32 {
33 public:
34  // gr::blocks::sample_and_hold::sptr
35  typedef std::shared_ptr<sample_and_hold<T>> sptr;
36 
37  static sptr make();
38 };
39 
44 } /* namespace blocks */
45 } /* namespace gr */
46 
47 #endif /* SAMPLE_AND_HOLD_H */
sample and hold circuit
Definition: sample_and_hold.h:32
std::shared_ptr< sample_and_hold< T > > sptr
Definition: sample_and_hold.h:35
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
sample_and_hold< std::uint8_t > sample_and_hold_bb
Definition: sample_and_hold.h:40
sample_and_hold< float > sample_and_hold_ff
Definition: sample_and_hold.h:43
sample_and_hold< std::int32_t > sample_and_hold_ii
Definition: sample_and_hold.h:42
sample_and_hold< std::int16_t > sample_and_hold_ss
Definition: sample_and_hold.h:41
GNU Radio logging wrapper.
Definition: basic_block.h:29