aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPiotr Krysik <pkrysik@elka.pw.edu.pl>2018-05-05 12:38:11 +0200
committerPiotr Krysik <pkrysik@elka.pw.edu.pl>2018-05-05 12:38:11 +0200
commit1373c32d7e451738ccdd87c95b5400a82bb73f78 (patch)
tree4d621fc39ecd8b3c1f92ae829ec632a85ce1804b /include
parent450ed8fbbe96540b08f9a3a11fbca86268280edf (diff)
Moving trx burst interface to trx directory
and to new 'Transceiver' cathegory in gnuradio-companion
Diffstat (limited to 'include')
-rw-r--r--include/grgsm/CMakeLists.txt1
-rw-r--r--include/grgsm/misc_utils/CMakeLists.txt1
-rw-r--r--include/grgsm/misc_utils/udp_socket.h69
-rw-r--r--include/grgsm/trx/CMakeLists.txt26
-rw-r--r--include/grgsm/trx/trx_burst_if.h (renamed from include/grgsm/misc_utils/trx_burst_if.h)0
5 files changed, 96 insertions, 1 deletions
diff --git a/include/grgsm/CMakeLists.txt b/include/grgsm/CMakeLists.txt
index 2f76929..2982ef1 100644
--- a/include/grgsm/CMakeLists.txt
+++ b/include/grgsm/CMakeLists.txt
@@ -37,3 +37,4 @@ add_subdirectory(misc_utils)
add_subdirectory(qa_utils)
add_subdirectory(flow_control)
add_subdirectory(transmitter)
+add_subdirectory(trx)
diff --git a/include/grgsm/misc_utils/CMakeLists.txt b/include/grgsm/misc_utils/CMakeLists.txt
index 23fe980..f8d8cbc 100644
--- a/include/grgsm/misc_utils/CMakeLists.txt
+++ b/include/grgsm/misc_utils/CMakeLists.txt
@@ -35,7 +35,6 @@ install(FILES
message_printer.h
tmsi_dumper.h
msg_to_tag.h
- trx_burst_if.h
burst_to_fn_time.h
controlled_fractional_resampler_cc.h
time_spec.h
diff --git a/include/grgsm/misc_utils/udp_socket.h b/include/grgsm/misc_utils/udp_socket.h
new file mode 100644
index 0000000..15b2c66
--- /dev/null
+++ b/include/grgsm/misc_utils/udp_socket.h
@@ -0,0 +1,69 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013 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.
+ */
+
+#ifndef INCLUDED_GRGSM_TRX_UDP_SOCKET_H
+#define INCLUDED_GRGSM_TRX_UDP_SOCKET_H
+
+#include <gnuradio/thread/thread.h>
+
+#include <boost/function.hpp>
+#include <boost/array.hpp>
+#include <boost/asio.hpp>
+#include <boost/bind.hpp>
+#include <pmt/pmt.h>
+
+namespace gr {
+ namespace gsm {
+
+ class udp_socket
+ {
+ private:
+ boost::asio::io_service d_io_service;
+ std::vector<char> d_rxbuf;
+ gr::thread::thread d_thread;
+ bool d_started;
+ bool d_finished;
+
+ boost::asio::ip::udp::endpoint d_udp_endpoint_rx;
+ boost::asio::ip::udp::endpoint d_udp_endpoint_tx;
+ boost::shared_ptr<boost::asio::ip::udp::socket> d_udp_socket;
+
+ void handle_udp_read(const boost::system::error_code& error,
+ size_t bytes_transferred);
+ void run_io_service(void);
+
+ public:
+ udp_socket(
+ const std::string &remote_addr,
+ const std::string &src_port,
+ const std::string &dst_port,
+ size_t mtu);
+ ~udp_socket();
+
+ void udp_send(uint8_t *data, size_t len);
+ boost::function<void (uint8_t *, size_t)> udp_rx_handler;
+ };
+
+ } /* namespace gsm */
+} /* namespace gr */
+
+#endif /* INCLUDED_GRGSM_TRX_UDP_SOCKET_H */
diff --git a/include/grgsm/trx/CMakeLists.txt b/include/grgsm/trx/CMakeLists.txt
new file mode 100644
index 0000000..a9847dd
--- /dev/null
+++ b/include/grgsm/trx/CMakeLists.txt
@@ -0,0 +1,26 @@
+# 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_burst_if.h
+ DESTINATION include/grgsm/trx
+)
diff --git a/include/grgsm/misc_utils/trx_burst_if.h b/include/grgsm/trx/trx_burst_if.h
index 0e7a35a..0e7a35a 100644
--- a/include/grgsm/misc_utils/trx_burst_if.h
+++ b/include/grgsm/trx/trx_burst_if.h