discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: How to fill out the data type for parameter which is an array to a C


From: George Edwards
Subject: Re: How to fill out the data type for parameter which is an array to a C++ OOT block?
Date: Wed, 16 Mar 2022 09:28:30 -0500

Hi Mobi,

Thanks for your response.

Actually, while waiting for an answer yesterday, I did exactly as you suggested as a trial and it worked beautifully. 

I was coming back online just now to let Gnuradio Community know I had solved my problem when I saw your response.

Thank you very much!

Regards,
George

On Wed, Mar 16, 2022 at 12:01 AM Mobi Zaman <mobizmn@yahoo.com> wrote:

Hi, George,

Let me refer you to existing code that uses vector inputs. I haven't done this myself before but I think this can help you.

1. There is a Chunks to Symbols block in GNU Radio that has a complex vector input for the paramter of Symbol Table. If you check its c++ source code, you can clearly see the format in which it handles that parameter. So based on that, you could use this for declaring the parameter:

std::vector<float>& coeffs


2. As for the yml file, here is the corresponding yml file of Chunks to Symbols, Based on that, you could use the following in the yml file:

dtype: float_vector


I hope that this helps.

Regards,
Mubashira Zaman











On Tuesday, March 15, 2022, 08:50:50 PM GMT+5, George Edwards <gedwards.eng@gmail.com> wrote:


Hello GNURadio Community,

I am making a Gnuradio C++ OOT block using the gr_modtool. At the start of a design gr_modtool provides a template for the user to fill out. One of the items to fill out is parameters used. I have a parameter (let's call if coeffs) that is not a single floating point value, but is an array of floating point values. My questions in filling out this template is:

Q1. Should I declare the parameter as std::vector <float> coeffs or simply float coeffs?

Q2. In the yml file where one fills in parameters (the suggestion parameter data types are: int, float, complex, xxx_vector, etc.) should I fill in data type as: float_vector (replace the xxx before vector with the prefix float)? 

Thanks very much for your answer.

George

reply via email to

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