commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 14/21: qtgui: moving to only allow either s


From: git
Subject: [Commit-gnuradio] [gnuradio] 14/21: qtgui: moving to only allow either streaming or message modes.
Date: Fri, 30 Oct 2015 21:11:27 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 2a59946b26d5bcadc0aa66879870f49511816086
Author: Tom Rondeau <address@hidden>
Date:   Wed Oct 28 12:21:51 2015 -0400

    qtgui: moving to only allow either streaming or message modes.
    
    Having both stream and message ports available at the same time will
    likely cause confusion and problems when trying to plot both.
    
    Hides some parameters that have no effect on the operation of the sink
    in this mode.
    
    Also: histogram fixed to support accumulate in message mode.
---
 gr-qtgui/grc/qtgui_const_sink_x.xml                | 38 +++++++++------
 gr-qtgui/grc/qtgui_freq_sink_x.xml                 | 55 +++++++++++++++-------
 gr-qtgui/grc/qtgui_histogram_sink_x.xml            | 36 +++++++++-----
 gr-qtgui/grc/qtgui_time_raster_x.xml               | 43 ++++++++++++-----
 gr-qtgui/grc/qtgui_time_sink_x.xml                 | 46 ++++++++++++------
 gr-qtgui/grc/qtgui_waterfall_sink_x.xml            | 48 +++++++++++++------
 .../include/gnuradio/qtgui/HistogramDisplayPlot.h  |  1 +
 .../include/gnuradio/qtgui/histogramdisplayform.h  |  1 +
 gr-qtgui/lib/HistogramDisplayPlot.cc               |  6 +++
 gr-qtgui/lib/const_sink_c_impl.cc                  |  4 +-
 gr-qtgui/lib/freq_sink_c_impl.cc                   |  4 +-
 gr-qtgui/lib/freq_sink_f_impl.cc                   |  4 +-
 gr-qtgui/lib/histogram_sink_f_impl.cc              | 18 ++++---
 gr-qtgui/lib/histogramdisplayform.cc               |  6 +++
 gr-qtgui/lib/time_raster_sink_b_impl.cc            |  4 +-
 gr-qtgui/lib/time_raster_sink_f_impl.cc            |  4 +-
 gr-qtgui/lib/time_sink_c_impl.cc                   |  4 +-
 gr-qtgui/lib/time_sink_f_impl.cc                   |  4 +-
 gr-qtgui/lib/waterfall_sink_c_impl.cc              |  4 +-
 gr-qtgui/lib/waterfall_sink_f_impl.cc              |  4 +-
 20 files changed, 224 insertions(+), 110 deletions(-)

diff --git a/gr-qtgui/grc/qtgui_const_sink_x.xml 
b/gr-qtgui/grc/qtgui_const_sink_x.xml
index 5a21337..b20dc1b 100644
--- a/gr-qtgui/grc/qtgui_const_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_const_sink_x.xml
@@ -14,7 +14,7 @@
 qtgui.$(type.fcn)(
        $size, \#size
        $name, \#name
-       $nconnections \#number of inputs
+       #if $type.t == 'message' then 0 else $nconnections# \#number of inputs
 )
 self.$(id).set_update_time($update_time)
 self.$(id).set_y_axis($ymin, $ymax)
@@ -38,7 +38,7 @@ markers = [$marker1, $marker2, $marker3, $marker4, $marker5,
            $marker6, $marker7, $marker8, $marker9, $marker10]
 alphas = [$alpha1, $alpha2, $alpha3, $alpha4, $alpha5,
           $alpha6, $alpha7, $alpha8, $alpha9, $alpha10]
