aboutsummaryrefslogtreecommitdiffstats
path: root/include/grgsm
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-06-16 21:00:29 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-07-07 22:12:52 +0700
commit89fc14ba44723cfbd88c2499ec8ab96ad993c5c4 (patch)
treebadecbb881fde1247b3f730f6dd47c3fccee5137 /include/grgsm
parent8f121c1e7c3e052ffcb63904f56de4eec7741dc2 (diff)
Implement transceiver interface
This change introduces a new block 'TRX Interface', which is aimed to provide an interface for external applications, such as Osmocom MS side stack implementation - OsmocomBB. Currently one allows to exchange raw GSM bursts between GR-GSM and other applications. Moreover, there is a new 'trx.py' application, which implements a simple follow graph, where all demodulated bursts are being sent to external application via UDP link provided by 'TRX Interface'. OsmoTRX (Osmocom's fork of OpenBTS transceiver) like control interface is used to initialize, configure, start and stop the application. Messages on this interface are human readable ASCII strings, which contain a command and some related parameters.
Diffstat (limited to 'include/grgsm')
-rw-r--r--include/grgsm/CMakeLists.txt1
-rw-r--r--include/grgsm/trx_interface/CMakeLists.txt25
-rw-r--r--include/grgsm/trx_interface/trx.h59
3 files changed, 85 insertions, 0 deletions
diff --git a/include/grgsm/CMakeLists.txt b/include/grgsm/CMakeLists.txt
index dc9b191..beca954 100644
--- a/include/grgsm/CMakeLists.txt
+++ b/include/grgsm/CMakeLists.txt
@@ -33,3 +33,4 @@ add_subdirectory(receiver)
add_subdirectory(misc_utils)
add_subdirectory(qa_utils)
add_subdirectory(flow_control)
+add_subdirectory(trx_interface)
diff --git a/include/grgsm/trx_interface/CMakeLists.txt b/include/grgsm/trx_interface/CMakeLists.txt
new file mode 100644
index 0000000..8d35ef7
--- /dev/null
+++ b/include/grgsm/trx_interface/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Copyright 2011,2012 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio 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.
+#
+# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+# Install public header files
+########################################################################
+install(FILES
+ trx.h DESTINATION include/grgsm/trx_interface
+)
diff --git a/include/grgsm/trx_interface/trx.h b/include/grgsm/trx_interface/trx.h
new file mode 100644
index 0000000..7821389
--- /dev/null
+++ b/include/grgsm/trx_interface/trx.h
@@ -0,0 +1,59 @@
+/* -*- c++ -*- */
+/* @file
+ * @author Vadim Yanitskiy <axilirator@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_GRGSM_TRX_H
+#define INCLUDED_GRGSM_TRX_H
+
+#include <grgsm/api.h>
+#include <gnuradio/sync_block.h>
+
+namespace gr {
+ namespace grgsm {
+
+ /*!
+ * \brief <+description of block+>
+ * \ingroup grgsm
+ *
+ */
+ class GRGSM_API trx : virtual public gr::block
+ {
+ public:
+ typedef boost::shared_ptr<trx> sptr;
+
+ /*!
+ * \brief Return a shared_ptr to a new instance of grgsm::trx.
+ *
+ * To avoid accidental use of raw pointers, grgsm::trx's
+ * constructor is in a private implementation
+ * class. grgsm::trx::make is the public interface for
+ * creating new instances.
+ */
+ static sptr make(
+ const std::string &remote_addr,
+ const std::string &base_port);
+ };
+
+ } // namespace grgsm
+} // namespace gr
+
+#endif /* INCLUDED_GRGSM_TRX_H */
+