/* -*- c++ -*- */
/*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004,2008 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
/*!
* \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