diff options
Diffstat (limited to 'grc/data')
-rw-r--r-- | grc/data/platforms/python/block_tree.xml | 1 | ||||
-rw-r--r-- | grc/data/platforms/python/blocks/Makefile.am | 1 | ||||
-rw-r--r-- | grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml | 2 | ||||
-rw-r--r-- | grc/data/platforms/python/blocks/probe_function.xml | 44 |
4 files changed, 47 insertions, 1 deletions
diff --git a/grc/data/platforms/python/block_tree.xml b/grc/data/platforms/python/block_tree.xml index 5e2d8f50c..4cd1ca219 100644 --- a/grc/data/platforms/python/block_tree.xml +++ b/grc/data/platforms/python/block_tree.xml @@ -241,6 +241,7 @@ <block>gr_probe_avg_mag_sqrd_x</block> <block>gr_probe_density_b</block> <block>gr_probe_mpsk_snr_c</block> + <block>probe_function</block> </cat> <cat> <name>USRP</name> diff --git a/grc/data/platforms/python/blocks/Makefile.am b/grc/data/platforms/python/blocks/Makefile.am index 1e4d3f7fc..de6792602 100644 --- a/grc/data/platforms/python/blocks/Makefile.am +++ b/grc/data/platforms/python/blocks/Makefile.am @@ -184,6 +184,7 @@ dist_ourdata_DATA = \ pad_source.xml \ parameter.xml \ preferences.xml \ + probe_function.xml \ random_source_x.xml \ trellis_encoder_xx.xml \ trellis_metrics_x.xml \ diff --git a/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml b/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml index 655eb7c0d..8b427076a 100644 --- a/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml +++ b/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml @@ -9,7 +9,7 @@ <key>gr_probe_mpsk_snr_c</key> <import>from grc_gnuradio import blks2 as grc_blks2</import> <make>grc_blks2.probe_mpsk_snr_c( - type="$type", + type="$type", alpha=$alpha, probe_rate=$probe_rate, )</make> diff --git a/grc/data/platforms/python/blocks/probe_function.xml b/grc/data/platforms/python/blocks/probe_function.xml new file mode 100644 index 000000000..d46878526 --- /dev/null +++ b/grc/data/platforms/python/blocks/probe_function.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Probe Function +################################################### + --> +<block> + <name>Probe Function</name> + <key>probe_function</key> + <import>from grc_gnuradio import blks2 as grc_blks2</import> + <make>grc_blks2.probe_function( + probe_callback=self.$(block_id.eval).$(function_name.eval), + probe_rate=$probe_rate, +)</make> + <callback>set_probe_rate($probe_rate)</callback> + <param> + <name>Block ID</name> + <key>block_id</key> + <value>my_block_0</value> + <type>string</type> + </param> + <param> + <name>Function Name</name> + <key>function_name</key> + <value>get_number</value> + <type>string</type> + </param> + <param> + <name>Probe Rate</name> + <key>probe_rate</key> + <value>10</value> + <type>real</type> + </param> + <source> + <name>out</name> + <type>float</type> + </source> + <doc> +Polls a function of an arbitrary block and writes the value to the output port. \ +The block id is the id of another block in the flow graph. \ +The function name is the name of a function in the said block. \ +The function should take no arguments and return a floating point or integer number. + </doc> +</block> |