More stable version of clock sync.
[debian/gnuradio] / gnuradio-core / src / lib / gengen / gr_vector_source_X.h.t
index 62a4dc8ad62c158281190caabd9d23f07464b94c..63edcb61c2da1294be5a98025035e092cad0d320 100644 (file)
@@ -1,6 +1,6 @@
 /* -*- c++ -*- */
 /*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004,2008 Free Software Foundation, Inc.
  * 
  * This file is part of GNU Radio
  * 
@@ -32,26 +32,28 @@ typedef boost::shared_ptr<@NAME@> @NAME@_sptr;
 
 /*!
  * \brief source of @TYPE@'s that gets its data from a vector
- * \ingroup source
+ * \ingroup source_blk
  */
 
 class @NAME@ : public gr_sync_block {
   friend @NAME@_sptr 
-  gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat = false);
+  gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat, int vlen);
 
   std::vector<@TYPE@>  d_data;
   bool                 d_repeat;
   unsigned int         d_offset;
+  int                  d_vlen;
 
-  @NAME@ (const std::vector<@TYPE@> &data, bool repeat);
+  @NAME@ (const std::vector<@TYPE@> &data, bool repeat, int vlen);
 
  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);
 };
 
 @NAME@_sptr
-gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat);
+gr_make_@BASE_NAME@ (const std::vector<@TYPE@> &data, bool repeat = false, int vlen = 1);
 
 #endif