diff options
author | Josh Blum | 2012-11-23 23:06:07 -0800 |
---|---|---|
committer | Josh Blum | 2012-11-23 23:06:07 -0800 |
commit | ccfc4200547605b71a5b65ea9ab86fa45a34dc7b (patch) | |
tree | 918f8d9d203483bb1cc3cdde7863ab25e268f245 /include | |
parent | a61975949f3c6e7ddc26b802c56c639b52c46604 (diff) | |
download | sandhi-ccfc4200547605b71a5b65ea9ab86fa45a34dc7b.tar.gz sandhi-ccfc4200547605b71a5b65ea9ab86fa45a34dc7b.tar.bz2 sandhi-ccfc4200547605b71a5b65ea9ab86fa45a34dc7b.zip |
grant same API access to output buffer
Diffstat (limited to 'include')
-rw-r--r-- | include/gras/block.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/gras/block.hpp b/include/gras/block.hpp index 70c570c..ba09377 100644 --- a/include/gras/block.hpp +++ b/include/gras/block.hpp @@ -236,7 +236,7 @@ struct GRAS_API Block : Element void mark_done(void); /*! - * Get access to the underlying reference counted buffer. + * Get access to the underlying reference counted input buffer. * This is the same buffer pointed to by input_items[which]. * This function must be called during the call to work(). * Use this function to implement passive work-flows. @@ -244,7 +244,18 @@ struct GRAS_API Block : Element * \param which_input the input port index * \return a const reference to the buffer */ - const SBuffer &get_input_buffer(const size_t which_input); + const SBuffer &get_input_buffer(const size_t which_input) const; + + /*! + * Get access to the underlying reference counted output buffer. + * This is the same buffer pointed to by output_items[which]. + * This function must be called during the call to work(). + * Use this to get a pool of buffers for datagram message ports. + * + * \param which_output the output port index + * \return a const reference to the buffer + */ + const SBuffer &get_output_buffer(const size_t which_output) const; /*! * Post the given output buffer to the downstream. |