Dear Tom,
Thanks for your response.

Actually, I had tried a similar approach, but that didn't work. (This may
because I have too little knowledge about swig.)
But this time, your advice helped me.

Regards,
Jeon.

2016-06-24 9:19 GMT+09:00 Tom Rondeau <t...@trondeau.com>:

> On Thu, Jun 23, 2016 at 1:39 PM, Jeon <sjeon87+gnura...@gmail.com> wrote:
>
>> Dear Martin Braun
>>
>> Thanks for response
>>
>> enum OP_MODE is in utils.h [1]. And both working and non-working block
>> include utils.h.
>>
>> Regards,
>> Jeon.
>>
>> [1]:
>> https://gist.github.com/gsongsong/3ce84f94da4d1cf6db5b6f2972d7d90c#file-utils-h
>>
>
>
> Check the .i files. I think that enums are one thing swig won't
> auto-import from the public .h files.
>
> Tom
>
>
>
>
>> 2016-06-23 1:11 GMT+09:00 Martin Braun <martin.br...@ettus.com>:
>>
>>> Where is the enum defined?
>>>
>>> M
>>>
>>> On 06/22/2016 12:13 AM, Jeon wrote:
>>> > Dear GNU Radio Users
>>> >
>>> > I am building my own module but having difficulties on dealing with C++
>>> > headers and Python SWIG.
>>> >
>>> > I have declared my own enum type (including CMakeLists.txt and swig
>>> > file) [1] and made a working block with this enum type [2]. This works
>>> > fine when I test the block.
>>> >
>>> > On the other hand, another block [3] fails to pass test with error [4].
>>> > The key of the error is: "TypeError: in method 'encode_PSDU_make',
>>> > argument 1 of type 'OP_MODE'. It's not a logical error nor an error in
>>> > general_work(). It is an erroro when creating an instance (I am not
>>> sure
>>> > this terminology is correct).
>>> >
>>> > I am very confused that both [2] and [3] have the almost same
>>> structure,
>>> > but one is OK and another is problematic. Currently, I am bypassing
>>> this
>>> > probleme with a workaround by declaring enum OP_MODE explicitly once
>>> > again in encode_PSDU.h. But it is not looking good and I need to edit
>>> > source codes two times whenever change on enum OP_MODE happens.
>>> >
>>> > Since these GIST codes are simplified version for brevity, if you need
>>> > more information please let me know about it.
>>> >
>>> > Regards,
>>> > Jeon.
>>> >
>>> > [1]:
>>> https://gist.github.com/gsongsong/3ce84f94da4d1cf6db5b6f2972d7d90c
>>> > "include/myOOTmodule/utils.h, CMakeLists.txt and swig file"
>>> > [2]:
>>> https://gist.github.com/gsongsong/f16582b0bc2fbedde3b3b48c75e2b3dc
>>> > "An example of working block"
>>> > [3]:
>>> https://gist.github.com/gsongsong/85d540823c802eaa20496a8a500c1d19
>>> > "An example of not-working block"
>>> > [4] https://gist.github.com/gsongsong/913e9231aa20064a6391fe56e0caa844
>>> > "TypeError log"
>>> >
>>> >
>>> > _______________________________________________
>>> > Discuss-gnuradio mailing list
>>> > Discuss-gnuradio@gnu.org
>>> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>> >
>>>
>>>
>>> _______________________________________________
>>> Discuss-gnuradio mailing list
>>> Discuss-gnuradio@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>>
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> Discuss-gnuradio@gnu.org
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>>
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to