aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--grc/gsm_block_tree.xml1
-rw-r--r--grc/receiver/CMakeLists.txt1
-rw-r--r--grc/receiver/gsm_cx_channel_hopper.xml34
-rw-r--r--include/grgsm/receiver/CMakeLists.txt1
-rw-r--r--include/grgsm/receiver/cx_channel_hopper.h58
-rw-r--r--lib/CMakeLists.txt4
-rw-r--r--lib/receiver/cx_channel_hopper_impl.cc65
-rw-r--r--lib/receiver/cx_channel_hopper_impl.h47
-rw-r--r--swig/grgsm_swig.i5
9 files changed, 212 insertions, 4 deletions
diff --git a/grc/gsm_block_tree.xml b/grc/gsm_block_tree.xml
index 87bae67..3952fff 100644
--- a/grc/gsm_block_tree.xml
+++ b/grc/gsm_block_tree.xml
@@ -13,6 +13,7 @@
<cat>
<name>Receiver</name>
<block>gsm_receiver</block>
+ <block>gsm_cx_channel_hopper</block>
<block>gsm_fcch_burst_tagger</block>
<block>gsm_sch_detector</block>
<block>gsm_fcch_detector</block>
diff --git a/grc/receiver/CMakeLists.txt b/grc/receiver/CMakeLists.txt
index 25f08cc..bcef03d 100644
--- a/grc/receiver/CMakeLists.txt
+++ b/grc/receiver/CMakeLists.txt
@@ -23,5 +23,6 @@ install(FILES
gsm_fcch_burst_tagger.xml
gsm_sch_detector.xml
gsm_fcch_detector.xml
+ gsm_cx_channel_hopper.xml
gsm_clock_offset_control.xml DESTINATION share/gnuradio/grc/blocks
)
diff --git a/grc/receiver/gsm_cx_channel_hopper.xml b/grc/receiver/gsm_cx_channel_hopper.xml
new file mode 100644
index 0000000..77936f1
--- /dev/null
+++ b/grc/receiver/gsm_cx_channel_hopper.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<block>
+ <name>CX channel hopper</name>
+ <key>gsm_cx_channel_hopper</key>
+ <import>import grgsm</import>
+ <make>grgsm.cx_channel_hopper($ma, $maio, $hsn)</make>
+ <param>
+ <name>MA</name>
+ <key>ma</key>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>MAIO</name>
+ <key>maio</key>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>HSN</name>
+ <key>hsn</key>
+ <type>int</type>
+ </param>
+
+ <sink>
+ <name>CX</name>
+ <type>message</type>
+ </sink>
+
+ <source>
+ <name>bursts</name>
+ <type>message</type>
+ </source>
+</block>
diff --git a/include/grgsm/receiver/CMakeLists.txt b/include/grgsm/receiver/CMakeLists.txt
index 99ebf4f..bb4515d 100644
--- a/include/grgsm/receiver/CMakeLists.txt
+++ b/include/grgsm/receiver/CMakeLists.txt
@@ -22,5 +22,6 @@
########################################################################
install(FILES
clock_offset_control.h
+ cx_channel_hopper.h
receiver.h DESTINATION include/grgsm/receiver
)
diff --git a/include/grgsm/receiver/cx_channel_hopper.h b/include/grgsm/receiver/cx_channel_hopper.h
new file mode 100644
index 0000000..7c0750c
--- /dev/null
+++ b/include/grgsm/receiver/cx_channel_hopper.h
@@ -0,0 +1,58 @@
+/* -*- c++ -*- */
+/* @file
+ * @author Piotr Krysik <ptrkrysik@gmail.com>
+ * @section LICENSE
+ *
+ * Gr-gsm 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.
+ *
+ * Gr-gsm 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 gr-gsm; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+#ifndef INCLUDED_GSM_CX_CHANNEL_HOPPER_H
+#define INCLUDED_GSM_CX_CHANNEL_HOPPER_H
+
+#include <grgsm/api.h>
+#include <gnuradio/block.h>
+
+namespace gr {
+ namespace gsm {
+
+ /*!
+ * \brief <+description of block+>
+ * \ingroup gsm
+ *
+ */
+ class GSM_API cx_channel_hopper : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<cx_channel_hopper> sptr;
+
+ /*!
+ * \brief Return a shared_ptr to a new instance of gsm::cx_channel_hopper.
+ *
+ * To avoid accidental use of raw pointers, gsm::cx_channel_hopper's
+ * constructor is in a private implementation
+ * class. gsm::cx_channel_hopper::make is the public interface for
+ * creating new instances.
+ */
+ static sptr make(int ma, int maio, int hsn);
+ };
+
+ } // namespace gsm
+} // namespace gr
+
+#endif /* INCLUDED_GSM_CX_CHANNEL_HOPPER_H */
+
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 6dc30a3..2c18d6c 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -30,6 +30,7 @@ list(APPEND grgsm_sources
receiver/viterbi_detector.cc
receiver/sch.c
receiver/clock_offset_control_impl.cc
+ receiver/cx_channel_hopper_impl.cc
misc_utils/bursts_printer_impl.cc
misc_utils/extract_system_info_impl.cc
demapping/universal_ctrl_chans_demapper_impl.cc
@@ -48,8 +49,7 @@ list(APPEND grgsm_sources
misc_utils/tmsi_dumper_impl.cc
misc_utils/burst_sink_impl.cc
misc_utils/burst_source_impl.cc
- decryption/decryption_impl.cc
- )
+ decryption/decryption_impl.cc )
add_library(gnuradio-gsm SHARED ${grgsm_sources})
target_link_libraries(gnuradio-gsm ${Boost_LIBRARIES} ${GNURADIO_RUNTIME_LIBRARIES} ${VOLK_LIBRARIES}
diff --git a/lib/receiver/cx_channel_hopper_impl.cc b/lib/receiver/cx_channel_hopper_impl.cc
new file mode 100644
index 0000000..10371ab
--- /dev/null
+++ b/lib/receiver/cx_channel_hopper_impl.cc
@@ -0,0 +1,65 @@
+/* -*- c++ -*- */
+/* @file
+ * @author Piotr Krysik <ptrkrysik@gmail.com>
+ * @section LICENSE
+ *
+ * Gr-gsm 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.
+ *
+ * Gr-gsm 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 gr-gsm; 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 "cx_channel_hopper_impl.h"
+
+namespace gr {
+ namespace gsm {
+
+ cx_channel_hopper::sptr
+ cx_channel_hopper::make(int ma, int maio, int hsn)
+ {
+ return gnuradio::get_initial_sptr
+ (new cx_channel_hopper_impl(ma, maio, hsn));
+ }
+
+ /*
+ * The private constructor
+ */
+ cx_channel_hopper_impl::cx_channel_hopper_impl(int ma, int maio, int hsn)
+ : gr::block("cx_channel_hopper",
+ gr::io_signature::make(0, 0, 0),
+ gr::io_signature::make(0, 0, 0))
+ {
+ d_ma = ma;
+ d_maio = maio;
+ d_hsn = hsn;
+
+ message_port_register_in(pmt::mp("CX"));
+ message_port_register_out(pmt::mp("bursts"));
+ }
+
+ /*
+ * Our virtual destructor.
+ */
+ cx_channel_hopper_impl::~cx_channel_hopper_impl()
+ {
+ }
+
+ } /* namespace gsm */
+} /* namespace gr */
+
diff --git a/lib/receiver/cx_channel_hopper_impl.h b/lib/receiver/cx_channel_hopper_impl.h
new file mode 100644
index 0000000..439c7bd
--- /dev/null
+++ b/lib/receiver/cx_channel_hopper_impl.h
@@ -0,0 +1,47 @@
+/* -*- c++ -*- */
+/* @file
+ * @author Piotr Krysik <ptrkrysik@gmail.com>
+ * @section LICENSE
+ *
+ * Gr-gsm 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.
+ *
+ * Gr-gsm 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 gr-gsm; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef INCLUDED_GSM_CX_CHANNEL_HOPPER_IMPL_H
+#define INCLUDED_GSM_CX_CHANNEL_HOPPER_IMPL_H
+
+#include <grgsm/receiver/cx_channel_hopper.h>
+
+namespace gr {
+ namespace gsm {
+
+ class cx_channel_hopper_impl : public cx_channel_hopper
+ {
+ private:
+ int d_ma;
+ int d_maio;
+ int d_hsn;
+
+ public:
+ cx_channel_hopper_impl(int ma, int maio, int hsn);
+ ~cx_channel_hopper_impl();
+ };
+
+ } // namespace gsm
+} // namespace gr
+
+#endif /* INCLUDED_GSM_CX_CHANNEL_HOPPER_IMPL_H */
+
diff --git a/swig/grgsm_swig.i b/swig/grgsm_swig.i
index 8c54e18..f1f37bf 100644
--- a/swig/grgsm_swig.i
+++ b/swig/grgsm_swig.i
@@ -10,6 +10,7 @@
%{
#include "grgsm/receiver/receiver.h"
#include "grgsm/receiver/clock_offset_control.h"
+#include "grgsm/receiver/cx_channel_hopper.h"
#include "grgsm/decoding/control_channels_decoder.h"
#include "grgsm/decoding/tch_f_decoder.h"
#include "grgsm/decryption/decryption.h"
@@ -30,7 +31,8 @@
GR_SWIG_BLOCK_MAGIC2(gsm, receiver);
%include "grgsm/receiver/clock_offset_control.h"
GR_SWIG_BLOCK_MAGIC2(gsm, clock_offset_control);
-
+%include "grgsm/receiver/cx_channel_hopper.h"
+GR_SWIG_BLOCK_MAGIC2(gsm, cx_channel_hopper);
%include "grgsm/decoding/control_channels_decoder.h"
GR_SWIG_BLOCK_MAGIC2(gsm, control_channels_decoder);
@@ -61,4 +63,3 @@ GR_SWIG_BLOCK_MAGIC2(gsm, controlled_const_source_f);
GR_SWIG_BLOCK_MAGIC2(gsm, message_printer);
%include "grgsm/misc_utils/tmsi_dumper.h"
GR_SWIG_BLOCK_MAGIC2(gsm, tmsi_dumper);
-