diff options
author | ptrkrysik <ptrkrysik@gmail.com> | 2014-11-06 13:51:02 +0100 |
---|---|---|
committer | ptrkrysik <ptrkrysik@gmail.com> | 2014-11-06 13:51:02 +0100 |
commit | b108d6b7c7fb46df87bf39c541841f25f10c6427 (patch) | |
tree | e84eda1f33c4beef2da8917fed51e8a7cf8b605d | |
parent | 6bb450daca4d59267395c4a05a32fbbfdfdac59e (diff) |
Removed receiver_hier and wireshark_sink
-rw-r--r-- | grc/CMakeLists.txt | 2 | ||||
-rw-r--r-- | grc/misc_utils/gsm_wireshark_sink.xml | 13 | ||||
-rw-r--r-- | grc/receiver/gsm_receiver_hier.xml | 44 | ||||
-rw-r--r-- | include/gsm/misc_utils/CMakeLists.txt | 1 | ||||
-rw-r--r-- | include/gsm/misc_utils/wireshark_sink.h | 56 | ||||
-rw-r--r-- | lib/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/misc_utils/wireshark_sink_impl.cc | 76 | ||||
-rw-r--r-- | lib/misc_utils/wireshark_sink_impl.h | 43 | ||||
-rw-r--r-- | python/CMakeLists.txt | 1 | ||||
-rw-r--r-- | python/__init__.py | 1 | ||||
-rw-r--r-- | python/receiver/receiver_hier.py | 63 | ||||
-rw-r--r-- | swig/gsm_swig.i | 3 |
12 files changed, 0 insertions, 304 deletions
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt index 25c14cf..fc24e58 100644 --- a/grc/CMakeLists.txt +++ b/grc/CMakeLists.txt @@ -18,7 +18,6 @@ # Boston, MA 02110-1301, USA. install(FILES receiver/gsm_receiver.xml - receiver/gsm_receiver_hier.xml misc_utils/gsm_bursts_printer.xml receiver/gsm_fcch_burst_tagger.xml receiver/gsm_sch_detector.xml @@ -30,6 +29,5 @@ install(FILES misc_utils/gsm_controlled_const_source_f.xml receiver/gsm_clock_offset_control.xml misc_utils/gsm_message_printer.xml - misc_utils/gsm_wireshark_sink.xml misc_utils/gsm_clock_offset_corrector.xml DESTINATION share/gnuradio/grc/blocks ) diff --git a/grc/misc_utils/gsm_wireshark_sink.xml b/grc/misc_utils/gsm_wireshark_sink.xml deleted file mode 100644 index d559bac..0000000 --- a/grc/misc_utils/gsm_wireshark_sink.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>wireshark_sink</name> - <key>gsm_wireshark_sink</key> - <category>GSM</category> - <import>import gsm</import> - <make>gsm.wireshark_sink()</make> - - <sink> - <name>msgs</name> - <type>message</type> - </sink> -</block> diff --git a/grc/receiver/gsm_receiver_hier.xml b/grc/receiver/gsm_receiver_hier.xml deleted file mode 100644 index b41eb99..0000000 --- a/grc/receiver/gsm_receiver_hier.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>GSM Receiver hier</name> - <key>gsm_receiver_hier</key> - <category>GSM</category> - <import>import gsm</import> - <make>gsm.receiver_hier($input_rate, $osr, $arfcn)</make> - <param> - <name>Input rate</name> - <key>input_rate</key> - <value>samp_rate</value> - <type>real</type> - </param> - - <param> - <name>Oversampling ratio</name> - <key>osr</key> - <value>4</value> - <type>int</type> - </param> - - <param> - <name>ARFCN</name> - <key>arfcn</key> - <value>0</value> - <type>int</type> - </param> - - <sink> - <name>in</name> - <type>complex</type> - </sink> - <source> - <name>bursts</name> - <type>message</type> - <optional>1</optional> - </source> - - <source> - <name>measurements</name> - <type>message</type> - <optional>1</optional> - </source> -</block> diff --git a/include/gsm/misc_utils/CMakeLists.txt b/include/gsm/misc_utils/CMakeLists.txt index 2dc960c..da5db22 100644 --- a/include/gsm/misc_utils/CMakeLists.txt +++ b/include/gsm/misc_utils/CMakeLists.txt @@ -25,6 +25,5 @@ install(FILES extract_system_info.h controlled_rotator_cc.h controlled_const_source_f.h - wireshark_sink.h message_printer.h DESTINATION include/gsm/misc_utils ) diff --git a/include/gsm/misc_utils/wireshark_sink.h b/include/gsm/misc_utils/wireshark_sink.h deleted file mode 100644 index 1c05310..0000000 --- a/include/gsm/misc_utils/wireshark_sink.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2014 <+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. - */ - - -#ifndef INCLUDED_GSM_WIRESHARK_SINK_H -#define INCLUDED_GSM_WIRESHARK_SINK_H - -#include <gsm/api.h> -#include <gnuradio/sync_block.h> - -namespace gr { - namespace gsm { - - /*! - * \brief <+description of block+> - * \ingroup gsm - * - */ - class GSM_API wireshark_sink : virtual public gr::block - { - public: - typedef boost::shared_ptr<wireshark_sink> sptr; - - /*! - * \brief Return a shared_ptr to a new instance of gsm::wireshark_sink. - * - * To avoid accidental use of raw pointers, gsm::wireshark_sink's - * constructor is in a private implementation - * class. gsm::wireshark_sink::make is the public interface for - * creating new instances. - */ - static sptr make(); - }; - - } // namespace gsm -} // namespace gr - -#endif /* INCLUDED_GSM_WIRESHARK_SINK_H */ - diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 867dfdc..e4ed842 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -38,7 +38,6 @@ list(APPEND gsm_sources misc_utils/controlled_rotator_cc_impl.cc misc_utils/controlled_const_source_f_impl.cc misc_utils/message_printer_impl.cc - misc_utils/wireshark_sink_impl.cc ) add_library(gnuradio-gsm SHARED ${gsm_sources}) diff --git a/lib/misc_utils/wireshark_sink_impl.cc b/lib/misc_utils/wireshark_sink_impl.cc deleted file mode 100644 index 90cb9c2..0000000 --- a/lib/misc_utils/wireshark_sink_impl.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2014 <+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. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <gnuradio/io_signature.h> -#include "wireshark_sink_impl.h" -#include "gsm/gsmtap.h" - -namespace gr { - namespace gsm { - - void wireshark_sink_impl::send_to_wireshark(pmt::pmt_t msg) - { - - pmt::pmt_t header_blob = pmt::car(msg); - gsmtap_hdr * header = (gsmtap_hdr *)pmt::blob_data(header_blob); //GSMTAP header - - pmt::pmt_t message = pmt::cdr(msg); - uint8_t * message_elements = (uint8_t *)pmt::blob_data(message); - size_t message_len=pmt::blob_length(message); //message content - - //place for implementation of sending gsm messages to wireshark - } - - - wireshark_sink::sptr - wireshark_sink::make() - { - return gnuradio::get_initial_sptr - (new wireshark_sink_impl()); - } - - /* - * The private constructor - */ - wireshark_sink_impl::wireshark_sink_impl() - : gr::block("wireshark_sink", - gr::io_signature::make(0, 0, 0), - gr::io_signature::make(0, 0, 0)) - { - message_port_register_in(pmt::mp("msgs")); - set_msg_handler(pmt::mp("msgs"), boost::bind(&wireshark_sink_impl::send_to_wireshark, this, _1)); - } - - - /* - * Our virtual destructor. - */ - wireshark_sink_impl::~wireshark_sink_impl() - { - } - - - } /* namespace gsm */ -} /* namespace gr */ - diff --git a/lib/misc_utils/wireshark_sink_impl.h b/lib/misc_utils/wireshark_sink_impl.h deleted file mode 100644 index 8069255..0000000 --- a/lib/misc_utils/wireshark_sink_impl.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright 2014 <+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. - */ - -#ifndef INCLUDED_GSM_WIRESHARK_SINK_IMPL_H -#define INCLUDED_GSM_WIRESHARK_SINK_IMPL_H - -#include <gsm/misc_utils/wireshark_sink.h> - -namespace gr { - namespace gsm { - - class wireshark_sink_impl : public wireshark_sink - { - private: - void send_to_wireshark(pmt::pmt_t msg); - - public: - wireshark_sink_impl(); - ~wireshark_sink_impl(); - - }; // namespace gsm - } -} // namespace gr - -#endif /* INCLUDED_GSM_WIRESHARK_SINK_IMPL_H */ - diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 9814406..68a6aa4 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -31,7 +31,6 @@ endif() GR_PYTHON_INSTALL( FILES __init__.py - receiver/receiver_hier.py receiver/fcch_burst_tagger.py receiver/sch_detector.py receiver/fcch_detector.py diff --git a/python/__init__.py b/python/__init__.py index 7b96cf3..3b10c19 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -45,7 +45,6 @@ if _RTLD_GLOBAL != 0: from gsm_swig import * # import any pure python here -from receiver_hier import receiver_hier from fcch_burst_tagger import fcch_burst_tagger from sch_detector import sch_detector diff --git a/python/receiver/receiver_hier.py b/python/receiver/receiver_hier.py deleted file mode 100644 index aa8fda3..0000000 --- a/python/receiver/receiver_hier.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python - -import weakref -import gsm -from gnuradio.eng_option import eng_option -from gnuradio import gr, gru, blocks -from gnuradio import filter - -class receiver_hier(gr.hier_block2): - def __init__(self, input_rate, osr=4, arfcn=0): - gr.hier_block2.__init__(self, - "receiver_hier", - gr.io_signature(1, 1, gr.sizeof_gr_complex), - gr.io_signature(1, 1, 142*gr.sizeof_float)) - #set rates - gsm_symb_rate = 1625000/6.0 - - self.message_port_register_hier_in("bursts") - self.message_port_register_hier_in("measurements") - - self.input_rate = input_rate - self.osr = osr - self.arfcn = arfcn - self.sps = input_rate / (gsm_symb_rate * osr) - - #create accompaning blocks - self.filtr = self._set_filter() - self.interpolator = self._set_interpolator() - self.receiver = self._set_receiver() - self.connect(self, self.filtr, self.interpolator, self.receiver, self) -# self.connect(self, self.interpolator, self.receiver, self) - self.msg_connect(self.receiver, "bursts", weakref.proxy(self), "bursts") - self.msg_connect(self.receiver, "measurements", weakref.proxy(self), "measurements") - - def _set_filter(self): - filter_cutoff = 125e3 - filter_t_width = 10e3 - offset = 0 - - filter_taps = filter.firdes.low_pass(1.0, self.input_rate, filter_cutoff, filter_t_width, filter.firdes.WIN_HAMMING) - filtr = filter.freq_xlating_fir_filter_ccf(1, filter_taps, offset, self.input_rate) - return filtr - - def _set_interpolator(self): - interpolator = filter.fractional_resampler_cc(0, self.sps) - return interpolator - - def _set_receiver(self): - receiver = gsm.receiver(self.osr, self.arfcn) - return receiver - - def set_center_frequency(self, center_freq): - self.filtr.set_center_freq(center_freq) - - def set_timing(self, timing_offset): - pass - - def set_arfcn(self,arfcn): - self.receiver.set_arfcn(arfcn) - - def reset(self): - self.receiver.reset() - diff --git a/swig/gsm_swig.i b/swig/gsm_swig.i index 939c7f2..41acaf6 100644 --- a/swig/gsm_swig.i +++ b/swig/gsm_swig.i @@ -16,7 +16,6 @@ #include "gsm/misc_utils/controlled_rotator_cc.h" #include "gsm/misc_utils/extract_system_info.h" #include "gsm/misc_utils/message_printer.h" -#include "gsm/misc_utils/wireshark_sink.h" %} @@ -39,5 +38,3 @@ GR_SWIG_BLOCK_MAGIC2(gsm, controlled_rotator_cc); GR_SWIG_BLOCK_MAGIC2(gsm, controlled_const_source_f); %include "gsm/misc_utils/message_printer.h" GR_SWIG_BLOCK_MAGIC2(gsm, message_printer); -%include "gsm/misc_utils/wireshark_sink.h" -GR_SWIG_BLOCK_MAGIC2(gsm, wireshark_sink); |