Removed receiver_hier and wireshark_sink
parent
6bb450daca
commit
b108d6b7c7
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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 */
|
||||
|
|
@ -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})
|
||||
|
|
|
@ -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 */
|
||||
|
|
@ -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 */
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue