summaryrefslogtreecommitdiff
path: root/gnuradio-examples/python/hier
diff options
context:
space:
mode:
authorjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>2007-08-27 18:49:11 +0000
committerjcorgan <jcorgan@221aa14e-8319-0410-a670-987f0aec2ac5>2007-08-27 18:49:11 +0000
commitc088a546ac7ae55748e5421201f3387f3e1286f9 (patch)
treeb655773370d082062c2842181bff1638354c57c8 /gnuradio-examples/python/hier
parent06945c04b4af8af035aeee2e28d5e5626888f5ee (diff)
Merged r6171:6186 from jcorgan/fg into trunk.
Changes hierarchical flow graph API to use gr.top_block instead of gr.runtime. See discuss-gnuradio mailing list for explanation of changes. GRC has not been updated to use the changed API. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@6187 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/hier')
-rwxr-xr-xgnuradio-examples/python/hier/audio/dial_tone2.py6
-rwxr-xr-xgnuradio-examples/python/hier/dect/usrp_dect.py6
-rwxr-xr-xgnuradio-examples/python/hier/digital/benchmark_loopback.py7
-rwxr-xr-xgnuradio-examples/python/hier/digital/benchmark_rx.py7
-rwxr-xr-xgnuradio-examples/python/hier/digital/benchmark_tx.py7
-rwxr-xr-xgnuradio-examples/python/hier/networking/audio_sink.py5
-rwxr-xr-xgnuradio-examples/python/hier/networking/audio_source.py5
-rwxr-xr-xgnuradio-examples/python/hier/networking/dial_tone_sink.py5
-rwxr-xr-xgnuradio-examples/python/hier/networking/dial_tone_source.py5
-rwxr-xr-xgnuradio-examples/python/hier/networking/vector_sink.py5
-rwxr-xr-xgnuradio-examples/python/hier/networking/vector_source.py5
-rwxr-xr-xgnuradio-examples/python/hier/sounder/usrp_sounder_rx.py3
-rwxr-xr-xgnuradio-examples/python/hier/sounder/usrp_sounder_tx.py6
-rwxr-xr-xgnuradio-examples/python/hier/usrp/usrp_siggen.py4
14 files changed, 16 insertions, 60 deletions
diff --git a/gnuradio-examples/python/hier/audio/dial_tone2.py b/gnuradio-examples/python/hier/audio/dial_tone2.py
index a5010faa5d..70d1e53d20 100755
--- a/gnuradio-examples/python/hier/audio/dial_tone2.py
+++ b/gnuradio-examples/python/hier/audio/dial_tone2.py
@@ -60,13 +60,9 @@ if __name__ == '__main__':
options.audio_output,
options.amplitude)
- # Create an instance of a runtime, passing it the top block
- # to process
- runtime = gr.runtime(top)
-
try:
# Run forever
- runtime.run()
+ top.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass
diff --git a/gnuradio-examples/python/hier/dect/usrp_dect.py b/gnuradio-examples/python/hier/dect/usrp_dect.py
index bf562e0d96..27259d8127 100755
--- a/gnuradio-examples/python/hier/dect/usrp_dect.py
+++ b/gnuradio-examples/python/hier/dect/usrp_dect.py
@@ -51,13 +51,9 @@ def main():
# Create an instance of a hierarchical block
top_block = dect_receiver(options)
- # Create an instance of a runtime, passing it the top block
- # to process
- runtime = gr.runtime(top_block)
-
try:
# Run forever
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass
diff --git a/gnuradio-examples/python/hier/digital/benchmark_loopback.py b/gnuradio-examples/python/hier/digital/benchmark_loopback.py
index a98d1cdfb4..31dfb991ba 100755
--- a/gnuradio-examples/python/hier/digital/benchmark_loopback.py
+++ b/gnuradio-examples/python/hier/digital/benchmark_loopback.py
@@ -155,10 +155,7 @@ def main():
# Create an instance of a hierarchical block
top_block = my_graph(mods[options.modulation], demods[options.modulation], rx_callback, options)
-
- # Create an instance of a runtime, passing it the top block
- runtime = gr.runtime(top_block)
- runtime.start()
+ top_block.start()
# generate and send packets
nbytes = int(1e6 * options.megabytes)
@@ -175,7 +172,7 @@ def main():
send_pkt(eof=True)
- runtime.wait()
+ top_block.wait()
if __name__ == '__main__':
try:
diff --git a/gnuradio-examples/python/hier/digital/benchmark_rx.py b/gnuradio-examples/python/hier/digital/benchmark_rx.py
index 669d5618e7..c92d487bdc 100755
--- a/gnuradio-examples/python/hier/digital/benchmark_rx.py
+++ b/gnuradio-examples/python/hier/digital/benchmark_rx.py
@@ -95,12 +95,7 @@ def main():
# Create an instance of a hierarchical block
top_block = receive_path(demods[options.modulation], rx_callback, options)
-
- # Create an instance of a runtime, passing it the top block
- runtime = gr.runtime(top_block)
- runtime.start()
-
- runtime.wait() # wait for it to finish
+ top_block.run()
if __name__ == '__main__':
try:
diff --git a/gnuradio-examples/python/hier/digital/benchmark_tx.py b/gnuradio-examples/python/hier/digital/benchmark_tx.py
index 0059a4555e..752cdff553 100755
--- a/gnuradio-examples/python/hier/digital/benchmark_tx.py
+++ b/gnuradio-examples/python/hier/digital/benchmark_tx.py
@@ -88,10 +88,7 @@ def main():
# Create an instance of a hierarchical block
top_block = transmit_path(mods[options.modulation], options)
-
- # Create an instance of a runtime, passing it the top block
- runtime = gr.runtime(top_block)
- runtime.start()
+ top_block.start()
# generate and send packets
nbytes = int(1e6 * options.megabytes)
@@ -108,7 +105,7 @@ def main():
pktno += 1
send_pkt(eof=True)
- runtime.wait()
+ top_block.wait()
if __name__ == '__main__':
try:
diff --git a/gnuradio-examples/python/hier/networking/audio_sink.py b/gnuradio-examples/python/hier/networking/audio_sink.py
index 116a848150..e59d50834a 100755
--- a/gnuradio-examples/python/hier/networking/audio_sink.py
+++ b/gnuradio-examples/python/hier/networking/audio_sink.py
@@ -50,12 +50,9 @@ if __name__ == '__main__':
top_block = audio_sink(options.src_name, options.src_port,
options.packet_size, options.sample_rate)
- # Create an instance of a runtime, passing it the top block
- runtime = gr.runtime(top_block)
-
try:
# Run forever
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass
diff --git a/gnuradio-examples/python/hier/networking/audio_source.py b/gnuradio-examples/python/hier/networking/audio_source.py
index 2c42e29d3f..d7f4f6d936 100755
--- a/gnuradio-examples/python/hier/networking/audio_source.py
+++ b/gnuradio-examples/python/hier/networking/audio_source.py
@@ -52,12 +52,9 @@ if __name__ == '__main__':
top_block = audio_source(options.src_name, options.dst_name, options.dst_port,
options.packet_size, options.sample_rate)
- # Create an instance of a runtime, passing it the top block
- runtime = gr.runtime(top_block)
-
try:
# Run forever
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass
diff --git a/gnuradio-examples/python/hier/networking/dial_tone_sink.py b/gnuradio-examples/python/hier/networking/dial_tone_sink.py
index 5b979b35bf..47d24b9bcf 100755
--- a/gnuradio-examples/python/hier/networking/dial_tone_sink.py
+++ b/gnuradio-examples/python/hier/networking/dial_tone_sink.py
@@ -50,12 +50,9 @@ if __name__ == '__main__':
top_block = dial_tone_sink(options.src_name, options.src_port,
options.packet_size, options.sample_rate)
- # Create an instance of a runtime, passing it the top block
- runtime = gr.runtime(top_block)
-
try:
# Run forever
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass
diff --git a/gnuradio-examples/python/hier/networking/dial_tone_source.py b/gnuradio-examples/python/hier/networking/dial_tone_source.py
index f092097d94..835f9aafcb 100755
--- a/gnuradio-examples/python/hier/networking/dial_tone_source.py
+++ b/gnuradio-examples/python/hier/networking/dial_tone_source.py
@@ -61,12 +61,9 @@ if __name__ == '__main__':
top_block = dial_tone_source(options.src_name, options.dst_name, options.dst_port,
options.packet_size, options.sample_rate)
- # Create an instance of a runtime, passing it the top block
- runtime = gr.runtime(top_block)
-
try:
# Run forever
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass
diff --git a/gnuradio-examples/python/hier/networking/vector_sink.py b/gnuradio-examples/python/hier/networking/vector_sink.py
index 05f3b0cbc1..981cc598b9 100755
--- a/gnuradio-examples/python/hier/networking/vector_sink.py
+++ b/gnuradio-examples/python/hier/networking/vector_sink.py
@@ -48,12 +48,9 @@ if __name__ == "__main__":
# Create an instance of a hierarchical block
top_block = vector_sink(options.src_name, options.src_port, options.packet_size)
- # Create an instance of a runtime, passing it the top block
- runtime = gr.runtime(top_block)
-
try:
# Run forever
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass
diff --git a/gnuradio-examples/python/hier/networking/vector_source.py b/gnuradio-examples/python/hier/networking/vector_source.py
index 8ef01d7a90..e7ec2a461d 100755
--- a/gnuradio-examples/python/hier/networking/vector_source.py
+++ b/gnuradio-examples/python/hier/networking/vector_source.py
@@ -51,12 +51,9 @@ if __name__ == '__main__':
top_block = vector_source(options.src_name, options.dst_name,
options.dst_port, options.packet_size)
- # Create an instance of a runtime, passing it the top block
- runtime = gr.runtime(top_block)
-
try:
# Run forever
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass
diff --git a/gnuradio-examples/python/hier/sounder/usrp_sounder_rx.py b/gnuradio-examples/python/hier/sounder/usrp_sounder_rx.py
index 54c612f623..6b85281ad7 100755
--- a/gnuradio-examples/python/hier/sounder/usrp_sounder_rx.py
+++ b/gnuradio-examples/python/hier/sounder/usrp_sounder_rx.py
@@ -85,10 +85,9 @@ def main():
sys.exit(1)
top_block = usrp_sounder_rx(options)
- runtime = gr.runtime(top_block)
try:
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
pass
diff --git a/gnuradio-examples/python/hier/sounder/usrp_sounder_tx.py b/gnuradio-examples/python/hier/sounder/usrp_sounder_tx.py
index e7fc3f60bb..ae531d5100 100755
--- a/gnuradio-examples/python/hier/sounder/usrp_sounder_tx.py
+++ b/gnuradio-examples/python/hier/sounder/usrp_sounder_tx.py
@@ -99,13 +99,9 @@ def main():
options.verbose, options.degree, options.chip_rate,
options.amplitude)
- # Create an instance of a runtime, passing it the top block
- # to process
- runtime = gr.runtime(top_block)
-
try:
# Run forever
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass
diff --git a/gnuradio-examples/python/hier/usrp/usrp_siggen.py b/gnuradio-examples/python/hier/usrp/usrp_siggen.py
index f1eb2a6bc0..91a7a7affd 100755
--- a/gnuradio-examples/python/hier/usrp/usrp_siggen.py
+++ b/gnuradio-examples/python/hier/usrp/usrp_siggen.py
@@ -119,11 +119,9 @@ def main ():
top_block = my_graph(options.type, options.amplitude, options.waveform_freq, options.offset,
options.tx_subdev_spec, options.interp, options.rf_freq)
- runtime = gr.runtime(top_block)
-
try:
# Run forever
- runtime.run()
+ top_block.run()
except KeyboardInterrupt:
# Ctrl-C exits
pass