Renamed burst_sink_qa/burst_source_qa to burst_sink/burst_source
diff --git a/grc/qa_utils/CMakeLists.txt b/grc/qa_utils/CMakeLists.txt
index 43398d4..1f57aa1 100644
--- a/grc/qa_utils/CMakeLists.txt
+++ b/grc/qa_utils/CMakeLists.txt
@@ -18,8 +18,8 @@
# Boston, MA 02110-1301, USA.
install(FILES
- gsm_burst_source_qa.xml
- gsm_burst_sink_qa.xml
+ gsm_burst_source.xml
+ gsm_burst_sink.xml
gsm_message_source.xml
gsm_message_sink.xml DESTINATION share/gnuradio/grc/blocks
)
diff --git a/grc/qa_utils/gsm_burst_sink.xml b/grc/qa_utils/gsm_burst_sink.xml
new file mode 100644
index 0000000..740960f
--- /dev/null
+++ b/grc/qa_utils/gsm_burst_sink.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<block>
+ <name>Burst sink</name>
+ <key>gsm_burst_sink</key>
+ <import>import grgsm</import>
+ <make>grgsm.burst_sink()</make>
+
+ <sink>
+ <name>in</name>
+ <type>message</type>
+ </sink>
+</block>
diff --git a/grc/qa_utils/gsm_burst_sink_qa.xml b/grc/qa_utils/gsm_burst_sink_qa.xml
deleted file mode 100644
index c028da3..0000000
--- a/grc/qa_utils/gsm_burst_sink_qa.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<block>
- <name>QA Burst sink</name>
- <key>gsm_burst_sink_qa</key>
- <import>import grgsm</import>
- <make>grgsm.burst_sink_qa()</make>
-
- <sink>
- <name>in</name>
- <type>message</type>
- </sink>
-</block>
diff --git a/grc/qa_utils/gsm_burst_source_qa.xml b/grc/qa_utils/gsm_burst_source.xml
similarity index 79%
rename from grc/qa_utils/gsm_burst_source_qa.xml
rename to grc/qa_utils/gsm_burst_source.xml
index bb04cca..9f55ac5 100644
--- a/grc/qa_utils/gsm_burst_source_qa.xml
+++ b/grc/qa_utils/gsm_burst_source.xml
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<block>
- <name>QA Burst source</name>
- <key>gsm_burst_source_qa</key>
+ <name>Burst source</name>
+ <key>gsm_burst_source</key>
<import>import grgsm</import>
- <make>grgsm.burst_source_qa($framenumbers, $timeslots, $bursts)</make>
+ <make>grgsm.burst_source($framenumbers, $timeslots, $bursts)</make>
<param>
<name>Frame numbers</name>
diff --git a/include/grgsm/qa_utils/CMakeLists.txt b/include/grgsm/qa_utils/CMakeLists.txt
index e0b5579..44bbbfb 100644
--- a/include/grgsm/qa_utils/CMakeLists.txt
+++ b/include/grgsm/qa_utils/CMakeLists.txt
@@ -21,8 +21,8 @@
# Install public header files
########################################################################
install(FILES
- burst_sink_qa.h
- burst_source_qa.h
+ burst_sink.h
+ burst_source.h
message_source.h
message_sink.h DESTINATION include/grgsm/qa_utils
)
diff --git a/include/grgsm/qa_utils/burst_sink_qa.h b/include/grgsm/qa_utils/burst_sink.h
similarity index 81%
rename from include/grgsm/qa_utils/burst_sink_qa.h
rename to include/grgsm/qa_utils/burst_sink.h
index 3b5cac2..266cbc8 100644
--- a/include/grgsm/qa_utils/burst_sink_qa.h
+++ b/include/grgsm/qa_utils/burst_sink.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef INCLUDED_GSM_BURST_SINK_QA_H
-#define INCLUDED_GSM_BURST_SINK_QA_H
+#ifndef INCLUDED_GSM_BURST_SINK_H
+#define INCLUDED_GSM_BURST_SINK_H
#include <grgsm/api.h>
#include <gnuradio/block.h>
@@ -34,17 +34,17 @@
* \ingroup gsm
*
*/
- class GSM_API burst_sink_qa : virtual public gr::block
+ class GSM_API burst_sink : virtual public gr::block
{
public:
- typedef boost::shared_ptr<burst_sink_qa> sptr;
+ typedef boost::shared_ptr<burst_sink> sptr;
/*!
- * \brief Return a shared_ptr to a new instance of grgsm::burst_sink_qa.
+ * \brief Return a shared_ptr to a new instance of grgsm::burst_sink.
*
- * To avoid accidental use of raw pointers, grgsm::burst_sink_qa's
+ * To avoid accidental use of raw pointers, grgsm::burst_sink's
* constructor is in a private implementation
- * class. grgsm::burst_sink_qa::make is the public interface for
+ * class. grgsm::burst_sink::make is the public interface for
* creating new instances.
*/
static sptr make();
@@ -56,5 +56,5 @@
} // namespace gsm
} // namespace gr
-#endif /* INCLUDED_GSM_BURST_SINK_QA_H */
+#endif /* INCLUDED_GSM_BURST_SINK_H */
diff --git a/include/grgsm/qa_utils/burst_source_qa.h b/include/grgsm/qa_utils/burst_source.h
similarity index 82%
rename from include/grgsm/qa_utils/burst_source_qa.h
rename to include/grgsm/qa_utils/burst_source.h
index c3c5713..bfed70f 100644
--- a/include/grgsm/qa_utils/burst_source_qa.h
+++ b/include/grgsm/qa_utils/burst_source.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef INCLUDED_GSM_BURST_SOURCE_QA_H
-#define INCLUDED_GSM_BURST_SOURCE_QA_H
+#ifndef INCLUDED_GSM_BURST_SOURCE_H
+#define INCLUDED_GSM_BURST_SOURCE_H
#include <grgsm/api.h>
#include <gnuradio/block.h>
@@ -34,17 +34,17 @@
* \ingroup gsm
*
*/
- class GSM_API burst_source_qa : virtual public gr::block
+ class GSM_API burst_source : virtual public gr::block
{
public:
- typedef boost::shared_ptr<burst_source_qa> sptr;
+ typedef boost::shared_ptr<burst_source> sptr;
/*!
- * \brief Return a shared_ptr to a new instance of grgsm::burst_source_qa.
+ * \brief Return a shared_ptr to a new instance of grgsm::burst_source.
*
- * To avoid accidental use of raw pointers, grgsm::burst_source_qa's
+ * To avoid accidental use of raw pointers, grgsm::burst_source's
* constructor is in a private implementation
- * class. grgsm::burst_source_qa::make is the public interface for
+ * class. grgsm::burst_source::make is the public interface for
* creating new instances.
*/
static sptr make(const std::vector<int> &framenumbers,
@@ -59,6 +59,6 @@
} // namespace gsm
} // namespace gr
-#endif /* INCLUDED_GSM_BURST_SOURCE_QA_H */
+#endif /* INCLUDED_GSM_BURST_SOURCE_H */
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index a3a3388..c9a39ce 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -52,8 +52,8 @@
misc_utils/tmsi_dumper_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/burst_sink_impl.cc
+ qa_utils/burst_source_impl.cc
qa_utils/message_source_impl.cc
qa_utils/message_sink_impl.cc
decryption/decryption_impl.cc
diff --git a/lib/qa_utils/burst_sink_qa_impl.cc b/lib/qa_utils/burst_sink_impl.cc
similarity index 80%
rename from lib/qa_utils/burst_sink_qa_impl.cc
rename to lib/qa_utils/burst_sink_impl.cc
index aa9df9d..de26d39 100644
--- a/lib/qa_utils/burst_sink_qa_impl.cc
+++ b/lib/qa_utils/burst_sink_impl.cc
@@ -25,7 +25,7 @@
#endif
#include <gnuradio/io_signature.h>
-#include "burst_sink_qa_impl.h"
+#include "burst_sink_impl.h"
#include <stdio.h>
#include <sstream>
#include <grgsm/gsmtap.h>
@@ -33,29 +33,29 @@
namespace gr {
namespace gsm {
- burst_sink_qa::sptr
- burst_sink_qa::make()
+ burst_sink::sptr
+ burst_sink::make()
{
return gnuradio::get_initial_sptr
- (new burst_sink_qa_impl());
+ (new burst_sink_impl());
}
/*
* The private constructor
*/
- burst_sink_qa_impl::burst_sink_qa_impl()
- : gr::block("burst_sink_qa",
+ burst_sink_impl::burst_sink_impl()
+ : gr::block("burst_sink",
gr::io_signature::make(0, 0, 0),
gr::io_signature::make(0, 0, 0))
{
message_port_register_in(pmt::mp("in"));
- set_msg_handler(pmt::mp("in"), boost::bind(&burst_sink_qa_impl::process_burst, this, _1));
+ set_msg_handler(pmt::mp("in"), boost::bind(&burst_sink_impl::process_burst, this, _1));
}
/*
* Our virtual destructor.
*/
- burst_sink_qa_impl::~burst_sink_qa_impl()
+ burst_sink_impl::~burst_sink_impl()
{
// for (int i=0; i<d_burst_data.size(); i++)
// {
@@ -63,7 +63,7 @@
// }
}
- void burst_sink_qa_impl::process_burst(pmt::pmt_t msg)
+ void burst_sink_impl::process_burst(pmt::pmt_t msg)
{
pmt::pmt_t header_plus_burst = pmt::cdr(msg);
@@ -90,17 +90,17 @@
d_burst_data.push_back(burst_str.str());
}
- std::vector<int> burst_sink_qa_impl::get_framenumbers()
+ std::vector<int> burst_sink_impl::get_framenumbers()
{
return d_framenumbers;
}
- std::vector<int> burst_sink_qa_impl::get_timeslots()
+ std::vector<int> burst_sink_impl::get_timeslots()
{
return d_timeslots;
}
- std::vector<std::string> burst_sink_qa_impl::get_burst_data()
+ std::vector<std::string> burst_sink_impl::get_burst_data()
{
return d_burst_data;
}
diff --git a/lib/qa_utils/burst_sink_qa_impl.h b/lib/qa_utils/burst_sink_impl.h
similarity index 81%
rename from lib/qa_utils/burst_sink_qa_impl.h
rename to lib/qa_utils/burst_sink_impl.h
index 4bd3825..42e1e4a 100644
--- a/lib/qa_utils/burst_sink_qa_impl.h
+++ b/lib/qa_utils/burst_sink_impl.h
@@ -20,24 +20,24 @@
*
*/
-#ifndef INCLUDED_GSM_BURST_SINK_QA_IMPL_H
-#define INCLUDED_GSM_BURST_SINK_QA_IMPL_H
+#ifndef INCLUDED_GSM_BURST_SINK_IMPL_H
+#define INCLUDED_GSM_BURST_SINK_IMPL_H
-#include <grgsm/qa_utils/burst_sink_qa.h>
+#include <grgsm/qa_utils/burst_sink.h>
#include <fstream>
namespace gr {
namespace gsm {
- class burst_sink_qa_impl : public burst_sink_qa
+ class burst_sink_impl : public burst_sink
{
private:
std::vector<int> d_framenumbers;
std::vector<int> d_timeslots;
std::vector<std::string> d_burst_data;
public:
- burst_sink_qa_impl();
- ~burst_sink_qa_impl();
+ burst_sink_impl();
+ ~burst_sink_impl();
void process_burst(pmt::pmt_t msg);
virtual std::vector<int> get_framenumbers();
virtual std::vector<int> get_timeslots();
@@ -47,5 +47,5 @@
} // namespace gsm
} // namespace gr
-#endif /* INCLUDED_GSM_BURST_SINK_QA_IMPL_H */
+#endif /* INCLUDED_GSM_BURST_SINK_IMPL_H */
diff --git a/lib/qa_utils/burst_source_qa_impl.cc b/lib/qa_utils/burst_source_impl.cc
similarity index 82%
rename from lib/qa_utils/burst_source_qa_impl.cc
rename to lib/qa_utils/burst_source_impl.cc
index 7b2d412..7391872 100644
--- a/lib/qa_utils/burst_source_qa_impl.cc
+++ b/lib/qa_utils/burst_source_impl.cc
@@ -25,7 +25,7 @@
#endif
#include <gnuradio/io_signature.h>
-#include "burst_source_qa_impl.h"
+#include "burst_source_impl.h"
#include "stdio.h"
#include <boost/scoped_ptr.hpp>
#include <grgsm/gsmtap.h>
@@ -36,22 +36,22 @@
namespace gr {
namespace gsm {
- burst_source_qa::sptr
- burst_source_qa::make(const std::vector<int> &framenumbers,
+ burst_source::sptr
+ burst_source::make(const std::vector<int> &framenumbers,
const std::vector<int> ×lots,
const std::vector<std::string> &burst_data)
{
return gnuradio::get_initial_sptr
- (new burst_source_qa_impl(framenumbers, timeslots, burst_data));
+ (new burst_source_impl(framenumbers, timeslots, burst_data));
}
/*
* The private constructor
*/
- burst_source_qa_impl::burst_source_qa_impl(const std::vector<int> &framenumbers,
+ burst_source_impl::burst_source_impl(const std::vector<int> &framenumbers,
const std::vector<int> ×lots,
const std::vector<std::string> &burst_data)
- : gr::block("burst_source_qa",
+ : gr::block("burst_source",
gr::io_signature::make(0, 0, 0),
gr::io_signature::make(0, 0, 0)),
d_finished(false)
@@ -65,37 +65,37 @@
/*
* Our virtual destructor.
*/
- burst_source_qa_impl::~burst_source_qa_impl()
+ burst_source_impl::~burst_source_impl()
{
if (d_finished == false){
d_finished = true;
}
}
- void burst_source_qa_impl::set_framenumbers(const std::vector<int> &framenumbers)
+ void burst_source_impl::set_framenumbers(const std::vector<int> &framenumbers)
{
d_framenumbers = framenumbers;
}
- void burst_source_qa_impl::set_timeslots(const std::vector<int> ×lots)
+ void burst_source_impl::set_timeslots(const std::vector<int> ×lots)
{
d_timeslots = timeslots;
}
- void burst_source_qa_impl::set_burst_data(const std::vector<std::string> &burst_data)
+ void burst_source_impl::set_burst_data(const std::vector<std::string> &burst_data)
{
d_burst_data = burst_data;
}
- bool burst_source_qa_impl::start()
+ bool burst_source_impl::start()
{
d_finished = false;
d_thread = boost::shared_ptr<gr::thread::thread>
- (new gr::thread::thread(boost::bind(&burst_source_qa_impl::run, this)));
+ (new gr::thread::thread(boost::bind(&burst_source_impl::run, this)));
return block::start();
}
- bool burst_source_qa_impl::stop()
+ bool burst_source_impl::stop()
{
d_finished = true;
d_thread->interrupt();
@@ -103,12 +103,12 @@
return block::stop();
}
- bool burst_source_qa_impl::finished()
+ bool burst_source_impl::finished()
{
return d_finished;
}
- void burst_source_qa_impl::run()
+ void burst_source_impl::run()
{
char *unserialized = (char*)malloc(sizeof(char) * PMT_SIZE);
diff --git a/lib/qa_utils/burst_source_qa_impl.h b/lib/qa_utils/burst_source_impl.h
similarity index 82%
rename from lib/qa_utils/burst_source_qa_impl.h
rename to lib/qa_utils/burst_source_impl.h
index 3856a90..969faf9 100644
--- a/lib/qa_utils/burst_source_qa_impl.h
+++ b/lib/qa_utils/burst_source_impl.h
@@ -20,19 +20,19 @@
*
*/
-#ifndef INCLUDED_GSM_BURST_SOURCE_QA_IMPL_H
-#define INCLUDED_GSM_BURST_SOURCE_QA_IMPL_H
+#ifndef INCLUDED_GSM_BURST_SOURCE_IMPL_H
+#define INCLUDED_GSM_BURST_SOURCE_IMPL_H
#define BURST_SIZE 148
-#include <grgsm/qa_utils/burst_source_qa.h>
+#include <grgsm/qa_utils/burst_source.h>
#include <fstream>
namespace gr {
namespace gsm {
- class burst_source_qa_impl : public burst_source_qa
+ class burst_source_impl : public burst_source
{
private:
boost::shared_ptr<gr::thread::thread> d_thread;
@@ -42,10 +42,10 @@
bool d_finished;
void run();
public:
- burst_source_qa_impl(const std::vector<int> &framenumbers,
+ burst_source_impl(const std::vector<int> &framenumbers,
const std::vector<int> ×lots,
const std::vector<std::string> &burst_data);
- ~burst_source_qa_impl();
+ ~burst_source_impl();
virtual void set_framenumbers(const std::vector<int> &framenumbers);
virtual void set_timeslots(const std::vector<int> ×lots);
virtual void set_burst_data(const std::vector<std::string> &burst_data);
@@ -56,6 +56,6 @@
} // namespace gsm
} // namespace gr
-#endif /* INCLUDED_GSM_BURST_SOURCE_QA_IMPL_H */
+#endif /* INCLUDED_GSM_BURST_SOURCE_IMPL_H */
diff --git a/python/qa_decryption.py b/python/qa_decryption.py
index cf228ae..08f0915 100755
--- a/python/qa_decryption.py
+++ b/python/qa_decryption.py
@@ -56,9 +56,9 @@
key = [0x32,0xE5,0x45,0x53,0x20,0x8C,0xE0,0x00]
a5_version = 1
- src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+ src = grgsm.burst_source(framenumbers_input, timeslots_input, bursts_input)
decryption = grgsm.decryption((key), a5_version)
- dst = grgsm.burst_sink_qa()
+ dst = grgsm.burst_sink()
self.tb.msg_connect(src, "out", decryption, "bursts")
self.tb.msg_connect(decryption, "bursts", dst, "in")
@@ -97,9 +97,9 @@
key = [0xAD,0x6A,0x3E,0xC2,0xB4,0x42,0xE4,0x00]
a5_version = 1
- src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+ src = grgsm.burst_source(framenumbers_input, timeslots_input, bursts_input)
decryption = grgsm.decryption((key), a5_version)
- dst = grgsm.burst_sink_qa()
+ dst = grgsm.burst_sink()
self.tb.msg_connect(src, "out", decryption, "bursts")
self.tb.msg_connect(decryption, "bursts", dst, "in")
@@ -138,9 +138,9 @@
key = [0x41,0xBC,0x19,0x30,0xB6,0x31,0x8A,0xC8]
a5_version = 3
- src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+ src = grgsm.burst_source(framenumbers_input, timeslots_input, bursts_input)
decryption = grgsm.decryption((key), a5_version)
- dst = grgsm.burst_sink_qa()
+ dst = grgsm.burst_sink()
self.tb.msg_connect(src, "out", decryption, "bursts")
self.tb.msg_connect(decryption, "bursts", dst, "in")
@@ -179,9 +179,9 @@
key = [0xAD,0x2C,0xB3,0x83,0x2F,0x4A,0x6C,0xF1]
a5_version = 3
- src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+ src = grgsm.burst_source(framenumbers_input, timeslots_input, bursts_input)
decryption = grgsm.decryption((key), a5_version)
- dst = grgsm.burst_sink_qa()
+ dst = grgsm.burst_sink()
self.tb.msg_connect(src, "out", decryption, "bursts")
self.tb.msg_connect(decryption, "bursts", dst, "in")
diff --git a/swig/grgsm_swig.i b/swig/grgsm_swig.i
index fbc4151..36a4415 100644
--- a/swig/grgsm_swig.i
+++ b/swig/grgsm_swig.i
@@ -25,8 +25,8 @@
#include "grgsm/misc_utils/tmsi_dumper.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/burst_sink.h"
+#include "grgsm/qa_utils/burst_source.h"
#include "grgsm/qa_utils/message_source.h"
#include "grgsm/qa_utils/message_sink.h"
%}
@@ -71,10 +71,10 @@
%include "grgsm/misc_utils/tmsi_dumper.h"
GR_SWIG_BLOCK_MAGIC2(gsm, tmsi_dumper);
-%include "grgsm/qa_utils/burst_sink_qa.h"
-GR_SWIG_BLOCK_MAGIC2(gsm, burst_sink_qa);
-%include "grgsm/qa_utils/burst_source_qa.h"
-GR_SWIG_BLOCK_MAGIC2(gsm, burst_source_qa);
+%include "grgsm/qa_utils/burst_sink.h"
+GR_SWIG_BLOCK_MAGIC2(gsm, burst_sink);
+%include "grgsm/qa_utils/burst_source.h"
+GR_SWIG_BLOCK_MAGIC2(gsm, burst_source);
%include "grgsm/qa_utils/message_source.h"
GR_SWIG_BLOCK_MAGIC2(gsm, message_source);
%include "grgsm/qa_utils/message_sink.h"