aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptrkrysik <ptrkrysik@gmail.com>2014-08-16 11:44:27 +0200
committerptrkrysik <ptrkrysik@gmail.com>2014-08-16 11:44:27 +0200
commit3c6dfcc16fd78d9a37110a368f9577593a473f80 (patch)
tree667cd9af32e24ba3c068908fb9082eb5059ec9ff
parent0708c4cfdb1f035b6dc57041f861d66c3d1f9895 (diff)
Added empty sink for wireshark sink
-rw-r--r--grc/CMakeLists.txt3
-rw-r--r--grc/gsm_wireshark_sink.xml38
-rw-r--r--include/gsm/misc_utils/CMakeLists.txt1
-rw-r--r--lib/CMakeLists.txt1
-rw-r--r--lib/misc_utils/wireshark_sink_impl.cc57
-rw-r--r--lib/misc_utils/wireshark_sink_impl.h43
-rw-r--r--swig/gsm_swig.i3
7 files changed, 145 insertions, 1 deletions
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
index c95646d..17fad78 100644
--- a/grc/CMakeLists.txt
+++ b/grc/CMakeLists.txt
@@ -29,6 +29,7 @@ install(FILES
misc_utils/gsm_controlled_rotator_cc.xml
misc_utils/gsm_controlled_const_source_f.xml
receiver/gsm_clock_offset_control.xml
- misc_utils/gsm_message_printer.xml
+ misc_utils/gsm_message_printer.xml
+ gsm_wireshark_sink.xml
misc_utils/gsm_clock_offset_corrector.xml DESTINATION share/gnuradio/grc/blocks
)
diff --git a/grc/gsm_wireshark_sink.xml b/grc/gsm_wireshark_sink.xml
new file mode 100644
index 0000000..1e810d1
--- /dev/null
+++ b/grc/gsm_wireshark_sink.xml
@@ -0,0 +1,38 @@
+<?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>
+ <!-- Make one 'param' node for every Parameter you want settable from the GUI.
+ Sub-nodes:
+ * name
+ * key (makes the value accessible as $keyname, e.g. in the make node)
+ * type -->
+ <param>
+ <name>...</name>
+ <key>...</key>
+ <type>...</type>
+ </param>
+
+ <!-- Make one 'sink' node per input. Sub-nodes:
+ * name (an identifier for the GUI)
+ * type
+ * vlen
+ * optional (set to 1 for optional inputs) -->
+ <sink>
+ <name>in</name>
+ <type><!-- e.g. int, float, complex, byte, short, xxx_vector, ...--></type>
+ </sink>
+
+ <!-- Make one 'source' node per output. Sub-nodes:
+ * name (an identifier for the GUI)
+ * type
+ * vlen
+ * optional (set to 1 for optional inputs) -->
+ <source>
+ <name>out</name>
+ <type><!-- e.g. int, float, complex, byte, short, xxx_vector, ...--></type>
+ </source>
+</block>
diff --git a/include/gsm/misc_utils/CMakeLists.txt b/include/gsm/misc_utils/CMakeLists.txt
index da5db22..2dc960c 100644
--- a/include/gsm/misc_utils/CMakeLists.txt
+++ b/include/gsm/misc_utils/CMakeLists.txt
@@ -25,5 +25,6 @@ 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/lib/CMakeLists.txt b/lib/CMakeLists.txt
index e4ed842..867dfdc 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -38,6 +38,7 @@ 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
new file mode 100644
index 0000000..1606818
--- /dev/null
+++ b/lib/misc_utils/wireshark_sink_impl.cc
@@ -0,0 +1,57 @@
+/* -*- 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"
+
+namespace gr {
+ namespace gsm {
+
+ 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))
+ {}
+
+ /*
+ * 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
new file mode 100644
index 0000000..4992d05
--- /dev/null
+++ b/lib/misc_utils/wireshark_sink_impl.h
@@ -0,0 +1,43 @@
+/* -*- 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:
+ // Nothing to declare in this block.
+
+ public:
+ wireshark_sink_impl();
+ ~wireshark_sink_impl();
+
+ }; // namespace gsm
+ }
+} // namespace gr
+
+#endif /* INCLUDED_GSM_WIRESHARK_SINK_IMPL_H */
+
diff --git a/swig/gsm_swig.i b/swig/gsm_swig.i
index bb2c428..3305e1b 100644
--- a/swig/gsm_swig.i
+++ b/swig/gsm_swig.i
@@ -16,6 +16,7 @@
#include "gsm/controlled_rotator_cc.h"
#include "gsm/controlled_const_source_f.h"
#include "gsm/message_printer.h"
+#include "gsm/wireshark_sink.h"
%}
@@ -36,3 +37,5 @@ GR_SWIG_BLOCK_MAGIC2(gsm, controlled_rotator_cc);
GR_SWIG_BLOCK_MAGIC2(gsm, controlled_const_source_f);
%include "gsm/message_printer.h"
GR_SWIG_BLOCK_MAGIC2(gsm, message_printer);
+%include "gsm/wireshark_sink.h"
+GR_SWIG_BLOCK_MAGIC2(gsm, wireshark_sink);