discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] using file descriptor with wxgui


From: Krzysztof Kamieniecki
Subject: Re: [Discuss-gnuradio] using file descriptor with wxgui
Date: Sun, 05 Jun 2005 11:12:07 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217

How about this?

self.fd = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

Chuck Swiger wrote:

Hi All - looking for clues on how to include a file descriptor sink with
wxpython - for example, if I add code to gnuradio-examples/python/usrp/fft_usrp.py
at the end of

-------------------------------------------------------------------------
class app_flow_graph (stdgui.gui_flow_graph):
    def __init__(self, frame, panel, vbox, argv):
        stdgui.gui_flow_graph.__init__ (self, frame, panel, vbox, argv)

(existing code)

        # open socket output
        port=7001
        fd = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        fd.connect(('192.168.1.53',7001))

        file = gr.file_descriptor_sink(gr.sizeof_gr_complex,fd.fileno() )
        self.connect(self.u,file)
------------------------------------------------------------------------


we get the old 'stale file descriptor' out of scope trick when init exits.
In some other application I put this at the end of an init block and can make
it work using fg.run, but of course you don't get the gui window since
init does NOT exit. Can the fd be 'return'ed or put in a mainloop() somewhere?

--Chuck


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


--
Krzysztof Kamieniecki
callsign:KB1KLB
mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]