diff options
Diffstat (limited to 'gnuradio-core')
4 files changed, 5 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.h.t b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.h.t index 6aeb99480..ec0ebb8bb 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.h.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.h.t @@ -49,6 +49,7 @@ class @NAME@ : public gr_sync_block { gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); + void clear() {d_data.clear();} std::vector<@TYPE@> data () const; }; diff --git a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.i.t b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.i.t index 988340e30..563171123 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_sink_X.i.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_sink_X.i.t @@ -32,6 +32,7 @@ class @NAME@ : public gr_sync_block { @NAME@ (); public: + void clear() {d_data.clear();} std::vector<@TYPE@> data () const; }; diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_X.h.t b/gnuradio-core/src/lib/gengen/gr_vector_source_X.h.t index 62a4dc8ad..0b8d92a9c 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_X.h.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_source_X.h.t @@ -46,6 +46,7 @@ class @NAME@ : public gr_sync_block { @NAME@ (const std::vector<@TYPE@> &data, bool repeat); public: + void rewind() {d_offset=0;} virtual int work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); diff --git a/gnuradio-core/src/lib/gengen/gr_vector_source_X.i.t b/gnuradio-core/src/lib/gengen/gr_vector_source_X.i.t index c56f72877..1e94ce401 100644 --- a/gnuradio-core/src/lib/gengen/gr_vector_source_X.i.t +++ b/gnuradio-core/src/lib/gengen/gr_vector_source_X.i.t @@ -28,6 +28,8 @@ GR_SWIG_BLOCK_MAGIC(gr,@BASE_NAME@); gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat = false); class @NAME@ : public gr_sync_block { + public: + void rewind() {d_offset=0;} private: @NAME@ (const std::vector<@TYPE@> &data); }; |