diff options
-rw-r--r-- | include/gnuradio/gr_top_block.h | 58 | ||||
-rw-r--r-- | lib/gr_top_block.cpp | 44 |
2 files changed, 59 insertions, 43 deletions
diff --git a/include/gnuradio/gr_top_block.h b/include/gnuradio/gr_top_block.h index 0fa5496..16adb13 100644 --- a/include/gnuradio/gr_top_block.h +++ b/include/gnuradio/gr_top_block.h @@ -27,49 +27,21 @@ struct GRAS_API gr_top_block : gnuradio::TopBlock gr_top_block(const std::string &name); - void lock(void) - { - //NOP - } - - void unlock(void) - { - this->commit(); - } - - void start(void) - { - gnuradio::TopBlock::start(); - } - - void start(const size_t max_items) - { - this->set_max_noutput_items(max_items); - gnuradio::TopBlock::start(); - } - - void run(void) - { - gnuradio::TopBlock::run(); - } - - void run(const size_t max_items) - { - this->set_max_noutput_items(max_items); - gnuradio::TopBlock::run(); - } - - int max_noutput_items(void) const - { - return this->global_config().maximum_output_items; - } - - void set_max_noutput_items(int max_items) - { - gnuradio::GlobalBlockConfig config = this->global_config(); - config.maximum_output_items = max_items; - this->set_global_config(config); - } + void lock(void); + + void unlock(void); + + void start(void); + + void start(const size_t max_items); + + void run(void); + + void run(const size_t max_items); + + int max_noutput_items(void) const; + + void set_max_noutput_items(int max_items); }; diff --git a/lib/gr_top_block.cpp b/lib/gr_top_block.cpp index 3b3a5f3..6c023b1 100644 --- a/lib/gr_top_block.cpp +++ b/lib/gr_top_block.cpp @@ -33,3 +33,47 @@ gr_top_block_sptr gr_make_top_block(const std::string &name) { return gr_top_block_sptr(new gr_top_block(name)); } + +void gr_top_block::lock(void) +{ + //NOP +} + +void gr_top_block::unlock(void) +{ + this->commit(); +} + +void gr_top_block::start(void) +{ + gnuradio::TopBlock::start(); +} + +void gr_top_block::start(const size_t max_items) +{ + this->set_max_noutput_items(max_items); + gnuradio::TopBlock::start(); +} + +void gr_top_block::run(void) +{ + gnuradio::TopBlock::run(); +} + +void gr_top_block::run(const size_t max_items) +{ + this->set_max_noutput_items(max_items); + gnuradio::TopBlock::run(); +} + +int gr_top_block::max_noutput_items(void) const +{ + return this->global_config().maximum_output_items; +} + +void gr_top_block::set_max_noutput_items(int max_items) +{ + gnuradio::GlobalBlockConfig config = this->global_config(); + config.maximum_output_items = max_items; + this->set_global_config(config); +} |