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.
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
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
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
int !!! 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,
-----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* as parameter to your C++ block.
Greetings,
Marcus
On 08.05.2014 14:18, Mostafa A. wrote:
block “vector source” which gives a vector for it’s make function.
On 08.05.2014 10:18, Mostafa A. wrote:
Thank.
Discuss-gnuradio Info Page
_______________________________________________ Discuss-gnuradio
mailing list [email protected]
Discuss-gnuradio Info Page
-----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-----