Re: [Discuss-gnuradio] catching UHD errors in Python
On 05/01/2012 06:44 PM, Nowlan, Sean wrote: > Is there a good way to catch UHD errors in Python? I will look into > gr_async_msg_source for handling L's, O's, U's, and S's, but how does > one catch UHD runtime errors such as if the Ethernet cable gets > disconnected from an N200? UHD docs describe registering a handler > method but has this functionality been swigged into GNU radio? > Hasnt been swigged. This would be neat because the errors could pop up in a little message window in the GUI. > Would it make sense to define a handler function in > gr_uhd_usrp_{sink|source}? > No. Its more of a global process thing, rather than a per instance. This is basically a swig directors use case, and there isnt any public header c++ header stuff to expose. You are basically looking at a custom handler in the .i file, and a little routine in the init.py I'm not in a state of implementing it right now, but if you want some inspiration, the python blocks code uses the existing gnuradio swig director stuff, you should take a look: See use of feval in cc and h, py file https://github.com/guruofquality/grextras/blob/master/lib/block_gateway.h#L98 https://github.com/guruofquality/grextras/blob/master/python/block_gateway.py#L45 -josh > Respectfully, Sean Nowlan > > > > > ___ 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
Re: [Discuss-gnuradio] catching UHD errors in Python
Will try "try" "catch"... this very well may have been a dumb question. I blame it on lack of sleep. From: discuss-gnuradio-bounces+sean.nowlan=gtri.gatech@gnu.org [discuss-gnuradio-bounces+sean.nowlan=gtri.gatech@gnu.org] on behalf of Nowlan, Sean [sean.now...@gtri.gatech.edu] Sent: Tuesday, May 01, 2012 9:44 PM To: discuss-gnuradio@gnu.org Subject: [Discuss-gnuradio] catching UHD errors in Python Is there a good way to catch UHD errors in Python? I will look into gr_async_msg_source for handling L's, O's, U's, and S's, but how does one catch UHD runtime errors such as if the Ethernet cable gets disconnected from an N200? UHD docs describe registering a handler method but has this functionality been swigged into GNU radio? Would it make sense to define a handler function in gr_uhd_usrp_{sink|source}? Respectfully, Sean Nowlan ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[Discuss-gnuradio] catching UHD errors in Python
Is there a good way to catch UHD errors in Python? I will look into gr_async_msg_source for handling L's, O's, U's, and S's, but how does one catch UHD runtime errors such as if the Ethernet cable gets disconnected from an N200? UHD docs describe registering a handler method but has this functionality been swigged into GNU radio? Would it make sense to define a handler function in gr_uhd_usrp_{sink|source}? Respectfully, Sean Nowlan ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio