From fabeb9c16b04347a58c927e30e3427d92480dcab Mon Sep 17 00:00:00 2001 From: csrichter Date: Fri, 28 Apr 2017 14:25:27 +0200 Subject: [PATCH] removed multirds printer --- grc/CMakeLists.txt | 1 - grc/multirds_multi_rds_printer.xml | 38 ---------------- python/CMakeLists.txt | 1 - python/__init__.py | 2 +- python/multi_rds_printer.py | 69 ------------------------------ 5 files changed, 1 insertion(+), 110 deletions(-) delete mode 100644 grc/multirds_multi_rds_printer.xml delete mode 100644 python/multi_rds_printer.py diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index 490f95a..f931f0a 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -17,7 +17,6 @@ # the Free Software Foundation, Inc., 51 Franklin Street, # Boston, MA 02110-1301, USA. install(FILES - multirds_multi_rds_printer.xml multirds_rds_table_qt.xml multirds_rds_parser_table_qt.xml multirds_rds_decoder.xml diff --git a/grc/multirds_multi_rds_printer.xml b/grc/multirds_multi_rds_printer.xml deleted file mode 100644 index 50b017e..0000000 --- a/grc/multirds_multi_rds_printer.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - Multi RDS Printer - multirds_multi_rds_printer - [multirds] - import multirds - multirds.multi_rds_printer($print_freq,$nPorts) - - - Print Frequency - print_freq - 10 - int - - - - - Number of Ports - nPorts - 2 - int - part - - - in - message - $nPorts - - - diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index e5fbe87..ff8abf4 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -31,7 +31,6 @@ endif() GR_PYTHON_INSTALL( FILES __init__.py - multi_rds_printer.py rds_table_qt.py rds_parser_table_qt.py max_freq.py diff --git a/python/__init__.py b/python/__init__.py index f571609..5c1ba78 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -31,7 +31,7 @@ except ImportError: pass # import any pure python here -from multi_rds_printer import multi_rds_printer + from rds_table_qt import rds_table_qt from rds_parser_table_qt import rds_parser_table_qt diff --git a/python/multi_rds_printer.py b/python/multi_rds_printer.py deleted file mode 100644 index 623c232..0000000 --- a/python/multi_rds_printer.py +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# Copyright 2016 <+YOU OR YOUR COMPANY+>. -# -# This is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# This software is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this software; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -import numpy,pmt,functools -from gnuradio import gr - -class multi_rds_printer(gr.sync_block): - """ - docstring for block multi_rds_printer - """ - def __init__(self, print_freq,nPorts): - gr.sync_block.__init__(self, - name="multi_rds_printer", - in_sig=None, - out_sig=None) - self.PS="station name" - self.RT="radio text" - self.PI="C0FE" - self.stations = {} - self.print_freq = print_freq - self.print_count=print_freq - for i in range(0,nPorts): - self.message_port_register_in(pmt.intern('in%d'%i)) - self.set_msg_handler(pmt.intern('in%d'%i), functools.partial(self.handle_msg, port=i)) - def handle_msg(self, msg, port): - t = pmt.to_long(pmt.tuple_ref(msg, 0)) - m = pmt.symbol_to_string(pmt.tuple_ref(msg, 1)) - #code.interact(local=locals()) - if(t==0): - self.PI=m - self.stations[str(port)+"PI"]=m - elif(t==1): - self.PS=m - self.stations[str(port)+"PS"]=m - elif(t==4): - self.RT=m - self.stations[str(port)+"RT"]=m - self.print_count -= 1 - #print(self.stations) - if (self.print_count==0): - self.print_count=self.print_freq - print("########## stations ###########") - for key in sorted(self.stations): - print("%s: %s" % (key, self.stations[key])) -# def work(self, input_items, output_items): -# in0 = input_items[0] -# out = output_items[0] -# # <+signal processing here+> -# out[:] = in0 -# return len(output_items[0]) -