On Thu, May 8, 2014 at 12:53 AM, Mostafa Alizadeh <m.alizade...@gmail.com>wrote:

>
> Hi Marcus,
> I actually have a deep, really deep,  problem with data types!!!! As you
> see I have a preprocessor definition which is 32 bit number. I wanna pass
> it to the make!!! how could I? If I use the gnuradio type " gr_uint32",
> after turning my c++-written blocks, the GRC tells me:
>
> *TypeError: in method 'xxxx_make', argument 1 of type 'gr_uint32'*
>
> I put an option to the xml file :
>
> *<option>*
> *        <name>CRC16</name>*
> *        <key>gr_uint32</key>*
> *        <opt>CRC_type:0x00011021</opt>*
> *</option>*
>
> I know that this is not true, but I want to pass a 32-bit number to the
> "make". How could I do?
>
>

Anyone correct me if I am wrong.

In xml file we use the Python data types.
In usual case Python doesn't distinguish among "unsigned" or "signed"
integer, this is different from c++.
The casting will be intelligently handled by swig.

Hence, for your case, just pass "gr_uint32" to the make() assuming your
block is coded in c++. Then use "<type>int</type>" in the xml file.  This
solves your problem.

Meanwhile, C preprocessor does not know types or C keywords.
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to