Hi,

I have simplified my code; as below and attached. I include a simple

flow graph too. Lots of 0’s are appended to the output file? I must be

making a silly mistake?!

Thanks for any help!

Regards,

David

```
/*
* The private constructor
*/
cip_vcic_impl::cip_vcic_impl(int v_len, int r_max, int l_max)
: gr::block("cip_vcic",
gr::io_signature::make(1, 1, sizeof(gr_complex)),
gr::io_signature::make(1, 1, sizeof(gr_complex)))
{}
/*
* Our virtual destructor.
*/
cip_vcic_impl::~cip_vcic_impl()
{
}
void
cip_vcic_impl::forecast (int noutput_items, gr_vector_int
```

&ninput_items_required)

{

ninput_items_required[0] = noutput_items;

}

```
int
cip_vcic_impl::general_work (int noutput_items,
gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
const gr_complex *in = (const gr_complex *) input_items[0];
gr_complex *out = (gr_complex *) output_items[0];
// Copy input to output
for(int item_idx = 0; item_idx < ninput_items[0]; item_idx++)
{
memcpy((void *) &out[item_idx], (void *) &in[item_idx],
```

sizeof(gr_complex));

produce(0, 1);

}

```
// Tell runtime system how many input items we consumed on
// each input stream.
consume_each (noutput_items);
// Tell runtime system how many output items we produced.
return noutput_items;
}
```