[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 12/25: grc: add warning for block flagged d
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 12/25: grc: add warning for block flagged deprecated |
Date: |
Fri, 27 May 2016 19:14:58 +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 4be2523ecc678365c52701a37a1b13c285bef0ba
Author: Sebastian Koslowski <address@hidden>
Date: Mon Apr 25 21:59:55 2016 +0200
grc: add warning for block flagged deprecated
---
gr-digital/grc/blks2_packet_decoder.xml | 1 +
gr-digital/grc/blks2_packet_encoder.xml | 1 +
grc/core/Block.py | 5 +++++
grc/core/Constants.py | 1 +
grc/core/generator/Generator.py | 4 ++++
5 files changed, 12 insertions(+)
diff --git a/gr-digital/grc/blks2_packet_decoder.xml
b/gr-digital/grc/blks2_packet_decoder.xml
index c367245..3b66f00 100644
--- a/gr-digital/grc/blks2_packet_decoder.xml
+++ b/gr-digital/grc/blks2_packet_decoder.xml
@@ -8,6 +8,7 @@
<name>Packet Decoder</name>
<key>blks2_packet_decoder</key>
<category>Deprecated</category>
+ <flags>deprecated</flags>
<import>from grc_gnuradio import blks2 as grc_blks2</import>
<make>grc_blks2.packet_demod_$(type.fcn)(grc_blks2.packet_decoder(
access_code=$access_code,
diff --git a/gr-digital/grc/blks2_packet_encoder.xml
b/gr-digital/grc/blks2_packet_encoder.xml
index 92de9c9..75cb5ea 100644
--- a/gr-digital/grc/blks2_packet_encoder.xml
+++ b/gr-digital/grc/blks2_packet_encoder.xml
@@ -8,6 +8,7 @@
<name>Packet Encoder</name>
<key>blks2_packet_encoder</key>
<category>Deprecated</category>
+ <flags>deprecated</flags>
<import>from grc_gnuradio import blks2 as grc_blks2</import>
<make>grc_blks2.packet_mod_$(type.fcn)(grc_blks2.packet_encoder(
samples_per_symbol=$samples_per_symbol,
diff --git a/grc/core/Block.py b/grc/core/Block.py
index ab4174c..f67d990 100644
--- a/grc/core/Block.py
+++ b/grc/core/Block.py
@@ -27,6 +27,7 @@ from . Constants import (
BLOCK_FLAG_NEED_QT_GUI, BLOCK_FLAG_NEED_WX_GUI,
ADVANCED_PARAM_TAB, DEFAULT_PARAM_TAB,
BLOCK_FLAG_THROTTLE, BLOCK_FLAG_DISABLE_BYPASS,
+ BLOCK_FLAG_DEPRECATED,
BLOCK_ENABLED, BLOCK_BYPASSED, BLOCK_DISABLED
)
from . Element import Element
@@ -626,6 +627,10 @@ class Block(Element):
def bypass_disabled(self):
return BLOCK_FLAG_DISABLE_BYPASS in self._flags
+ @property
+ def is_deprecated(self):
+ return BLOCK_FLAG_DEPRECATED in self._flags
+
##############################################
# Access Params
##############################################
diff --git a/grc/core/Constants.py b/grc/core/Constants.py
index 1d1a17e..462049c 100644
--- a/grc/core/Constants.py
+++ b/grc/core/Constants.py
@@ -47,6 +47,7 @@ BLOCK_FLAG_THROTTLE = 'throttle'
BLOCK_FLAG_DISABLE_BYPASS = 'disable_bypass'
BLOCK_FLAG_NEED_QT_GUI = 'need_qt_gui'
BLOCK_FLAG_NEED_WX_GUI = 'need_wx_gui'
+BLOCK_FLAG_DEPRECATED = 'deprecated'
# Block States
BLOCK_DISABLED = 0
diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py
index 641bdea..2fdd850 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -145,6 +145,10 @@ class TopBlockGenerator(object):
filter(lambda b: b.get_enabled() and not b.get_bypassed(),
fg.blocks),
lambda b: b.get_id(), _get_block_sort_text
)
+ deprecated_block_keys = set(block.get_name() for block in blocks if
block.is_deprecated)
+ for key in deprecated_block_keys:
+ Messages.send_warning("The block {!r} is deprecated.".format(key))
+
# List of regular blocks (all blocks minus the special ones)
blocks = filter(lambda b: b not in (imports + parameters), blocks_all)
- [Commit-gnuradio] [gnuradio] branch master updated (681846f -> cc02c4b), git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 01/25: grc: show comments next to rotated blocks (instead of underneath), git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 22/25: Merge branch 'maint', git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 13/25: grc: Renamed reports window to console., git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 11/25: grc: Darker color for bypassed blocks., git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 04/25: grc: optionally hide all variable blocks, git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 21/25: grc: function probe block: relabel and move value param, git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 24/25: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 07/25: grc: remove 'Showing: ...' messages, git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 12/25: grc: add warning for block flagged deprecated,
git <=
- [Commit-gnuradio] [gnuradio] 20/25: grc: faulty callback code if setter call contained a variable block id, git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 14/25: Revert "grc: fix callback evaluation", git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 18/25: modtool: Added version support for OOTs, git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 19/25: grc-refactor: minor clean-up of callback generator code, git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 15/25: grc: fix flow graph execution (amends ActionHandler refactoring), git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 10/25: grc: Variable editor tweaks., git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 25/25: Merge remote-tracking branch 'dkozel/uhd_lo_api', git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 16/25: Added controls for importing, exporting, and sharing LOs, git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 17/25: grc-refactor: fix custom canvas font sizes, git, 2016/05/27
- [Commit-gnuradio] [gnuradio] 08/25: grc: Added the variable editor panel, git, 2016/05/27