Hi Marcus:
Thank you so much.
1.How did the system know how many items I can consume in a work call?
2.Do you means that every times call the block,the block will throw the
ninput_items[0] items?
For example,the input steam 0 item is 1,2,3,4,5... and the
ninput_items[0]=2.
The first time call the block, 1 2 is removed.
The second time call the block,3 4 is removed.Is my understanding
right?Just to confirm it.
3.I add two files before and after "Stream CRC 32" block respectively.Namely
file1.dat and file2.dat.The type is "Byte".Can I use the read_char_binary.m in
matlab to look at the data?Or use other m file provided by the gnuradio?Thank
you.
Best regards,
zswx
At 2015-07-09 21:48:30, "Marcus Müller" <[email protected]> wrote:
Hi Zswx,
ninput_items[0] is really the number of items that you can consume in a work
call (on input stream 0). It's usually > 1.
Best regards,
Marcus
On 07/09/2015 03:29 PM, zs wrote:
Hi,
Thank you in advance.I have a question about the "ninput_items".I find the
meaning of it is "vector of items available on all input buffers".
When I read the source code of "crc32_bb_impl.cc",I see the code below,
"
int
65 crc32_bb_impl::work (int noutput_items,
66 gr_vector_int &ninput_items,
67 gr_vector_const_void_star &input_items,
68 gr_vector_void_star &output_items)
69 {
70 const unsigned char *in = (const unsigned char *) input_items[0];
71 unsigned char *out = (unsigned char *) output_items[0];
72 long packet_length = ninput_items[0];
"
I think the ninput_items[0]=1,because the item input is 1 every times.But when
I write the code "std::cout<<ninput_items[0]<<std::endl;",It display the
packet_length.I think the ninput_items[0]=1 no matter what pack_length is.Why
I'm wrong?
Thank you.
Best regards,
zswx
_______________________________________________
Discuss-gnuradio mailing list
[email protected]https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio