GNU Radio 3.6.4.2 C++ API
gr_top_block.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_TOP_BLOCK_H
23 #define INCLUDED_GNURADIO_GR_TOP_BLOCK_H
24 
25 #include <gr_core_api.h>
26 #include <gras/top_block.hpp>
27 #include <gr_hier_block2.h>
28 
29 struct GR_CORE_API gr_top_block : gras::TopBlock
30 {
31 
32  gr_top_block(void);
33 
34  gr_top_block(const std::string &name);
35 
36  long unique_id(void) const{return _unique_id;}
37  std::string name(void) const{return _name;}
38  long _unique_id;
39  std::string _name;
40 
41  void start(const size_t max_items);
42 
43  void run(const size_t max_items);
44 
45  int max_noutput_items(void) const;
46 
47  void set_max_noutput_items(int max_items);
48 
49  void run(void);
50 
51  virtual void start(void);
52 
53  virtual void stop(void);
54 
55  virtual void wait(void);
56 
57  inline void lock(void){}
58 
59  inline void unlock(void){this->commit();}
60 
61 };
62 
64 
66 
67 #endif /*INCLUDED_GNURADIO_GR_TOP_BLOCK_H*/
void unlock(void)
Definition: gr_top_block.h:59
void lock(void)
Definition: gr_top_block.h:57
long unique_id(void) const
Definition: gr_top_block.h:36
std::string name(void) const
Definition: gr_top_block.h:37
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
#define GR_CORE_API
Definition: gr_core_api.h:30
std::string _name
Definition: gr_top_block.h:39
long _unique_id
Definition: gr_top_block.h:38
VOLK_API $kern pname $kern name
A function pointer to the dispatcher implementation.
GR_CORE_API gr_top_block_sptr gr_make_top_block(const std::string &name)
Definition: gr_top_block.h:29