Hi,
Thanks Marcus and Sylvain it works with class variables. But it
still difficult to figure out why gnu radio threw such error and it's
one of the most common errors that people come across in gnu radio.
Best Regards,
Sagar
Quoting "Marcus Müller-3 [via GnuRadio]" <ml-node+s4n58107...@n7.nabble.com>:
> Hi Saga,
>
> The line that goes wrong is this:
>> self.create_tags_strend_ff_0 = create_tags.strend_ff(-30.0)
> So this means that the constructor isn't wrapped in Python. I don't know
> in which way that could be related to you doing somethin in work(); you
> really shouldn't be using static variables if you can help it! In your
> case, you really should not use it; the way you use them, they should
> simply be class members.
>
> I don't actually think this has something to do with the static
> variables usage, though; the constructor being undefined might mean that
> something else went wrong.
>
> Best regards,
> Marcus
>
> On 02/09/2016 03:38 PM, sagar wrote:
>> Hi Marcus,
>>
>> Thank you for quick response. I have posted my error incompletely. I am
>> actually getting the below error
>>
>> File "/home/user1/home/user1/gnuradio/tutorials/work/top_block.py", line
>> 275, in <module>
>> tb = top_block()
>> File "/home/user1/home/user1/gnuradio/tutorials/work/top_block.py", line
>> 183, in __init__
>> self.create_tags_strend_ff_0 = create_tags.strend_ff(-30.0)
>> AttributeError: 'module' object has no attribute 'strend_ff'
>>
>> I get this error only when I try to access static variables inside work
>> function. otherwise the GRC won't show any such errors
>>
>> Do I have to use static variables differently then usual in gnu radio c++
>> programs? If so, any pointers to study those concepts will be really helpful
>>
>>
>> Thanks again.
>>
>> Best Regards,
>> Saga
>>
>>
>>
>> --
>> View this message in context:
>> http://gnuradio.4.n7.nabble.com/Using-static-variables-in-work-function-of-an-OOT-module-tp58094p58105.html
>> Sent from the GnuRadio mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> 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
>
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the
> discussion below:
> http://gnuradio.4.n7.nabble.com/Using-static-variables-in-work-function-of-an-OOT-module-tp58094p58107.html
>
> To unsubscribe from Using static variables in work function of an
> OOT module., visit
> http://gnuradio.4.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=58094&code=c2FnYXIua2FybXVyLm5hcmFzaW1oYS5yZWRkeUB0dWhoLmRlfDU4MDk0fC01MTc5MTc0Njg=
--
View this message in context:
http://gnuradio.4.n7.nabble.com/Using-static-variables-in-work-function-of-an-OOT-module-tp58094p58118.html
Sent from the GnuRadio mailing list archive at Nabble.com.
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio