diff --git a/gr-jay/grc/CMakeLists.txt b/gr-jay/grc/CMakeLists.txt index dbbc941..ff4bead 100644 --- a/gr-jay/grc/CMakeLists.txt +++ b/gr-jay/grc/CMakeLists.txt @@ -20,6 +20,6 @@ install(FILES jay_square_ff.xml jay_square2_ff.xml - jay_garage.xml + jay_bit_slicer.xml jay_pocsag_decoder.xml DESTINATION share/gnuradio/grc/blocks ) diff --git a/gr-jay/grc/jay_garage.xml b/gr-jay/grc/jay_bit_slicer.xml similarity index 87% rename from gr-jay/grc/jay_garage.xml rename to gr-jay/grc/jay_bit_slicer.xml index 09961c2..2c6a208 100644 --- a/gr-jay/grc/jay_garage.xml +++ b/gr-jay/grc/jay_bit_slicer.xml @@ -1,9 +1,9 @@ - Garage - jay_garage + Bit Slicer + jay_bit_slicer [JAY] import jay - jay.garage($sampleRate, $samplesPerSym, $kLoopFilter, $kThreshold) + jay.bit_slicer($sampleRate, $samplesPerSym, $kLoopFilter, $kThreshold) Samplerate sampleRate diff --git a/gr-jay/include/jay/CMakeLists.txt b/gr-jay/include/jay/CMakeLists.txt index 2dc1708..50b959d 100644 --- a/gr-jay/include/jay/CMakeLists.txt +++ b/gr-jay/include/jay/CMakeLists.txt @@ -25,6 +25,6 @@ install(FILES api.h square_ff.h square2_ff.h - garage.h + bit_slicer.h pocsag_decoder.h DESTINATION include/jay ) diff --git a/gr-jay/include/jay/garage.h b/gr-jay/include/jay/bit_slicer.h similarity index 74% rename from gr-jay/include/jay/garage.h rename to gr-jay/include/jay/bit_slicer.h index 1e075b1..7a14ab2 100644 --- a/gr-jay/include/jay/garage.h +++ b/gr-jay/include/jay/bit_slicer.h @@ -19,8 +19,8 @@ */ -#ifndef INCLUDED_JAY_GARAGE_H -#define INCLUDED_JAY_GARAGE_H +#ifndef INCLUDED_JAY_BIT_SLICER_H +#define INCLUDED_JAY_BIT_SLICER_H #include #include @@ -33,17 +33,17 @@ namespace gr { * \ingroup jay * */ - class JAY_API garage : virtual public gr::block + class JAY_API bit_slicer : virtual public gr::block { public: - typedef boost::shared_ptr sptr; + typedef boost::shared_ptr sptr; /*! - * \brief Return a shared_ptr to a new instance of jay::garage. + * \brief Return a shared_ptr to a new instance of jay::bit_slicer. * - * To avoid accidental use of raw pointers, jay::garage's + * To avoid accidental use of raw pointers, jay::bit_slicer's * constructor is in a private implementation - * class. jay::garage::make is the public interface for + * class. jay::bit_slicer::make is the public interface for * creating new instances. */ static sptr make(int sampleRate, int samplesPerSym, float kLoopfilter, float kThreshold); @@ -52,5 +52,5 @@ namespace gr { } // namespace jay } // namespace gr -#endif /* INCLUDED_JAY_GARAGE_H */ +#endif /* INCLUDED_JAY_BIT_SLICER_H */ diff --git a/gr-jay/lib/CMakeLists.txt b/gr-jay/lib/CMakeLists.txt index 4c7ede5..e031fb5 100644 --- a/gr-jay/lib/CMakeLists.txt +++ b/gr-jay/lib/CMakeLists.txt @@ -28,7 +28,7 @@ link_directories(${Boost_LIBRARY_DIRS}) list(APPEND jay_sources square_ff_impl.cc square2_ff_impl.cc - garage_impl.cc + bit_slicer_impl.cc PocsagDecoder.cpp pocsag_decoder_impl.cc ) diff --git a/gr-jay/lib/garage_impl.cc b/gr-jay/lib/bit_slicer_impl.cc similarity index 85% rename from gr-jay/lib/garage_impl.cc rename to gr-jay/lib/bit_slicer_impl.cc index faf7f4c..7116deb 100644 --- a/gr-jay/lib/garage_impl.cc +++ b/gr-jay/lib/bit_slicer_impl.cc @@ -23,7 +23,7 @@ #endif #include -#include "garage_impl.h" +#include "bit_slicer_impl.h" #define WITH_PRINT_PACKETS 0 #define WITH_DEBUG_MESSAGES 0 @@ -34,16 +34,16 @@ namespace gr namespace jay { -garage::sptr garage::make(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold) +bit_slicer::sptr bit_slicer::make(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold) { - return gnuradio::get_initial_sptr(new garage_impl(sampleRate, samplesPerSym, kLoopFilter, kThreshold)); + return gnuradio::get_initial_sptr(new bit_slicer_impl(sampleRate, samplesPerSym, kLoopFilter, kThreshold)); } /* * The private constructor */ -garage_impl::garage_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold) -: gr::block("garage", gr::io_signature::make(1, 1, sizeof(float)), +bit_slicer_impl::bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold) +: gr::block("bit_slicer", gr::io_signature::make(1, 1, sizeof(float)), gr::io_signature::make(1, 1, sizeof(float))) , m_sampleRate(sampleRate) , m_samplesPerSym(samplesPerSym) @@ -76,23 +76,23 @@ garage_impl::garage_impl(int sampleRate, int samplesPerSym, float kLoopFilter, f /* * Our virtual destructor. */ -garage_impl::~garage_impl() +bit_slicer_impl::~bit_slicer_impl() { } -bool garage_impl::start() +bool bit_slicer_impl::start() { - fprintf(stderr, "Opening garage\n"); + fprintf(stderr, "Opening bit_slicer\n"); #if WITH_DEBUG_FILE - m_pFile_y = fopen("/home/jens/garage_y.dat", "w"); - m_pFile_bits = fopen("/home/jens/garage_bits.dat", "w"); + m_pFile_y = fopen("/home/jens/bit_slicer_y.dat", "w"); + m_pFile_bits = fopen("/home/jens/bit_slicer_bits.dat", "w"); #endif return true; } -bool garage_impl::stop() +bool bit_slicer_impl::stop() { - fprintf(stderr, "Closing garage\n"); + fprintf(stderr, "Closing Bit Slicer\n"); if (m_pFile_y) { fclose(m_pFile_y); @@ -104,12 +104,12 @@ bool garage_impl::stop() return true; } -void garage_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required) +void bit_slicer_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required) { ninput_items_required[0] = m_samplesPerSym*noutput_items; } -int garage_impl::general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) +int bit_slicer_impl::general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { const float *in = (const float *) input_items[0]; float *out = (float *) output_items[0]; @@ -307,7 +307,7 @@ int garage_impl::general_work (int noutput_items, gr_vector_int &ninput_items, g return outCount; } -void garage_impl::bitsPrint() +void bit_slicer_impl::bitsPrint() { for (int k=0; k < m_bitCounter; k++) { @@ -317,7 +317,7 @@ void garage_impl::bitsPrint() printf("Recorded %d bits\n", m_bitCounter); } -void garage_impl::bitRecord(int bit) +void bit_slicer_impl::bitRecord(int bit) { if (m_bitCounter < sizeof(m_bits)/sizeof(*m_bits)) { @@ -325,7 +325,7 @@ void garage_impl::bitRecord(int bit) } } -void garage_impl::bitProcessGap(int bitChg) +void bit_slicer_impl::bitProcessGap(int bitChg) { if (bitChg) { diff --git a/gr-jay/lib/garage_impl.h b/gr-jay/lib/bit_slicer_impl.h similarity index 86% rename from gr-jay/lib/garage_impl.h rename to gr-jay/lib/bit_slicer_impl.h index 9fe1cc9..32fddb6 100644 --- a/gr-jay/lib/garage_impl.h +++ b/gr-jay/lib/bit_slicer_impl.h @@ -18,17 +18,17 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_JAY_GARAGE_IMPL_H -#define INCLUDED_JAY_GARAGE_IMPL_H +#ifndef INCLUDED_JAY_BIT_SLICER_IMPL_H +#define INCLUDED_JAY_BIT_SLICER_IMPL_H -#include +#include namespace gr { namespace jay { -class garage_impl : public garage +class bit_slicer_impl : public bit_slicer { private: int m_sampleRate; @@ -66,8 +66,8 @@ class garage_impl : public garage bool stop() override; public: - garage_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold); - ~garage_impl(); + bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold); + ~bit_slicer_impl(); // Where all the action really happens void forecast (int noutput_items, gr_vector_int &ninput_items_required); @@ -81,5 +81,5 @@ class garage_impl : public garage } // namespace jay } // namespace gr -#endif /* INCLUDED_JAY_GARAGE_IMPL_H */ +#endif /* INCLUDED_JAY_BIT_SLICER_IMPL_H */ diff --git a/gr-jay/python/CMakeLists.txt b/gr-jay/python/CMakeLists.txt index 19f4e53..07547ae 100644 --- a/gr-jay/python/CMakeLists.txt +++ b/gr-jay/python/CMakeLists.txt @@ -44,5 +44,5 @@ set(GR_TEST_TARGET_DEPS gnuradio-jay) set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig) GR_ADD_TEST(qa_square_ff ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_square_ff.py) GR_ADD_TEST(qa_square2_ff ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_square2_ff.py) -GR_ADD_TEST(qa_garage ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_garage.py) +GR_ADD_TEST(qa_bit_slicer ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_bit_slicer.py) GR_ADD_TEST(qa_pocsag_decoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_pocsag_decoder.py) diff --git a/gr-jay/python/qa_garage.py b/gr-jay/python/qa_bit_slicer.py similarity index 100% rename from gr-jay/python/qa_garage.py rename to gr-jay/python/qa_bit_slicer.py diff --git a/gr-jay/swig/jay_swig.i b/gr-jay/swig/jay_swig.i index 54f57c9..0cd5a77 100644 --- a/gr-jay/swig/jay_swig.i +++ b/gr-jay/swig/jay_swig.i @@ -10,7 +10,7 @@ %{ #include "jay/square_ff.h" #include "jay/square2_ff.h" -#include "jay/garage.h" +#include "jay/bit_slicer.h" #include "jay/pocsag_decoder.h" %} @@ -19,8 +19,8 @@ GR_SWIG_BLOCK_MAGIC2(jay, square_ff); %include "jay/square2_ff.h" GR_SWIG_BLOCK_MAGIC2(jay, square2_ff); -%include "jay/garage.h" -GR_SWIG_BLOCK_MAGIC2(jay, garage); +%include "jay/bit_slicer.h" +GR_SWIG_BLOCK_MAGIC2(jay, bit_slicer); %include "jay/pocsag_decoder.h" GR_SWIG_BLOCK_MAGIC2(jay, pocsag_decoder);