discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ OOT module vector size does not match


From: Huang Wei
Subject: Re: C++ OOT module vector size does not match
Date: Mon, 18 Oct 2021 16:13:06 +0100

Problem solved, I need to add in the yml file "vlen: 1024 " for both inputs and outputs.

Huang Wei <weizardry@gmail.com> 于2021年10月18日周一 下午3:12写道:
Hello group,

I am writing a C++ OOT module in GNU radio operating in vectors of length 1024. So in the .cc file I wrote:
      gr::io_signature::make(1, 1, sizeof(float)*1024),
      gr::io_signature::make(1, 1, sizeof(float)*1024)),
And in the work function I wrote:
      float *out = (float *) output_items[0];
      int noi = 1024 * noutput_items;

      memcpy(out, input_items[0], noi * sizeof(float)); // just copy input to output
      return noutput_items;
when I connect a "Stream to Vector" block (Num of items=1024, Vec length =1) to this custom block, it shows "Source IO size 4096 does not match sink IO size 4".

Where did I make the mistake? noutput_items indicates the num of output vectors, right? 
Thank you if you could give me any help.

Regards,
Wei

reply via email to

[Prev in Thread] Current Thread [Next in Thread]