RE: Beginner Question: python script error when doing connect()

Eric,

I attempt to declare the source and the sink to both be the same type:

if options.input_shorts:
self._u = usrp2.sink_16sc(options.interface, options.mac_addr)
#the last True is to restart the file when it is done
self._src = gr.file_source(gr.sizeof_short,filename,True)
else:
self._u = usrp2.sink_32fc(options.interface, options.mac_addr)
#the last True is to restart the file when it is done
self._src = gr.file_source(gr.sizeof_gr_complex, filename, True)


self.connect(self._src, self._u);

Is this not correct?

Thanks,
Ilya

On Thu, Sep 17, 2009 at 02:27:55PM -0400, Chukhman, Ilya A. wrote:

Eric,

I attempt to declare the source and the sink to both be the same type:

if options.input_shorts:
self._u = usrp2.sink_16sc(options.interface, options.mac_addr)
#the last True is to restart the file when it is done
self._src = gr.file_source(gr.sizeof_short,filename,True)

Use: 2*gr.sizeof_short

It’s complex, not short.

else:
self._u = usrp2.sink_32fc(options.interface, options.mac_addr)
#the last True is to restart the file when it is done
self._src = gr.file_source(gr.sizeof_gr_complex, filename, True)


self.connect(self._src, self._u);

Is this not correct?

Eric

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs