Hello,

Please help me. I'm having a lot of trouble understanding the make files to build gnuradio and the makefiles I use to build my own gnuradio blocks. Also, swig hates me and I hate it. So far I've had no trouble building gnuradio and building my own blocks by delicately modifying an example build tree, but now I want to do something a little different.

I want the python code to make an instance of the usrp1.source_c object and pass it into C++ by calling this function:
void run_radio( usrp1_source_c_sptr usrp );

I added this function and it's definition to one of my cc files and added the declaration to the swig i file for my blocks, and everything builds properly.

In the python I create the usrp object with:
adc = usrp.source_c(0,250, fpga_filename="std_4rx_0tx.rbf")

then later call the new function with:
sm.run_radio( adc._u )

When python executes the last line it throws an exception:
"TypeError: in method 'run_radio', argument 1 of type 'usrp1_source_sptr'"

My question is, what type should the parameter be in the run_radio function? How do I get swig to correctly marshal this smart pointer back to c++?

Thanks for the help,
Hans






_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to