My new general block output strange

Hi,everyone.

I use command line :gr_modtool add -t general modulation_demapper_cb
to add new block in my Gnuradio.

I have successfully generated my new block ,and when use it in grc ,
using binary file (1024 Bytes) ,the repeat is NO, and I use file sink to
store the demodulated data,

int grc: the flowgraph is :

filesource->throttle->modulation_mapper_bc->modulation_demapper_cb->file
sink

with 1024 Bytes,the out of modulation_mapper_bc is 512 gr_complex
data,and the expected out data size of modulation_demapper_cb is 1024
Bytes ,but in fact,it is far more then that .

The forecast function and set_multiple call of this block are as shown
below,

set_output_multiple(N_bits_per_mod_symbol);//where
N_bits_per_mod_symbol=1,2,4 or 6

void
modulation_demapper_cb_impl::forecast (int noutput_items,
gr_vector_int &ninput_items_required)
{
/* <+forecast+> e.g. ninput_items_required[0] = noutput_items */
assert(noutput_items % N_bits_per_mod_symbol == 0);
ninput_items_required[0] =(int)
noutput_items/N_bits_per_mod_symbol;
}

consume_each (noutput_items);

can anyone help me out?
Thanks
preview
abing

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs