diff options
author | Josh Blum | 2011-03-07 11:43:34 -0800 |
---|---|---|
committer | Josh Blum | 2011-03-07 11:43:34 -0800 |
commit | 4e0fb789e55e26bc16990a257c57494f3d3e6100 (patch) | |
tree | ce52cfd985366e8fe7c86e2ff01c8877c67ca7ba /grc | |
parent | 7070c10d7ac59adcd597c18ec2c83b1b59ed87e9 (diff) | |
download | gnuradio-4e0fb789e55e26bc16990a257c57494f3d3e6100.tar.gz gnuradio-4e0fb789e55e26bc16990a257c57494f3d3e6100.tar.bz2 gnuradio-4e0fb789e55e26bc16990a257c57494f3d3e6100.zip |
grc: added function args to probe block and documentation
Diffstat (limited to 'grc')
-rw-r--r-- | grc/blocks/gr_probe_avg_mag_sqrd_x.xml | 4 | ||||
-rw-r--r-- | grc/blocks/gr_probe_density_b.xml | 4 | ||||
-rw-r--r-- | grc/blocks/gr_probe_mpsk_snr_c.xml | 4 | ||||
-rw-r--r-- | grc/blocks/gr_probe_signal_f.xml | 4 | ||||
-rw-r--r-- | grc/blocks/variable_function_probe.xml | 18 |
5 files changed, 29 insertions, 5 deletions
diff --git a/grc/blocks/gr_probe_avg_mag_sqrd_x.xml b/grc/blocks/gr_probe_avg_mag_sqrd_x.xml index ac409ad67..6bf706ae1 100644 --- a/grc/blocks/gr_probe_avg_mag_sqrd_x.xml +++ b/grc/blocks/gr_probe_avg_mag_sqrd_x.xml @@ -43,6 +43,8 @@ <type>$type.input</type> </sink> <doc> -Available functions to probe: level +Available functions to probe: level() + +Use with the function probe block. </doc> </block> diff --git a/grc/blocks/gr_probe_density_b.xml b/grc/blocks/gr_probe_density_b.xml index 8e0e2c964..3a91256aa 100644 --- a/grc/blocks/gr_probe_density_b.xml +++ b/grc/blocks/gr_probe_density_b.xml @@ -27,6 +27,8 @@ <type>byte</type> </sink> <doc> -Available functions to probe: density +Available functions to probe: density() + +Use with the function probe block. </doc> </block> diff --git a/grc/blocks/gr_probe_mpsk_snr_c.xml b/grc/blocks/gr_probe_mpsk_snr_c.xml index 38211b55f..5687e867d 100644 --- a/grc/blocks/gr_probe_mpsk_snr_c.xml +++ b/grc/blocks/gr_probe_mpsk_snr_c.xml @@ -21,6 +21,8 @@ <type>complex</type> </sink> <doc> -Available functions to probe: signal_mean, noise_variance +Available functions to probe: signal_mean(), noise_variance() + +Use with the function probe block. </doc> </block> diff --git a/grc/blocks/gr_probe_signal_f.xml b/grc/blocks/gr_probe_signal_f.xml index e1847788a..5c38e816f 100644 --- a/grc/blocks/gr_probe_signal_f.xml +++ b/grc/blocks/gr_probe_signal_f.xml @@ -14,6 +14,8 @@ <type>float</type> </sink> <doc> -Available functions to probe: level +Available functions to probe: level() + +Use with the function probe block. </doc> </block> diff --git a/grc/blocks/variable_function_probe.xml b/grc/blocks/variable_function_probe.xml index 695d2f56c..49f48fc89 100644 --- a/grc/blocks/variable_function_probe.xml +++ b/grc/blocks/variable_function_probe.xml @@ -13,7 +13,7 @@ <make>#slurp def _$(id)_probe(): while True: - self.set_$(id)(self.$(block_id()).$(function_name())()) + self.set_$(id)(self.$(block_id()).$(function_name())($(function_args()))) time.sleep(1.0/($poll_rate)) _$(id)_thread = threading.Thread(target=_$(id)_probe) _$(id)_thread.daemon = True @@ -38,6 +38,13 @@ _$(id)_thread.start()</make> <type>string</type> </param> <param> + <name>Function Args</name> + <key>function_args</key> + <value></value> + <type>string</type> + <hide>#if $function_args() then 'none' else 'part'#</hide> + </param> + <param> <name>Poll Rate (Hz)</name> <key>poll_rate</key> <value>10</value> @@ -46,6 +53,15 @@ _$(id)_thread.start()</make> <doc> Periodically probe a function and set its value to this variable. +Set the values for block ID, function name, and function args appropriately: \ +Block ID should be the ID of another block in this flow graph. \ +Function name should be the name of a class method on that block. \ +Function args are the parameters passed into that function. \ +For a function with no arguments, leave function args blank. + +The values will used literally, and generated into the following form: +self.block_id.function_name(function_args) + To poll a stream for a level, use this with the probe signal block. </doc> </block> |