In the previous three "Quick & Dirty" sections I made only a single class i.e.
rx_cfile_block1 and ran that.
Today I will make two classes with different parameters and then run them one by one from a single flow graph.
Here I wont explain much in detail as I did in the last three posts, but I would like you to refer them
http://sumitgnuradio.blogspot.in/2012/10/quick-dirty-part-3-getting-data-from.html
http://sumitgnuradio.blogspot.in/2012/10/quick-dirty-part-2-data-dumping-into.html
http://sumitgnuradio.blogspot.in/2012/10/quick-dirty-getting-data-from-usrp.html
Step-1 Copy the class definition section from the program of the post
http://sumitgnuradio.blogspot.in/2012/10/quick-dirty-getting-data-from-usrp.html
and paste it in a separate file
Step-2 In that separate file rename the class as rx_cfile_block2
Step-3 Change the class properties as you want i.e. usrp(type,serial number)center frequency, gain, sampling rate, number of samples, subdevices, antennas etc
Step-4 paste this class definition just before the line if __name__ == '__main__': in the program
Step-5 Write "import time" just after from gnuradio import uhd
# Time is a python module which will enable us to use the time funcitons
Step-6 Refer to the lines after if __name__ == '__main__':
Step-7 After tb.run(), put time.sleep(5)
# This will make the program sleep for 5 seconds before executing next lines
Step-8 Write following lines after time.sleep(5)
tb = rx_cfile_block2()
tb.run()
# So at the begining the class rx_cfile_block1 will called after 5 seconds of it end the another class i.e. rx_cfile_block2 will be called.
# For cross checking if the program is working properly or not, put the file names different in the two classes or change their path
Program :
http://www.2shared.com/file/LxYFf2YG/pgm_4.html
rx_cfile_block1 and ran that.
Today I will make two classes with different parameters and then run them one by one from a single flow graph.
Here I wont explain much in detail as I did in the last three posts, but I would like you to refer them
http://sumitgnuradio.blogspot.in/2012/10/quick-dirty-part-3-getting-data-from.html
http://sumitgnuradio.blogspot.in/2012/10/quick-dirty-part-2-data-dumping-into.html
http://sumitgnuradio.blogspot.in/2012/10/quick-dirty-getting-data-from-usrp.html
Step-1 Copy the class definition section from the program of the post
http://sumitgnuradio.blogspot.in/2012/10/quick-dirty-getting-data-from-usrp.html
and paste it in a separate file
Step-2 In that separate file rename the class as rx_cfile_block2
Step-3 Change the class properties as you want i.e. usrp(type,serial number)center frequency, gain, sampling rate, number of samples, subdevices, antennas etc
Step-4 paste this class definition just before the line if __name__ == '__main__': in the program
Step-5 Write "import time" just after from gnuradio import uhd
# Time is a python module which will enable us to use the time funcitons
Step-6 Refer to the lines after if __name__ == '__main__':
Step-7 After tb.run(), put time.sleep(5)
# This will make the program sleep for 5 seconds before executing next lines
Step-8 Write following lines after time.sleep(5)
tb = rx_cfile_block2()
tb.run()
# So at the begining the class rx_cfile_block1 will called after 5 seconds of it end the another class i.e. rx_cfile_block2 will be called.
# For cross checking if the program is working properly or not, put the file names different in the two classes or change their path
Program :
http://www.2shared.com/file/LxYFf2YG/pgm_4.html