summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/runtime/gr_block.h
diff options
context:
space:
mode:
authorJohnathan Corgan2013-02-12 20:31:20 -0800
committerJohnathan Corgan2013-02-12 20:31:20 -0800
commitc75c288a89c3c417e012282df8242144b8e42a47 (patch)
tree0de525921022e8f40ef4c8686631dd00bbf80b20 /gnuradio-core/src/lib/runtime/gr_block.h
parent6cfa483a0414683c7edca812cca19198d7c2f724 (diff)
parent97ff82dd63f06ad51992222c160a9673260b13f7 (diff)
downloadgnuradio-c75c288a89c3c417e012282df8242144b8e42a47.tar.gz
gnuradio-c75c288a89c3c417e012282df8242144b8e42a47.tar.bz2
gnuradio-c75c288a89c3c417e012282df8242144b8e42a47.zip
Merge remote-tracking branch 'reynwar/min_output'
Diffstat (limited to 'gnuradio-core/src/lib/runtime/gr_block.h')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h
index c9d2d8f53..bd9ff42df 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.h
+++ b/gnuradio-core/src/lib/runtime/gr_block.h
@@ -252,13 +252,30 @@ class GR_CORE_API gr_block : public gr_basic_block {
void set_tag_propagation_policy(tag_propagation_policy_t p);
/*!
+ * \brief Return the minimum number of output items this block can
+ * produce during a call to work.
+ *
+ * Should be 0 for most blocks. Useful if we're dealing with packets and
+ * the block produces one packet per call to work.
+ */
+ int min_noutput_items() const { return d_min_noutput_items; }
+
+ /*!
+ * \brief Set the minimum number of output items this block can
+ * produce during a call to work.
+ *
+ * \param m the minimum noutput_items this block can produce.
+ */
+ void set_min_noutput_items(int m) { d_min_noutput_items = m; }
+
+ /*!
* \brief Return the maximum number of output items this block will
* handle during a call to work.
*/
int max_noutput_items();
/*!
- * \brief Set the maximum number of ouput items htis block will
+ * \brief Set the maximum number of output items this block will
* handle during a call to work.
*
* \param m the maximum noutput_items this block will handle.
@@ -428,6 +445,7 @@ class GR_CORE_API gr_block : public gr_basic_block {
gr_block_detail_sptr d_detail; // implementation details
unsigned d_history;
bool d_fixed_rate;
+ int d_min_noutput_items;
bool d_max_noutput_items_set; // if d_max_noutput_items is valid
int d_max_noutput_items; // value of max_noutput_items for this block
tag_propagation_policy_t d_tag_propagation_policy; // policy for moving tags downstream