Changeset 9741

Show
Ignore:
Timestamp:
10/07/08 21:48:33
Author:
jblum
Message:

probe hier wrappers

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/trunk/grc/data/platforms/python/block_tree.xml

    r9730 r9741  
    242242                <block>gr_probe_density_b</block> 
    243243                <block>gr_probe_mpsk_snr_c</block> 
    244                 <block>gr_probe_signal_f</block> 
    245244        </cat> 
    246245        <cat> 
  • gnuradio/trunk/grc/data/platforms/python/blocks/Makefile.am

    r9730 r9741  
    142142        gr_probe_density_b.xml \ 
    143143        gr_probe_mpsk_snr_c.xml \ 
    144         gr_probe_signal_f.xml \ 
    145144        gr_pwr_squelch_xx.xml \ 
    146145        gr_quadrature_demod_cf.xml \ 
  • gnuradio/trunk/grc/data/platforms/python/blocks/gr_probe_avg_mag_sqrd_x.xml

    r9739 r9741  
    88        <name>Probe Avg Mag^2</name> 
    99        <key>gr_probe_avg_mag_sqrd_x</key> 
    10         <import>from gnuradio import gr</import> 
    11         <import>import threading</import> 
    12         <import>import time</import> 
    13         <make>gr.probe_avg_mag_sqrd_$(type)($threshold, $alpha) 
    14 def _$(id)_run(): 
    15         while True: 
    16                 time.sleep($update_interval) 
    17                 print "$(id) Level:", self.$(id).level() 
    18 _$(id)_thread = threading.Thread(target=_$(id)_run) 
    19 _$(id)_thread.setDaemon(True) 
    20 _$(id)_thread.start()</make> 
     10        <import>from grc_gnuradio import blks2 as grc_blks2</import> 
     11        <make>grc_blks2.probe_avg_mag_sqrd_$(type)( 
     12        threshold=$threshold, 
     13        alpha=$alpha, 
     14        probe_rate=$probe_rate, 
     15)</make> 
    2116        <callback>set_alpha($alpha)</callback> 
    2217        <callback>set_threshold($threshold)</callback> 
     18        <callback>set_probe_rate($probe_rate)</callback> 
    2319        <param> 
    2420                <name>Type</name> 
     
    3935                <name>Threshold (dB)</name> 
    4036                <key>threshold</key> 
     37                <value>0</value> 
    4138                <type>real</type> 
    4239        </param> 
     
    4441                <name>Alpha</name> 
    4542                <key>alpha</key> 
     43                <value>1</value> 
    4644                <type>real</type> 
    4745        </param> 
    4846        <param> 
    49                 <name>Update Interval (s)</name> 
    50                 <key>update_interval</key> 
    51                 <value>1.0</value> 
     47                <name>Probe Rate</name> 
     48                <key>probe_rate</key> 
     49                <value>10</value> 
    5250                <type>real</type> 
    5351        </param> 
     
    5654                <type>$type.input</type> 
    5755        </sink> 
     56        <source> 
     57                <name>out</name> 
     58                <type>float</type> 
     59        </source> 
    5860</block> 
  • gnuradio/trunk/grc/data/platforms/python/blocks/gr_probe_density_b.xml

    r9739 r9741  
    88        <name>Probe Density</name> 
    99        <key>gr_probe_density_b</key> 
    10         <import>from gnuradio import gr</import> 
    11         <import>import threading</import> 
    12         <import>import time</import> 
    13         <make>gr.probe_density_b($alpha) 
    14 def _$(id)_run(): 
    15         while True: 
    16                 time.sleep($update_interval) 
    17                 print "$(id) Density:", self.$(id).density() 
    18 _$(id)_thread = threading.Thread(target=_$(id)_run) 
    19 _$(id)_thread.setDaemon(True) 
    20 _$(id)_thread.start()</make> 
     10        <import>from grc_gnuradio import blks2 as grc_blks2</import> 
     11        <make>grc_blks2.probe_density_b( 
     12        alpha=$alpha, 
     13        probe_rate=$probe_rate, 
     14)</make> 
    2115        <callback>set_alpha($alpha)</callback> 
     16        <callback>set_probe_rate($probe_rate)</callback> 
    2217        <param> 
    2318                <name>Alpha</name> 
    2419                <key>alpha</key> 
     20                <value>1</value> 
    2521                <type>real</type> 
    2622        </param> 
    2723        <param> 
    28                 <name>Update Interval (s)</name> 
    29                 <key>update_interval</key> 
    30                 <value>1.0</value> 
     24                <name>Probe Rate</name> 
     25                <key>probe_rate</key> 
     26                <value>10</value> 
    3127                <type>real</type> 
    3228        </param> 
     
    3531                <type>byte</type> 
    3632        </sink> 
     33        <source> 
     34                <name>out</name> 
     35                <type>float</type> 
     36        </source> 
    3737</block> 
  • gnuradio/trunk/grc/data/platforms/python/blocks/gr_probe_mpsk_snr_c.xml

    r9739 r9741  
    88        <name>Probe MPSK SNR</name> 
    99        <key>gr_probe_mpsk_snr_c</key> 
    10         <import>from gnuradio import gr</import> 
    11         <import>import threading</import> 
    12         <import>import time</import> 
    13         <make>gr.probe_mpsk_snr_c($alpha) 
    14 def _$(id)_run(): 
    15         while True: 
    16                 time.sleep($update_interval) 
    17                 print "$(id) Signal Mean:", self.$(id).signal_mean() 
    18                 print "$(id) Noise Variance:", self.$(id).noise_variance() 
    19                 print "$(id) SNR:", self.$(id).snr() 
    20 _$(id)_thread = threading.Thread(target=_$(id)_run) 
    21 _$(id)_thread.setDaemon(True) 
    22 _$(id)_thread.start()</make> 
     10        <import>from grc_gnuradio import blks2 as grc_blks2</import> 
     11        <make>grc_blks2.probe_mpsk_snr_c( 
     12        type="$type", 
     13        alpha=$alpha, 
     14        probe_rate=$probe_rate, 
     15)</make> 
    2316        <callback>set_alpha($alpha)</callback> 
     17        <callback>set_probe_rate($probe_rate)</callback> 
     18        <param> 
     19                <name>Type</name> 
     20                <key>type</key> 
     21                <type>enum</type> 
     22                <option> 
     23                        <name>SNR</name> 
     24                        <key>snr</key> 
     25                </option> 
     26                <option> 
     27                        <name>Signal Mean</name> 
     28                        <key>signal_mean</key> 
     29                </option> 
     30                <option> 
     31                        <name>Noise Variance</name> 
     32                        <key>noise_variance</key> 
     33                </option> 
     34        </param> 
    2435        <param> 
    2536                <name>Alpha</name> 
    2637                <key>alpha</key> 
     38                <value>1</value> 
    2739                <type>real</type> 
    2840        </param> 
    2941        <param> 
    30                 <name>Update Interval (s)</name> 
    31                 <key>update_interval</key> 
    32                 <value>1.0</value> 
     42                <name>Probe Rate</name> 
     43                <key>probe_rate</key> 
     44                <value>10</value> 
    3345                <type>real</type> 
    3446        </param> 
     
    3749                <type>complex</type> 
    3850        </sink> 
     51        <source> 
     52                <name>out</name> 
     53                <type>float</type> 
     54        </source> 
    3955</block> 
  • gnuradio/trunk/grc/data/platforms/python/blocks/wxgui_numbersink2.xml

    r9525 r9741  
    103103                <name>Reference Level</name> 
    104104                <key>ref_level</key> 
    105                 <value>50</value> 
     105                <value>0</value> 
    106106                <type>real</type> 
    107107        </param> 
  • gnuradio/trunk/grc/src/grc_gnuradio/blks2/Makefile.am

    r9525 r9741  
    2828        error_rate.py \ 
    2929        packet.py \ 
     30        probe.py \ 
    3031        queue.py \ 
    3132        selector.py 
  • gnuradio/trunk/grc/src/grc_gnuradio/blks2/__init__.py

    r9525 r9741  
    2626from packet import packet_encoder, packet_decoder 
    2727from error_rate import error_rate 
     28from probe import probe_avg_mag_sqrd_c, probe_avg_mag_sqrd_f, probe_density_b, probe_mpsk_snr_c 
  • gnuradio/trunk/grc/src/grc_gnuradio/blks2/queue.py

    r9525 r9741  
    141141                        gr.io_signature(1, 1, self._item_size*self._vlen) # Output signature 
    142142                ) 
    143                 #create message sink 
     143                #create message source 
    144144                message_source = gr.message_source(self._item_size*self._vlen, 1) 
    145145                self._msgq = message_source.msgq() 
  • gnuradio/trunk/grc/src/grc_gnuradio/blks2/selector.py

    r9525 r9741  
    1 #!/usr/bin/env python 
    21# 
    32# Copyright 2008 Free Software Foundation, Inc. 
  • gnuradio/trunk/grc/todo.txt

    r9739 r9741  
    77-throttle with sink only (source is nulled) 
    88-simplify simple usrp 
    9 -probe blocks needs better polling mechanism 
    109 
    1110################################################## 
     
    2120-search for blocks 
    2221-click and drag on whitespace to scroll 
    23 -expand preferences, allow for custome prefs, prefs dialog should infer structure 
     22-expand preferences, allow for custom prefs, prefs dialog should infer structure 
    2423 
    2524################################################## 
     
    3029-add hier blocks to tree without restart? 
    3130-dont hide vlen controller when vlen > 1 
    32 -dont generate py files in cwd, add preference for user to choose 
     31-dont generate py files in .grc file dir 
     32-save/restore cwd 
     33-check for .grc file readonly, ro message in window, no save option 
    3334 
    3435##################################################