-for i in xrange($nconnections):
+for i in xrange(#if $type.t == 'message' then 1 else $nconnections#):
     if len(labels[i]) == 0:
         self.$(id).set_line_label(i, "Data {0}".format(i))
     else:
@@ -68,8 +68,18 @@ $(gui_hint()($win))</make>
     <key>type</key>
     <value>complex</value>
     <type>enum</type>
-    
<option><name>Complex</name><key>complex</key><opt>fcn:const_sink_c</opt></option>
-<!--<option><name>Float</name><key>float</key><opt>fcn:const_sink_f</opt></option>
 -->
+    <option>
+      <name>Complex</name>
+      <key>complex</key>
+      <opt>fcn:const_sink_c</opt>
+      <opt>t:complex</opt>
+    </option>
+    <option>
+      <name>Complex Message</name>
+      <key>msg_complex</key>
+      <opt>fcn:const_sink_c</opt>
+      <opt>t:message</opt>
+    </option>
   </param>
 
   <param>
@@ -85,6 +95,7 @@ $(gui_hint()($win))</make>
     <key>size</key>
     <value>1024</value>
     <type>int</type>
+    <hide>#if $type.t == 'message' then 'all' else 'none'#</hide>
   </param>
 
   <param>
@@ -125,6 +136,7 @@ $(gui_hint()($win))</make>
     <type>real</type>
     <hide>part</hide>
   </param>
+
   <param>
     <name>Y max</name>
     <key>ymax</key>
@@ -132,6 +144,7 @@ $(gui_hint()($win))</make>
     <type>real</type>
     <hide>part</hide>
   </param>
+
   <param>
     <name>X min</name>
     <key>xmin</key>
@@ -139,6 +152,7 @@ $(gui_hint()($win))</make>
     <type>real</type>
     <hide>part</hide>
   </param>
+
   <param>
     <name>X max</name>
     <key>xmax</key>
@@ -146,13 +160,15 @@ $(gui_hint()($win))</make>
     <type>real</type>
     <hide>part</hide>
   </param>
+
   <param>
     <name>Number of Inputs</name>
     <key>nconnections</key>
     <value>1</value>
     <type>int</type>
-    <hide>part</hide>
+    <hide>#if $type.t == 'message' then 'all' else 'part'#</hide>
   </param>
+
   <param>
     <name>Update Period</name>
     <key>update_time</key>
@@ -160,6 +176,7 @@ $(gui_hint()($win))</make>
     <type>real</type>
     <hide>part</hide>
   </param>
+
   <param>
     <name>GUI Hint</name>
     <key>gui_hint</key>
@@ -809,17 +826,10 @@ $(gui_hint()($win))</make>
   </param>
 
 
-
   <sink>
     <name>in</name>
-    <type>$type</type>
-    <nports>$nconnections</nports>
-    <optional>1</optional>
-  </sink>
-
-  <sink>
-    <name>pdus</name>
-    <type>message</type>
+    <type>$type.t</type>
+    <nports>#if $type.t == 'message' then '0' else '$nconnections'#</nports>
     <optional>1</optional>
   </sink>
 
diff --git a/gr-qtgui/grc/qtgui_freq_sink_x.xml 
b/gr-qtgui/grc/qtgui_freq_sink_x.xml
index 0cf31f5..9d7acc9 100644
--- a/gr-qtgui/grc/qtgui_freq_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_freq_sink_x.xml
@@ -18,7 +18,7 @@ qtgui.$(type.fcn)(
        $fc, \#fc
        $bw, \#bw
        $name, \#name
-       $nconnections \#number of inputs
+       #if $type.t == 'message' then 0 else $nconnections# \#number of inputs
 )
 self.$(id).set_update_time($update_time)
 self.$(id).set_y_axis($ymin, $ymax)
@@ -31,7 +31,7 @@ self.$(id).enable_control_panel($ctrlpanel)
 if not $legend:
   self.$(id).disable_legend()
 
-if $type == type(float()):
+if "$type" == "float" or "$type" == "msg_float":
   self.$(id).set_plot_pos_half(not $freqhalf)
 
 labels = [$label1, $label2, $label3, $label4, $label5,
@@ -42,7 +42,7 @@ colors = [$color1, $color2, $color3, $color4, $color5,
           $color6, $color7, $color8, $color9, $color10]
 alphas = [$alpha1, $alpha2, $alpha3, $alpha4, $alpha5,
           $alpha6, $alpha7, $alpha8, $alpha9, $alpha10]
-for i in xrange($nconnections):
+for i in xrange(#if $type.t == 'message' then 1 else $nconnections#):
     if len(labels[i]) == 0:
         self.$(id).set_line_label(i, "Data {0}".format(i))
     else:
@@ -71,8 +71,30 @@ $(gui_hint()($win))</make>
     <key>type</key>
     <value>complex</value>
     <type>enum</type>
-    
<option><name>Complex</name><key>complex</key><opt>fcn:freq_sink_c</opt></option>
-    
<option><name>Float</name><key>float</key><opt>fcn:freq_sink_f</opt></option>
+    <option>
+      <name>Complex</name>
+      <key>complex</key>
+      <opt>fcn:freq_sink_c</opt>
+      <opt>t:complex</opt>
+    </option>
+    <option>
+      <name>Float</name>
+      <key>float</key>
+      <opt>fcn:freq_sink_f</opt>
+      <opt>t:float</opt>
+    </option>
+    <option>
+      <name>Complex Message</name>
+      <key>msg_complex</key>
+      <opt>fcn:freq_sink_c</opt>
+      <opt>t:message</opt>
+    </option>
+    <option>
+      <name>Float Message</name>
+      <key>msg_float</key>
+      <opt>fcn:freq_sink_f</opt>
+      <opt>t:message</opt>
+    </option>
   </param>
 
   <param>
@@ -88,15 +110,15 @@ $(gui_hint()($win))</make>
     <key>fftsize</key>
     <value>1024</value>
     <type>int</type>
+    <hide>#if $type.t == 'message' then 'all' else 'all'#</hide>
   </param>
 
-
   <param>
     <name>Spectrum Width</name>
     <key>freqhalf</key>
     <value>True</value>
     <type>enum</type>
-    <hide>#if $type() == "float" then 'part' else 'all'#</hide>
+    <hide>#if $type() == "float" or $type() == "msg_float" then 'part' else 
'all'#</hide>
     <option>
       <name>Full</name>
       <key>True</key>
@@ -107,8 +129,6 @@ $(gui_hint()($win))</make>
     </option>
   </param>
 
-
-
   <param>
     <name>Window Type</name>
     <key>wintype</key>
@@ -151,6 +171,7 @@ $(gui_hint()($win))</make>
     <value>0</value>
     <type>real</type>
   </param>
+
   <param>
     <name>Bandwidth (Hz)</name>
     <key>bw</key>
@@ -221,6 +242,7 @@ $(gui_hint()($win))</make>
     <type>real</type>
     <hide>part</hide>
   </param>
+
   <param>
     <name>Y max</name>
     <key>ymax</key>
@@ -228,13 +250,15 @@ $(gui_hint()($win))</make>
     <type>real</type>
     <hide>part</hide>
   </param>
+
   <param>
     <name>Number of Inputs</name>
     <key>nconnections</key>
     <value>1</value>
     <type>int</type>
-    <hide>part</hide>
+    <hide>#if $type.t == 'message' then 'all' else 'part'#</hide>
   </param>
+
   <param>
     <name>Update Period</name>
     <key>update_time</key>
@@ -242,6 +266,7 @@ $(gui_hint()($win))</make>
     <type>real</type>
     <hide>part</hide>
   </param>
+
   <param>
     <name>GUI Hint</name>
     <key>gui_hint</key>
@@ -704,14 +729,8 @@ $(gui_hint()($win))</make>
 
   <sink>
     <name>in</name>
-    <type>$type</type>
-    <nports>$nconnections</nports>
-    <optional>1</optional>
-  </sink>
-
-  <sink>
-    <name>pdus</name>
-    <type>message</type>
+    <type>$type.t</type>
+    <nports>#if $type.t == 'message' then '0' else '$nconnections'#</nports>
     <optional>1</optional>
   </sink>
 
diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.xml 
b/gr-qtgui/grc/qtgui_histogram_sink_x.xml
index 1d28fdd..42b3924 100644
--- a/gr-qtgui/grc/qtgui_histogram_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_histogram_sink_x.xml
@@ -17,7 +17,7 @@ qtgui.histogram_sink_f(
         $xmin,
         $xmax,
        $name,
-       $nconnections
+       #if $type.t == 'message' then 0 else $nconnections#
 )
 
 self.$(id).set_update_time($update_time)
@@ -40,7 +40,7 @@ markers = [$marker1, $marker2, $marker3, $marker4, $marker5,
            $marker6, $marker7, $marker8, $marker9, $marker10]
 alphas = [$alpha1, $alpha2, $alpha3, $alpha4, $alpha5,
           $alpha6, $alpha7, $alpha8, $alpha9, $alpha10]
-for i in xrange($nconnections):
+for i in xrange(#if $type.t == 'message' then 1 else $nconnections#):
     if len(labels[i]) == 0:
         self.$(id).set_line_label(i, "Data {0}".format(i))
     else:
@@ -67,6 +67,25 @@ $(gui_hint()($win))
   </param_tab_order>
 
   <param>
+    <name>Type</name>
+    <key>type</key>
+    <value>float</value>
+    <type>enum</type>
+    <option>
+      <name>Float</name>
+      <key>float</key>
+      <opt>fcn:histogram_sink_f</opt>
+      <opt>t:float</opt>
+    </option>
+    <option>
+      <name>Float Message</name>
+      <key>msg_float</key>
+      <opt>fcn:histogram_sink_f</opt>
+      <opt>t:message</opt>
+    </option>
+  </param>
+
+  <param>
     <name>Name</name>
     <key>name</key>
     <value>""</value>
@@ -79,6 +98,7 @@ $(gui_hint()($win))
     <key>size</key>
     <value>1024</value>
     <type>int</type>
+    <hide>#if $type.t == 'message' then 'all' else 'none'#</hide>
   </param>
 
   <param>
@@ -153,7 +173,7 @@ $(gui_hint()($win))
     <key>nconnections</key>
     <value>1</value>
     <type>int</type>
-    <hide>part</hide>
+    <hide>#if $type.t == 'message' then 'all' else 'part'#</hide>
   </param>
 
   <param>
@@ -743,14 +763,8 @@ $(gui_hint()($win))
 
   <sink>
     <name>in</name>
-    <type>float</type>
-    <nports>$nconnections</nports>
-    <optional>1</optional>
-  </sink>
-
-  <sink>
-    <name>pdus</name>
-    <type>message</type>
+    <type>$type.t</type>
+    <nports>#if $type.t == 'message' then '0' else '$nconnections'#</nports>
     <optional>1</optional>
   </sink>
 
diff --git a/gr-qtgui/grc/qtgui_time_raster_x.xml 
b/gr-qtgui/grc/qtgui_time_raster_x.xml
index 55e193a..9824c76 100644
--- a/gr-qtgui/grc/qtgui_time_raster_x.xml
+++ b/gr-qtgui/grc/qtgui_time_raster_x.xml
@@ -18,7 +18,7 @@ qtgui.$(type.fcn)(
        $mult,
        $offset,
        $name,
-       $nconnections,
+       #if $type.t == 'message' then 0 else $nconnections#,
        )
 
 self.$(id).set_update_time($update_time)
@@ -31,7 +31,7 @@ colors = [$color1, $color2, $color3, $color4, $color5,
           $color6, $color7, $color8, $color9, $color10]
 alphas = [$alpha1, $alpha2, $alpha3, $alpha4, $alpha5,
           $alpha6, $alpha7, $alpha8, $alpha9, $alpha10]
-for i in xrange($nconnections):
+for i in xrange(#if $type.t == 'message' then 1 else $nconnections#):
     if len(labels[i]) == 0:
         self.$(id).set_line_label(i, "Data {0}".format(i))
     else:
@@ -59,8 +59,30 @@ $(gui_hint()($win))</make>
     <key>type</key>
     <value>complex</value>
     <type>enum</type>
-    
<option><name>Byte</name><key>byte</key><opt>fcn:time_raster_sink_b</opt></option>
-    
<option><name>Float</name><key>float</key><opt>fcn:time_raster_sink_f</opt></option>
+    <option>
+      <name>Byte</name>
+      <key>byte</key>
+      <opt>fcn:time_raster_sink_b</opt>
+      <opt>t:byte</opt>
+    </option>
+    <option>
+      <name>Float</name>
+      <key>float</key>
+      <opt>fcn:time_raster_sink_f</opt>
+      <opt>t:float</opt>
+    </option>
+    <option>
+      <name>Byte Message</name>
+      <key>msg_byte</key>
+      <opt>fcn:time_raster_sink_b</opt>
+      <opt>t:message</opt>
+    </option>
+    <option>
+      <name>Float Message</name>
+      <key>msg_float</key>
+      <opt>fcn:time_raster_sink_f</opt>
+      <opt>t:message</opt>
+    </option>
   </param>
 
   <param>
@@ -82,6 +104,7 @@ $(gui_hint()($win))</make>
     <name>Num. Rows</name>
     <key>nrows</key>
     <type>int</type>
+    <hide>#if $type.t == 'message' then 'all' else 'none'#</hide>
   </param>
 
   <param>
@@ -143,7 +166,7 @@ $(gui_hint()($win))</make>
     <key>nconnections</key>
     <value>1</value>
     <type>int</type>
-    <hide>part</hide>
+    <hide>#if $type.t == 'message' then 'all' else 'part'#</hide>
   </param>
 
   <param>
@@ -413,14 +436,8 @@ $(gui_hint()($win))</make>
 
   <sink>
     <name>in</name>
-    <type>$type</type>
-    <nports>$nconnections</nports>
-    <optional>1</optional>
-  </sink>
-
-  <sink>
-    <name>pdus</name>
-    <type>message</type>
+    <type>$type.t</type>
+    <nports>#if $type.t == 'message' then '0' else '$nconnections'#</nports>
     <optional>1</optional>
   </sink>
 
diff --git a/gr-qtgui/grc/qtgui_time_sink_x.xml 
b/gr-qtgui/grc/qtgui_time_sink_x.xml
index 913ef88..e8207bb 100644
--- a/gr-qtgui/grc/qtgui_time_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_time_sink_x.xml
@@ -16,7 +16,7 @@ qtgui.$(type.fcn)(
        $size, \#size
        $srate, \#samp_rate
        $name, \#name
-       $nconnections \#number of inputs
+       #if $type.t == 'message' then 0 else $nconnections# \#number of inputs
 )
 self.$(id).set_update_time($update_time)
 self.$(id).set_y_axis($ymin, $ymax)
@@ -60,7 +60,7 @@ for i in xrange(2*$nconnections):
     self.$(id).set_line_marker(i, markers[i])
     self.$(id).set_line_alpha(i, alphas[i])
 #else
-for i in xrange($nconnections):
+for i in xrange(#if $type.t == 'message' then 1 else $nconnections#):
     if len(labels[i]) == 0:
         self.$(id).set_line_label(i, "Data {0}".format(i))
     else:
@@ -93,8 +93,30 @@ $(gui_hint()($win))</make>
     <key>type</key>
     <value>complex</value>
     <type>enum</type>
-    
<option><name>Complex</name><key>complex</key><opt>fcn:time_sink_c</opt></option>
-    
<option><name>Float</name><key>float</key><opt>fcn:time_sink_f</opt></option>
+    <option>
+      <name>Complex</name>
+      <key>complex</key>
+      <opt>fcn:time_sink_c</opt>
+      <opt>t:complex</opt>
+    </option>
+    <option>
+      <name>Float</name>
+      <key>float</key>
+      <opt>fcn:time_sink_f</opt>
+      <opt>t:float</opt>
+    </option>
+    <option>
+      <name>Complex Message</name>
+      <key>msg_complex</key>
+      <opt>fcn:time_sink_c</opt>
+      <opt>t:message</opt>
+    </option>
+    <option>
+      <name>Float Message</name>
+      <key>msg_float</key>
+      <opt>fcn:time_sink_f</opt>
+      <opt>t:message</opt>
+    </option>
   </param>
 
   <param>
@@ -126,7 +148,9 @@ $(gui_hint()($win))</make>
     <key>size</key>
     <value>1024</value>
     <type>int</type>
+    <hide>#if $type.t == 'message' then 'all' else 'none'#</hide>
   </param>
+
   <param>
     <name>Sample Rate</name>
     <key>srate</key>
@@ -186,7 +210,7 @@ $(gui_hint()($win))</make>
     <key>nconnections</key>
     <value>1</value>
     <type>int</type>
-    <hide>part</hide>
+    <hide>#if $type.t == 'message' then 'all' else 'part'#</hide>
   </param>
 
   <param>
@@ -202,7 +226,7 @@ $(gui_hint()($win))</make>
     <key>entags</key>
     <value>True</value>
     <type>enum</type>
-    <hide>part</hide>
+    <hide>#if $type.t == 'message' then 'all' else 'part'#</hide>
     <option>
       <name>Yes</name>
       <key>True</key>
@@ -891,14 +915,8 @@ $(gui_hint()($win))</make>
 
   <sink>
     <name>in</name>
-    <type>$type</type>
-    <nports>$nconnections</nports>
-    <optional>1</optional>
-  </sink>
-
-  <sink>
-    <name>pdus</name>
-    <type>message</type>
+    <type>$type.t</type>
+    <nports>#if $type.t == 'message' then '0' else '$nconnections'#</nports>
     <optional>1</optional>
   </sink>
 
diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml 
b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
index 128172b..33a8ca5 100644
--- a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
@@ -18,7 +18,7 @@ qtgui.$(type.fcn)(
        $fc, \#fc
        $bw, \#bw
        $name, \#name
-        $nconnections \#number of inputs
+        #if $type.t == 'message' then 0 else $nconnections# \#number of inputs
 )
 self.$(id).set_update_time($update_time)
 self.$(id).enable_grid($grid)
@@ -26,7 +26,7 @@ self.$(id).enable_grid($grid)
 if not $legend:
   self.$(id).disable_legend()
 
-if $type == type(float()):
+if "$type" == "float" or "$type" == "msg_float":
   self.$(id).set_plot_pos_half(not $freqhalf)
 
 labels = [$label1, $label2, $label3, $label4, $label5,
@@ -35,7 +35,7 @@ colors = [$color1, $color2, $color3, $color4, $color5,
           $color6, $color7, $color8, $color9, $color10]
 alphas = [$alpha1, $alpha2, $alpha3, $alpha4, $alpha5,
           $alpha6, $alpha7, $alpha8, $alpha9, $alpha10]
-for i in xrange($nconnections):
+for i in xrange(#if $type.t == 'message' then 1 else $nconnections#):
     if len(labels[i]) == 0:
         self.$(id).set_line_label(i, "Data {0}".format(i))
     else:
@@ -63,8 +63,30 @@ $(gui_hint()($win))</make>
     <key>type</key>
     <value>complex</value>
     <type>enum</type>
-    
<option><name>Complex</name><key>complex</key><opt>fcn:waterfall_sink_c</opt></option>
-    
<option><name>Float</name><key>float</key><opt>fcn:waterfall_sink_f</opt></option>
+    <option>
+      <name>Complex</name>
+      <key>complex</key>
+      <opt>fcn:waterfall_sink_c</opt>
+      <opt>t:complex</opt>
+    </option>
+    <option>
+      <name>Float</name>
+      <key>float</key>
+      <opt>fcn:waterfall_sink_f</opt>
+      <opt>t:float</opt>
+    </option>
+    <option>
+      <name>Complex Message</name>
+      <key>msg_complex</key>
+      <opt>fcn:waterfall_sink_c</opt>
+      <opt>t:message</opt>
+    </option>
+    <option>
+      <name>Float Message</name>
+      <key>msg_float</key>
+      <opt>fcn:waterfall_sink_f</opt>
+      <opt>t:message</opt>
+    </option>
   </param>
 
   <param>
@@ -80,6 +102,7 @@ $(gui_hint()($win))</make>
     <key>fftsize</key>
     <value>1024</value>
     <type>int</type>
+    <hide>#if $type.t == 'message' then 'all' else 'none'#</hide>
   </param>
 
   <param>
@@ -87,7 +110,7 @@ $(gui_hint()($win))</make>
     <key>freqhalf</key>
     <value>True</value>
     <type>enum</type>
-    <hide>#if $type() == "float" then 'part' else 'all'#</hide>
+    <hide>#if $type() == "float" or $type() == "msg_float" then 'part' else 
'all'#</hide>
     <option>
       <name>Full</name>
       <key>True</key>
@@ -185,7 +208,7 @@ $(gui_hint()($win))</make>
     <key>nconnections</key>
     <value>1</value>
     <type>int</type>
-    <hide>part</hide>
+    <hide>#if $type.t == 'message' then 'all' else 'part'#</hide>
   </param>
 
   <param>
@@ -195,6 +218,7 @@ $(gui_hint()($win))</make>
     <type>real</type>
     <hide>part</hide>
   </param>
+
   <param>
     <name>GUI Hint</name>
     <key>gui_hint</key>
@@ -488,14 +512,8 @@ $(gui_hint()($win))</make>
 
   <sink>
     <name>in</name>
-    <type>$type</type>
-    <nports>$nconnections</nports>
-    <optional>1</optional>
-  </sink>
-
-  <sink>
-    <name>pdus</name>
-    <type>message</type>
+    <type>$type.t</type>
+    <nports>#if $type.t == 'message' then '0' else '$nconnections'#</nports>
     <optional>1</optional>
   </sink>
 
diff --git a/gr-qtgui/include/gnuradio/qtgui/HistogramDisplayPlot.h 
b/gr-qtgui/include/gnuradio/qtgui/HistogramDisplayPlot.h
index d91f30d..c7d1b3b 100644
--- a/gr-qtgui/include/gnuradio/qtgui/HistogramDisplayPlot.h
+++ b/gr-qtgui/include/gnuradio/qtgui/HistogramDisplayPlot.h
@@ -51,6 +51,7 @@ public slots:
   void setSemilogx(bool en);
   void setSemilogy(bool en);
   void setAccumulate(bool en);
+  bool getAccumulate() const;
 
   void setMarkerAlpha(int which, int alpha);
   int getMarkerAlpha(int which) const;
diff --git a/gr-qtgui/include/gnuradio/qtgui/histogramdisplayform.h 
b/gr-qtgui/include/gnuradio/qtgui/histogramdisplayform.h
index e235f1c..4fd7936 100644
--- a/gr-qtgui/include/gnuradio/qtgui/histogramdisplayform.h
+++ b/gr-qtgui/include/gnuradio/qtgui/histogramdisplayform.h
@@ -58,6 +58,7 @@ public slots:
 
   void setNumBins(const int);
   void setAccumulate(bool en);
+  bool getAccumulate();
   void autoScaleX();
 
 private slots:
diff --git a/gr-qtgui/lib/HistogramDisplayPlot.cc 
b/gr-qtgui/lib/HistogramDisplayPlot.cc
index 9b24295..60d838d 100644
--- a/gr-qtgui/lib/HistogramDisplayPlot.cc
+++ b/gr-qtgui/lib/HistogramDisplayPlot.cc
@@ -384,6 +384,12 @@ HistogramDisplayPlot::setAccumulate(bool state)
   d_accum = state;
 }
 
+bool
+HistogramDisplayPlot::getAccumulate() const
+{
+  return d_accum;
+}
+
 void
 HistogramDisplayPlot::setMarkerAlpha(int which, int alpha)
 {
diff --git a/gr-qtgui/lib/const_sink_c_impl.cc 
b/gr-qtgui/lib/const_sink_c_impl.cc
index d76e742..7ef8db3 100644
--- a/gr-qtgui/lib/const_sink_c_impl.cc
+++ b/gr-qtgui/lib/const_sink_c_impl.cc
@@ -67,8 +67,8 @@ namespace gr {
       d_index = 0;
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&const_sink_c_impl::handle_pdus, this, _1));
 
       for(int i = 0; i < d_nconnections; i++) {
diff --git a/gr-qtgui/lib/freq_sink_c_impl.cc b/gr-qtgui/lib/freq_sink_c_impl.cc
index bef88c4..7dc0b2c 100644
--- a/gr-qtgui/lib/freq_sink_c_impl.cc
+++ b/gr-qtgui/lib/freq_sink_c_impl.cc
@@ -77,8 +77,8 @@ namespace gr {
                       boost::bind(&freq_sink_c_impl::handle_set_freq, this, 
_1));
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&freq_sink_c_impl::handle_pdus, this, _1));
 
       d_main_gui = NULL;
diff --git a/gr-qtgui/lib/freq_sink_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc
index fee8e6b..5418eca 100644
--- a/gr-qtgui/lib/freq_sink_f_impl.cc
+++ b/gr-qtgui/lib/freq_sink_f_impl.cc
@@ -77,8 +77,8 @@ namespace gr {
                       boost::bind(&freq_sink_f_impl::handle_set_freq, this, 
_1));
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&freq_sink_f_impl::handle_pdus, this, _1));
 
       d_main_gui = NULL;
diff --git a/gr-qtgui/lib/histogram_sink_f_impl.cc 
b/gr-qtgui/lib/histogram_sink_f_impl.cc
index 7569c6a..0ac494d 100644
--- a/gr-qtgui/lib/histogram_sink_f_impl.cc
+++ b/gr-qtgui/lib/histogram_sink_f_impl.cc
@@ -70,8 +70,8 @@ namespace gr {
       d_index = 0;
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&histogram_sink_f_impl::handle_pdus, this, 
_1));
 
       // +1 for the PDU buffer
@@ -477,10 +477,12 @@ namespace gr {
         npoints_resize();
 
         // Clear the histogram
-        d_qApplication->postEvent(d_main_gui, new HistogramClearEvent());
+        if(!d_main_gui->getAccumulate()) {
+          d_qApplication->postEvent(d_main_gui, new HistogramClearEvent());
 
-        // Set to accumulate over length of the current PDU
-        d_qApplication->postEvent(d_main_gui, new 
HistogramSetAccumulator(true));
+          // Set to accumulate over length of the current PDU
+          d_qApplication->postEvent(d_main_gui, new 
HistogramSetAccumulator(true));
+        }
 
         float nplots_f = static_cast<float>(len) / static_cast<float>(d_size);
         int nplots = static_cast<int>(ceilf(nplots_f));
@@ -495,8 +497,10 @@ namespace gr {
           idx += size;
         }
 
-        // Turn accumulation off
-        d_qApplication->postEvent(d_main_gui, new 
HistogramSetAccumulator(false));
+        if(!d_main_gui->getAccumulate()) {
+          // Turn accumulation off
+          d_qApplication->postEvent(d_main_gui, new 
HistogramSetAccumulator(false));
+        }
       }
     }
 
diff --git a/gr-qtgui/lib/histogramdisplayform.cc 
b/gr-qtgui/lib/histogramdisplayform.cc
index 7d64760..9cff21f 100644
--- a/gr-qtgui/lib/histogramdisplayform.cc
+++ b/gr-qtgui/lib/histogramdisplayform.cc
@@ -210,3 +210,9 @@ HistogramDisplayForm::setAccumulate(bool en)
   getPlot()->setAccumulate(en);
   getPlot()->replot();
 }
+
+bool
+HistogramDisplayForm::getAccumulate()
+{
+  return getPlot()->getAccumulate();
+}
diff --git a/gr-qtgui/lib/time_raster_sink_b_impl.cc 
b/gr-qtgui/lib/time_raster_sink_b_impl.cc
index cb35eb7..26fed4b 100644
--- a/gr-qtgui/lib/time_raster_sink_b_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_b_impl.cc
@@ -80,8 +80,8 @@ namespace gr {
       d_index = 0;
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&time_raster_sink_b_impl::handle_pdus, this, 
_1));
 
       d_scale = 1.0f;
