GNU Radio 3.6.4.2 C++ API
gr_hier_block2.h
Go to the documentation of this file.
1 /*
2  * Copyright 2012-2013 Free Software Foundation, Inc.
3  *
4  * This file is part of GNU Radio
5  *
6  * GNU Radio is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * GNU Radio is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GNU Radio; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef INCLUDED_GNURADIO_GR_HIER_BLOCK2_H
23 #define INCLUDED_GNURADIO_GR_HIER_BLOCK2_H
24 
25 #include <gr_core_api.h>
26 #include <gras/hier_block.hpp>
27 #include <gr_io_signature.h>
28 
29 struct GR_CORE_API gr_hier_block2 : gras::HierBlock
30 {
31 
32  gr_hier_block2(void);
33 
34  gr_hier_block2(
35  const std::string &name,
36  gr_io_signature_sptr input_signature,
37  gr_io_signature_sptr output_signature
38  );
39 
40  long unique_id(void) const{return _unique_id;}
41  std::string name(void) const{return _name;}
42  long _unique_id;
43  std::string _name;
44 
45  const gr_hier_block2 &self(void) const
46  {
47  return *this;
48  }
49 
50  gr_io_signature_sptr input_signature(void) const;
51  gr_io_signature_sptr output_signature(void) const;
52 
53  void set_input_signature(gr_io_signature_sptr sig);
54  void set_output_signature(gr_io_signature_sptr sig);
55 
56  inline void lock(void){}
57 
58  inline void unlock(void){this->commit();}
59 
61 };
62 
64 
66  const std::string &name,
67  gr_io_signature_sptr input_signature,
68  gr_io_signature_sptr output_signature
69 );
70 
71 #endif /*INCLUDED_GNURADIO_GR_HIER_BLOCK2_H*/
Definition: gr_hier_block2.h:29
long _unique_id
Definition: gr_hier_block2.h:42
void lock(void)
Definition: gr_hier_block2.h:56
std::string _name
Definition: gr_hier_block2.h:43
void unlock(void)
Definition: gr_hier_block2.h:58
#define GR_CORE_API
Definition: gr_core_api.h:30
long unique_id(void) const
Definition: gr_hier_block2.h:40
VOLK_API void(kern.name) _manual($kern.arglist_full
Call into a specific implementation given by name.
std::string name(void) const
Definition: gr_hier_block2.h:41
VOLK_API $kern pname $kern name
A function pointer to the dispatcher implementation.
gr_io_signature_sptr _out_sig
Definition: gr_hier_block2.h:60
GR_CORE_API gr_hier_block2_sptr gr_make_hier_block2(const std::string &name, gr_io_signature_sptr input_signature, gr_io_signature_sptr output_signature)