Slicer question

I am trying to get the gr.binary_slicer_fb() to work,
but it gives me an error. The _fb means float to
binary, correct? Are there any arguments to
gr.binary_slizer_fb()? Can someone tell me what is
wrong?


complex_to_float = gr.complex_to_float ()
slicer = gr.binary_slicer_fb()
dst_file = gr.file_sink(gr.sizeof_float,
“out_file2.txt”)
self.connect (ddc, complex_to_float, slicer,
dst_file)

Traceback (most recent call last):
File “./fsk04.py”, line 132, in ?
main()
File “./fsk04.py”, line 128, in main
app = stdgui.stdapp (nbfm_rx_graph, “NBFM RX”)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 36, in init
wx.App.init (self, redirect=False)
File
“/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py”,
line 7700, in init
self._BootstrapApp()
File
“/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode/wx/_core.py”,
line 7352, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 39, in OnInit
frame = stdframe (self.flow_graph_maker,
self.title, self._nstatus)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 60, in init
self.panel = stdpanel (self, self,
flow_graph_maker)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/stdgui.py”,
line 81, in init
self.fg = flow_graph_maker (frame, self, vbox,
sys.argv)
File “./fsk04.py”, line 112, in init
self.connect (ddc, complex_to_float, slicer,
dst_file)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 115, in connect
self._connect (points[i-1], points[i])
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 120, in _connect
self._connect_prim (s, d)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 128, in _connect_prim
self._check_type_match (src_endpoint,
dst_endpoint)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/gr/basic_flow_graph.py”,
line 242, in _check_type_match
raise ValueError, (
ValueError: source and destination data sizes are
different: binary_slicer_fb file_sink

Thanks,

George B.
[email protected]

George B. wrote:


complex_to_float = gr.complex_to_float ()
slicer = gr.binary_slicer_fb()
dst_file = gr.file_sink(gr.sizeof_float,
“out_file2.txt”)
self.connect (ddc, complex_to_float, slicer,
dst_file)

> ---------- > ValueError: source and destination data sizes are > different: binary_slicer_fb file_sink

That’s because you set your file sink to take floats. I suspect you want
gr.sizeof_char .

-D