diff --git a/gr-qtgui/lib/time_raster_sink_f_impl.cc 
b/gr-qtgui/lib/time_raster_sink_f_impl.cc
index df83bad..419d52c 100644
--- a/gr-qtgui/lib/time_raster_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_raster_sink_f_impl.cc
@@ -80,8 +80,8 @@ namespace gr {
       d_index = 0;
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&time_raster_sink_f_impl::handle_pdus, this, 
_1));
 
       d_icols = static_cast<int>(ceil(d_cols));
diff --git a/gr-qtgui/lib/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc
index 45aef41..9f1a04c 100644
--- a/gr-qtgui/lib/time_sink_c_impl.cc
+++ b/gr-qtgui/lib/time_sink_c_impl.cc
@@ -66,8 +66,8 @@ namespace gr {
       d_main_gui = NULL;
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&time_sink_c_impl::handle_pdus, this, _1));
 
       // +2 for the PDU message buffers
diff --git a/gr-qtgui/lib/time_sink_f_impl.cc b/gr-qtgui/lib/time_sink_f_impl.cc
index 10d39ad..e81a9f4 100644
--- a/gr-qtgui/lib/time_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_sink_f_impl.cc
@@ -68,8 +68,8 @@ namespace gr {
       d_main_gui = NULL;
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&time_sink_f_impl::handle_pdus, this, _1));
 
       // +1 for the PDU buffer
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc 
b/gr-qtgui/lib/waterfall_sink_c_impl.cc
index 60464f5..694ef4d 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -112,8 +112,8 @@ namespace gr {
                       boost::bind(&waterfall_sink_c_impl::handle_set_freq, 
this, _1));
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&waterfall_sink_c_impl::handle_pdus, this, 
_1));
     }
 
diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.cc 
b/gr-qtgui/lib/waterfall_sink_f_impl.cc
index 662c31f..56c2061 100644
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
@@ -112,8 +112,8 @@ namespace gr {
                       boost::bind(&waterfall_sink_f_impl::handle_set_freq, 
this, _1));
 
       // setup PDU handling input port
-      message_port_register_in(pmt::mp("pdus"));
-      set_msg_handler(pmt::mp("pdus"),
+      message_port_register_in(pmt::mp("in"));
+      set_msg_handler(pmt::mp("in"),
                       boost::bind(&waterfall_sink_f_impl::handle_pdus, this, 
_1));
     }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]