[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/03: gr-blocks: add warnings to deprected
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/03: gr-blocks: add warnings to deprected blks2 blocks |
Date: |
Sun, 23 Oct 2016 20:27:32 +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 99b2e181449c3b4a3c35fb994315f0d120d9411a
Author: Johnathan Corgan <address@hidden>
Date: Sun Oct 23 08:39:48 2016 -0700
gr-blocks: add warnings to deprected blks2 blocks
---
gr-blocks/python/grc_gnuradio/blks2/error_rate.py | 3 +++
gr-blocks/python/grc_gnuradio/blks2/selector.py | 5 +++++
gr-blocks/python/grc_gnuradio/blks2/tcp.py | 4 ++++
gr-digital/python/grc_gnuradio/blks2/packet.py | 4 ++++
4 files changed, 16 insertions(+)
diff --git a/gr-blocks/python/grc_gnuradio/blks2/error_rate.py
b/gr-blocks/python/grc_gnuradio/blks2/error_rate.py
index 9bf3870..df03f55 100644
--- a/gr-blocks/python/grc_gnuradio/blks2/error_rate.py
+++ b/gr-blocks/python/grc_gnuradio/blks2/error_rate.py
@@ -75,6 +75,9 @@ class error_rate(gr.hier_block2):
gr.io_signature(2, 2, gr.sizeof_char),
gr.io_signature(1, 1, gr.sizeof_float),
)
+
+ print "Warning: the blks2.error_rate is deprecated."
+
assert type in ('BER', 'SER')
self._max_samples = win_size
self._bits_per_symbol = bits_per_symbol
diff --git a/gr-blocks/python/grc_gnuradio/blks2/selector.py
b/gr-blocks/python/grc_gnuradio/blks2/selector.py
index 24e3844..0a74309 100644
--- a/gr-blocks/python/grc_gnuradio/blks2/selector.py
+++ b/gr-blocks/python/grc_gnuradio/blks2/selector.py
@@ -40,6 +40,9 @@ class selector(gr.hier_block2):
gr.io_signature(num_inputs, num_inputs, item_size),
gr.io_signature(num_outputs, num_outputs, item_size),
)
+
+ print "Warning: the blks2.selector block is deprecated."
+
#terminator blocks for unused inputs and outputs
self.input_terminators = [blocks.null_sink(item_size) for i in
range(num_inputs)]
self.output_terminators = [blocks.head(item_size, 0) for i in
range(num_outputs)]
@@ -130,6 +133,8 @@ class valve(selector):
else: output_index = 0
selector.__init__(self, item_size, 1, 1, 0, output_index)
+ print "Warning: the blks2.valve block is deprecated."
+
def set_open(self, open):
"""
Callback to set open state.
diff --git a/gr-blocks/python/grc_gnuradio/blks2/tcp.py
b/gr-blocks/python/grc_gnuradio/blks2/tcp.py
index aee90fa..6ae24d3 100644
--- a/gr-blocks/python/grc_gnuradio/blks2/tcp.py
+++ b/gr-blocks/python/grc_gnuradio/blks2/tcp.py
@@ -58,6 +58,8 @@ class tcp_source(gr.hier_block2):
fd = _get_sock_fd(addr, port, server)
self.connect(blocks.file_descriptor_source(itemsize, fd), self)
+ print "Warning: the blks2.tcp_source block is deprecated."
+
class tcp_sink(gr.hier_block2):
def __init__(self, itemsize, addr, port, server=False):
#init hier block
@@ -68,3 +70,5 @@ class tcp_sink(gr.hier_block2):
)
fd = _get_sock_fd(addr, port, server)
self.connect(self, blocks.file_descriptor_sink(itemsize, fd))
+
+ print "Warning: the blks2.tcp_sink block is deprecated."
diff --git a/gr-digital/python/grc_gnuradio/blks2/packet.py
b/gr-digital/python/grc_gnuradio/blks2/packet.py
index ef79afd..dc06544 100644
--- a/gr-digital/python/grc_gnuradio/blks2/packet.py
+++ b/gr-digital/python/grc_gnuradio/blks2/packet.py
@@ -107,6 +107,8 @@ class packet_encoder(gr.hier_block2):
#connect
self.connect(msg_source, self)
+ print "Warning: the blks2.packet_encoder block is deprecated."
+
def send_pkt(self, payload):
"""
Wrap the payload in a packet and push onto the message queue.
@@ -184,6 +186,8 @@ class packet_decoder(gr.hier_block2):
#start thread
_packet_decoder_thread(msgq, callback)
+ print "Warning: the blks2.packet_decoder block is deprecated."
+
##################################################
## Packet Mod for OFDM Mod and Packet Encoder
##################################################