diff options
author | Roman Khassraf <roman@khassraf.at> | 2015-08-03 10:58:57 +0200 |
---|---|---|
committer | Roman Khassraf <roman@khassraf.at> | 2015-08-03 10:58:57 +0200 |
commit | 1c3419e88f6b24fd7100de346db9bb9b9e8ebd0d (patch) | |
tree | 9e1b4080bdafb5123cf68518198c90eca7db798a | |
parent | b8f4909d37c2c16c9c5deb09264fccfad973ed7d (diff) |
Renamed burst sink/source to burst file sink/source
-rw-r--r-- | grc/gsm_block_tree.xml | 4 | ||||
-rw-r--r-- | grc/misc_utils/CMakeLists.txt | 8 | ||||
-rw-r--r-- | grc/misc_utils/gsm_burst_file_sink.xml (renamed from grc/misc_utils/gsm_burst_sink.xml) | 6 | ||||
-rw-r--r-- | grc/misc_utils/gsm_burst_file_source.xml (renamed from grc/misc_utils/gsm_burst_source.xml) | 6 | ||||
-rw-r--r-- | include/grgsm/CMakeLists.txt | 2 | ||||
-rw-r--r-- | include/grgsm/misc_utils/CMakeLists.txt | 10 | ||||
-rw-r--r-- | include/grgsm/misc_utils/burst_file_sink.h (renamed from include/grgsm/misc_utils/burst_sink.h) | 16 | ||||
-rw-r--r-- | include/grgsm/misc_utils/burst_file_source.h (renamed from include/grgsm/misc_utils/burst_source.h) | 16 | ||||
-rw-r--r-- | lib/CMakeLists.txt | 4 | ||||
-rw-r--r-- | lib/misc_utils/burst_file_sink_impl.cc (renamed from lib/misc_utils/burst_sink_impl.cc) | 18 | ||||
-rw-r--r-- | lib/misc_utils/burst_file_sink_impl.h (renamed from lib/misc_utils/burst_sink_impl.h) | 14 | ||||
-rw-r--r-- | lib/misc_utils/burst_file_source_impl.cc (renamed from lib/misc_utils/burst_source_impl.cc) | 24 | ||||
-rw-r--r-- | lib/misc_utils/burst_file_source_impl.h (renamed from lib/misc_utils/burst_source_impl.h) | 14 | ||||
-rw-r--r-- | swig/grgsm_swig.i | 12 |
14 files changed, 73 insertions, 81 deletions
diff --git a/grc/gsm_block_tree.xml b/grc/gsm_block_tree.xml index 94d1d82..fe29895 100644 --- a/grc/gsm_block_tree.xml +++ b/grc/gsm_block_tree.xml @@ -40,8 +40,8 @@ <cat> <name>Utilities</name> <block>gsm_bursts_printer</block> - <block>gsm_burst_sink</block> - <block>gsm_burst_source</block> + <block>gsm_burst_file_sink</block> + <block>gsm_burst_file_source</block> <block>gsm_extract_system_info</block> <block>gsm_extract_immediate_assignment</block> <block>gsm_controlled_rotator_cc</block> diff --git a/grc/misc_utils/CMakeLists.txt b/grc/misc_utils/CMakeLists.txt index 5dd4c1b..bbb4bce 100644 --- a/grc/misc_utils/CMakeLists.txt +++ b/grc/misc_utils/CMakeLists.txt @@ -26,10 +26,6 @@ install(FILES gsm_bursts_printer.xml gsm_clock_offset_corrector.xml gsm_tmsi_dumper.xml - gsm_burst_sink.xml - gsm_burst_source.xml - gsm_burst_source_qa.xml - gsm_burst_sink_qa.xml - gsm_message_source.xml - gsm_message_sink.xml DESTINATION share/gnuradio/grc/blocks + gsm_burst_file_sink.xml + gsm_burst_file_source.xml DESTINATION share/gnuradio/grc/blocks ) diff --git a/grc/misc_utils/gsm_burst_sink.xml b/grc/misc_utils/gsm_burst_file_sink.xml index a0e7532..e468e5f 100644 --- a/grc/misc_utils/gsm_burst_sink.xml +++ b/grc/misc_utils/gsm_burst_file_sink.xml @@ -1,9 +1,9 @@ <?xml version="1.0"?> <block> - <name>Burst sink</name> - <key>gsm_burst_sink</key> + <name>Burst file sink</name> + <key>gsm_burst_file_sink</key> <import>import grgsm</import> - <make>grgsm.burst_sink($filename)</make> + <make>grgsm.burst_file_sink($filename)</make> <param> <name>Destination file</name> diff --git a/grc/misc_utils/gsm_burst_source.xml b/grc/misc_utils/gsm_burst_file_source.xml index 9e78069..e32a708 100644 --- a/grc/misc_utils/gsm_burst_source.xml +++ b/grc/misc_utils/gsm_burst_file_source.xml @@ -1,9 +1,9 @@ <?xml version="1.0"?> <block> - <name>Burst source</name> - <key>gsm_burst_source</key> + <name>Burst file source</name> + <key>gsm_burst_file_source</key> <import>import grgsm</import> - <make>grgsm.burst_source($filename)</make> + <make>grgsm.burst_file_source($filename)</make> <param> <name>Source file</name> diff --git a/include/grgsm/CMakeLists.txt b/include/grgsm/CMakeLists.txt index fd44c54..a16c076 100644 --- a/include/grgsm/CMakeLists.txt +++ b/include/grgsm/CMakeLists.txt @@ -32,4 +32,4 @@ add_subdirectory(decryption) add_subdirectory(demapping) add_subdirectory(receiver) add_subdirectory(misc_utils) - +add_subdirectory(qa_utils) diff --git a/include/grgsm/misc_utils/CMakeLists.txt b/include/grgsm/misc_utils/CMakeLists.txt index 18c2860..527ae51 100644 --- a/include/grgsm/misc_utils/CMakeLists.txt +++ b/include/grgsm/misc_utils/CMakeLists.txt @@ -22,16 +22,12 @@ ######################################################################## install(FILES bursts_printer.h - burst_sink.h - burst_source.h - burst_sink_qa.h - burst_source_qa.h + burst_file_source.h + burst_file_sink.h extract_system_info.h extract_immediate_assignment.h controlled_rotator_cc.h controlled_const_source_f.h message_printer.h - tmsi_dumper.h - message_source.h - message_sink.h DESTINATION include/grgsm/misc_utils + tmsi_dumper.h DESTINATION include/grgsm/misc_utils ) diff --git a/include/grgsm/misc_utils/burst_sink.h b/include/grgsm/misc_utils/burst_file_sink.h index 6903df9..7263baa 100644 --- a/include/grgsm/misc_utils/burst_sink.h +++ b/include/grgsm/misc_utils/burst_file_sink.h @@ -20,8 +20,8 @@ * */ -#ifndef INCLUDED_GSM_BURST_SINK_H -#define INCLUDED_GSM_BURST_SINK_H +#ifndef INCLUDED_GSM_BURST_FILE_SINK_H +#define INCLUDED_GSM_BURST_FILE_SINK_H #include <grgsm/api.h> #include <gnuradio/block.h> @@ -34,17 +34,17 @@ namespace gr { * \ingroup gsm * */ - class GSM_API burst_sink : virtual public gr::block + class GSM_API burst_file_sink : virtual public gr::block { public: - typedef boost::shared_ptr<burst_sink> sptr; + typedef boost::shared_ptr<burst_file_sink> sptr; /*! - * \brief Return a shared_ptr to a new instance of grgsm::burst_sink. + * \brief Return a shared_ptr to a new instance of grgsm::burst_file_sink. * - * To avoid accidental use of raw pointers, grgsm::burst_sink's + * To avoid accidental use of raw pointers, grgsm::burst_file_sink's * constructor is in a private implementation - * class. grgsm::burst_sink::make is the public interface for + * class. grgsm::burst_file_sink::make is the public interface for * creating new instances. */ static sptr make(const std::string &filename); @@ -52,5 +52,5 @@ namespace gr { } // namespace gsm } // namespace gr -#endif /* INCLUDED_GSM_BURST_SINK_H */ +#endif /* INCLUDED_GSM_BURST_FILE_SINK_H */ diff --git a/include/grgsm/misc_utils/burst_source.h b/include/grgsm/misc_utils/burst_file_source.h index bd8644f..e18ef44 100644 --- a/include/grgsm/misc_utils/burst_source.h +++ b/include/grgsm/misc_utils/burst_file_source.h @@ -20,8 +20,8 @@ * */ -#ifndef INCLUDED_GSM_BURST_SOURCE_H -#define INCLUDED_GSM_BURST_SOURCE_H +#ifndef INCLUDED_GSM_BURST_FILE_SOURCE_H +#define INCLUDED_GSM_BURST_FILE_SOURCE_H #include <grgsm/api.h> #include <gnuradio/block.h> @@ -34,17 +34,17 @@ namespace gr { * \ingroup gsm * */ - class GSM_API burst_source : virtual public gr::block + class GSM_API burst_file_source : virtual public gr::block { public: - typedef boost::shared_ptr<burst_source> sptr; + typedef boost::shared_ptr<burst_file_source> sptr; /*! - * \brief Return a shared_ptr to a new instance of grgsm::burst_source. + * \brief Return a shared_ptr to a new instance of grgsm::burst_file_source. * - * To avoid accidental use of raw pointers, grgsm::burst_source's + * To avoid accidental use of raw pointers, grgsm::burst_file_source's * constructor is in a private implementation - * class. grgsm::burst_source::make is the public interface for + * class. grgsm::burst_file_source::make is the public interface for * creating new instances. */ static sptr make(const std::string &filename); @@ -53,5 +53,5 @@ namespace gr { } // namespace gsm } // namespace gr -#endif /* INCLUDED_GSM_BURST_SOURCE_H */ +#endif /* INCLUDED_GSM_BURST_FILE_SOURCE_H */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7cb05b8..a3a3388 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -50,8 +50,8 @@ list(APPEND grgsm_sources misc_utils/controlled_const_source_f_impl.cc misc_utils/message_printer_impl.cc misc_utils/tmsi_dumper_impl.cc - misc_utils/burst_sink_impl.cc - misc_utils/burst_source_impl.cc + misc_utils/burst_file_sink_impl.cc + misc_utils/burst_file_source_impl.cc qa_utils/burst_sink_qa_impl.cc qa_utils/burst_source_qa_impl.cc qa_utils/message_source_impl.cc diff --git a/lib/misc_utils/burst_sink_impl.cc b/lib/misc_utils/burst_file_sink_impl.cc index fdb7d98..25a262e 100644 --- a/lib/misc_utils/burst_sink_impl.cc +++ b/lib/misc_utils/burst_file_sink_impl.cc @@ -25,36 +25,36 @@ #endif #include <gnuradio/io_signature.h> -#include "burst_sink_impl.h" +#include "burst_file_sink_impl.h" #include "stdio.h" namespace gr { namespace gsm { - burst_sink::sptr - burst_sink::make(const std::string &filename) + burst_file_sink::sptr + burst_file_sink::make(const std::string &filename) { return gnuradio::get_initial_sptr - (new burst_sink_impl(filename)); + (new burst_file_sink_impl(filename)); } /* * The private constructor */ - burst_sink_impl::burst_sink_impl(const std::string &filename) - : gr::block("burst_sink", + burst_file_sink_impl::burst_file_sink_impl(const std::string &filename) + : gr::block("burst_file_sink", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)), d_output_file(filename.c_str(), std::ofstream::binary) { message_port_register_in(pmt::mp("in")); - set_msg_handler(pmt::mp("in"), boost::bind(&burst_sink_impl::process_burst, this, _1)); + set_msg_handler(pmt::mp("in"), boost::bind(&burst_file_sink_impl::process_burst, this, _1)); } /* * Our virtual destructor. */ - burst_sink_impl::~burst_sink_impl() + burst_file_sink_impl::~burst_file_sink_impl() { if (d_output_file.is_open()) { @@ -62,7 +62,7 @@ namespace gr { } } - void burst_sink_impl::process_burst(pmt::pmt_t msg) + void burst_file_sink_impl::process_burst(pmt::pmt_t msg) { std::string s = pmt::serialize_str(msg); const char *serialized = s.data(); diff --git a/lib/misc_utils/burst_sink_impl.h b/lib/misc_utils/burst_file_sink_impl.h index f981826..898c609 100644 --- a/lib/misc_utils/burst_sink_impl.h +++ b/lib/misc_utils/burst_file_sink_impl.h @@ -20,27 +20,27 @@ * */ -#ifndef INCLUDED_GSM_BURST_SINK_IMPL_H -#define INCLUDED_GSM_BURST_SINK_IMPL_H +#ifndef INCLUDED_GSM_BURST_FILE_SINK_IMPL_H +#define INCLUDED_GSM_BURST_FILE_SINK_IMPL_H -#include <grgsm/misc_utils/burst_sink.h> +#include <grgsm/misc_utils/burst_file_sink.h> #include <fstream> namespace gr { namespace gsm { - class burst_sink_impl : public burst_sink + class burst_file_sink_impl : public burst_file_sink { private: std::ofstream d_output_file; public: - burst_sink_impl(const std::string &filename); - ~burst_sink_impl(); + burst_file_sink_impl(const std::string &filename); + ~burst_file_sink_impl(); void process_burst(pmt::pmt_t msg); }; } // namespace gsm } // namespace gr -#endif /* INCLUDED_GSM_BURST_SINK_IMPL_H */ +#endif /* INCLUDED_GSM_BURST_FILE_SINK_IMPL_H */ diff --git a/lib/misc_utils/burst_source_impl.cc b/lib/misc_utils/burst_file_source_impl.cc index 76d1eaa..4661dfb 100644 --- a/lib/misc_utils/burst_source_impl.cc +++ b/lib/misc_utils/burst_file_source_impl.cc @@ -25,7 +25,7 @@ #endif #include <gnuradio/io_signature.h> -#include "burst_source_impl.h" +#include "burst_file_source_impl.h" #include "stdio.h" #define PMT_SIZE 174 @@ -33,18 +33,18 @@ namespace gr { namespace gsm { - burst_source::sptr - burst_source::make(const std::string &filename) + burst_file_source::sptr + burst_file_source::make(const std::string &filename) { return gnuradio::get_initial_sptr - (new burst_source_impl(filename)); + (new burst_file_source_impl(filename)); } /* * The private constructor */ - burst_source_impl::burst_source_impl(const std::string &filename) - : gr::block("burst_source", + burst_file_source_impl::burst_file_source_impl(const std::string &filename) + : gr::block("burst_file_source", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)), d_input_file(filename.c_str(), std::ifstream::binary), @@ -56,22 +56,22 @@ namespace gr { /* * Our virtual destructor. */ - burst_source_impl::~burst_source_impl() + burst_file_source_impl::~burst_file_source_impl() { if (d_finished == false){ d_finished = true; } } - bool burst_source_impl::start() + bool burst_file_source_impl::start() { d_finished = false; d_thread = boost::shared_ptr<gr::thread::thread> - (new gr::thread::thread(boost::bind(&burst_source_impl::run, this))); + (new gr::thread::thread(boost::bind(&burst_file_source_impl::run, this))); return block::start(); } - bool burst_source_impl::stop() + bool burst_file_source_impl::stop() { d_finished = true; d_thread->interrupt(); @@ -79,12 +79,12 @@ namespace gr { return block::stop(); } - bool burst_source_impl::finished() + bool burst_file_source_impl::finished() { return d_finished; } - void burst_source_impl::run() + void burst_file_source_impl::run() { char *unserialized = (char*)malloc(sizeof(char) * PMT_SIZE); while (d_input_file.read(unserialized, PMT_SIZE) && !d_finished) diff --git a/lib/misc_utils/burst_source_impl.h b/lib/misc_utils/burst_file_source_impl.h index 85217b0..383dc90 100644 --- a/lib/misc_utils/burst_source_impl.h +++ b/lib/misc_utils/burst_file_source_impl.h @@ -20,16 +20,16 @@ * */ -#ifndef INCLUDED_GSM_BURST_SOURCE_IMPL_H -#define INCLUDED_GSM_BURST_SOURCE_IMPL_H +#ifndef INCLUDED_GSM_BURST_FILE_SOURCE_IMPL_H +#define INCLUDED_GSM_BURST_FILE_SOURCE_IMPL_H -#include <grgsm/misc_utils/burst_source.h> +#include <grgsm/misc_utils/burst_file_source.h> #include <fstream> namespace gr { namespace gsm { - class burst_source_impl : public burst_source + class burst_file_source_impl : public burst_file_source { private: boost::shared_ptr<gr::thread::thread> d_thread; @@ -37,8 +37,8 @@ namespace gr { bool d_finished; void run(); public: - burst_source_impl(const std::string &filename); - ~burst_source_impl(); + burst_file_source_impl(const std::string &filename); + ~burst_file_source_impl(); bool start(); bool stop(); bool finished(); @@ -46,5 +46,5 @@ namespace gr { } // namespace gsm } // namespace gr -#endif /* INCLUDED_GSM_BURST_SOURCE_IMPL_H */ +#endif /* INCLUDED_GSM_BURST_FILE_SOURCE_IMPL_H */ diff --git a/swig/grgsm_swig.i b/swig/grgsm_swig.i index c067757..fbc4151 100644 --- a/swig/grgsm_swig.i +++ b/swig/grgsm_swig.i @@ -23,8 +23,8 @@ #include "grgsm/misc_utils/extract_immediate_assignment.h" #include "grgsm/misc_utils/message_printer.h" #include "grgsm/misc_utils/tmsi_dumper.h" -#include "grgsm/misc_utils/burst_sink.h" -#include "grgsm/misc_utils/burst_source.h" +#include "grgsm/misc_utils/burst_file_sink.h" +#include "grgsm/misc_utils/burst_file_source.h" #include "grgsm/qa_utils/burst_sink_qa.h" #include "grgsm/qa_utils/burst_source_qa.h" #include "grgsm/qa_utils/message_source.h" @@ -54,10 +54,10 @@ GR_SWIG_BLOCK_MAGIC2(gsm, tch_f_chans_demapper); %include "grgsm/misc_utils/bursts_printer.h" GR_SWIG_BLOCK_MAGIC2(gsm, bursts_printer); -%include "grgsm/misc_utils/burst_sink.h" -GR_SWIG_BLOCK_MAGIC2(gsm, burst_sink); -%include "grgsm/misc_utils/burst_source.h" -GR_SWIG_BLOCK_MAGIC2(gsm, burst_source); +%include "grgsm/misc_utils/burst_file_sink.h" +GR_SWIG_BLOCK_MAGIC2(gsm, burst_file_sink); +%include "grgsm/misc_utils/burst_file_source.h" +GR_SWIG_BLOCK_MAGIC2(gsm, burst_file_source); %include "grgsm/misc_utils/extract_system_info.h" GR_SWIG_BLOCK_MAGIC2(gsm, extract_system_info); %include "grgsm/misc_utils/extract_immediate_assignment.h" |