discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] pass new types to the "make" function


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] pass new types to the "make" function
Date: Thu, 08 May 2014 14:27:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

SWIG automatically generates wrappers for the python tuple type.
Refer the mass of examples of tuples being used as parameters in GRC
blocks for reference ;)
Again, don't write anything funky yourself, just use a
std::vector<int>* as parameter to your C++ block.

Greetings,
Marcus

On 08.05.2014 14:18, Mostafa Alizadeh wrote:
> Hi Marcus, Thank you for your guides. I clone your files and
> finally got that I can pass "unsinged int" to the make but in the
> xml file I can put the <type>int</type> !!! That's I wanted. Thank
> you again.
> 
> But one of my blocks must give an array of "int":
> 
> int g[] = {1,2,3}; .....
> 
> And the "make" should be like this: *make(int *g)* I looked at the
> block "vector source" which gives a vector for it's make function.
> However, I want to pass an array in GRC form of the block i.e. xml
> file!!!!! What do you prefer?
> 
> greetings,
> 
> 
> On Thu, May 8, 2014 at 1:16 PM, Marcus Müller
> <address@hidden>wrote:
> 
>> Hi Mostafa,
>> 
>> because I hope this will solve your problem as well as make it
>> easier for me to understand you and vice versa, I've generated a
>> minimal example of what you're trying to do. Please clone 
>> https://github.com/marcusmueller/gr-unsigned_inting.git and tell
>> me if it reflects what you're trying to do. The only files I
>> modified after generation with gr_modtool were - lib/try....cc -
>> python/qa_try_...py - grc/try....xml
>> 
>> Greetings, Marcus
>> 
>> On 08.05.2014 10:18, Mostafa Alizadeh wrote:
>>> hello every body, I really have a problem with data types when
>>> I want to use my out-of-tree module in GRC which is written in
>>> c++. I have a "make" like this:
>>> 
>>> *make(unsinged int x, usigned char y)*
>>> 
>>> how could I use this block in GRC?
>>> 
>>> please help me,
>>> 
>>> Thank.
>>> 
>>> 
>>> 
>>> _______________________________________________ 
>>> Discuss-gnuradio mailing list address@hidden 
>>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>> 
>> 
>> _______________________________________________ Discuss-gnuradio
>> mailing list address@hidden 
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>> 
> 
> 
> 
> _______________________________________________ Discuss-gnuradio
> mailing list address@hidden 
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTa3g7AAoJEBQ6EdjyzlHtO4sH/ipblc9swgryj1xmBPBW5j33
7zDlZg1mL9d8WDE4t8rBbxF0esaFnS8qRUrfAtg0L9Lxl7I+rJG9tJZK82XIEVzl
pmRy5e1Grhz837Bw6Q3JHHzsH4oHi6PZEWGAGm3dD+Qbuj5VHmOgPAvH47udS+ai
RFWm8P3D0Vg3hTGp05B8FHhSf9nZPggWludcXaB97eaIg0YN3+0lxcQ9Rir198Z7
bsO/IQV9U79fy0edhJnlV6aqHrY7ShVRests09JDT/E7PiWaE+Obx6ttC3pzA3VZ
kxl+uxnAE6rFjwu1+/grdUiNRdyK+WlpVaY3Q6/lHxsG66LkJK8s51WN4BXtk80=
=FnJe
-----END PGP SIGNATURE-----



reply via email to

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