summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJosh Blum2012-09-18 15:49:07 -0700
committerJosh Blum2012-09-18 15:49:07 -0700
commit4d6d5b216f86e976322fb4fed800c756fdef4315 (patch)
tree73d5ef202b503ca73d99ae1307ae527e77b7c8c7 /include
parente951507b7f81d019ae0120c04554145dc0b5a257 (diff)
downloadsandhi-4d6d5b216f86e976322fb4fed800c756fdef4315.tar.gz
sandhi-4d6d5b216f86e976322fb4fed800c756fdef4315.tar.bz2
sandhi-4d6d5b216f86e976322fb4fed800c756fdef4315.zip
created hooks for input buffer allocator
Diffstat (limited to 'include')
-rw-r--r--include/gnuradio/block.hpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/gnuradio/block.hpp b/include/gnuradio/block.hpp
index ae09149..25cf77c 100644
--- a/include/gnuradio/block.hpp
+++ b/include/gnuradio/block.hpp
@@ -243,7 +243,24 @@ struct GRAS_API Block : Element
const size_t recommend_length
);
- //TODO overload for allocate output buffer(index)
+ /*!
+ * The input buffer allocator method.
+ * This method is special and very different from allocate output buffers.
+ * Typically, blocks do not have control of their input buffers.
+ * When overloaded, an upstream block will ask this block
+ * to allocate its output buffers. This way, this block will get
+ * input buffers which were actually allocated by this method.
+ *
+ * \param which_input the input port index number
+ * \param token the token for the buffer's returner
+ * \param recommend_length the schedulers recommended length in bytes
+ * \return the token used for the buffer allocation (may be the same)
+ */
+ virtual SBufferToken input_buffer_allocator(
+ const size_t which_input,
+ const SBufferToken &token,
+ const size_t recommend_length
+ );
};