From cd4f8ad51d883ef45f4514885f07d6e26fd2839e Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sat, 9 Feb 2019 09:43:48 +0000 Subject: [PATCH] - renamed preamble_sync to pocsag_decoder git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@415 b431acfa-c32f-4a4a-93f1-934dc6c82436 --- gr-jay/grc/CMakeLists.txt | 2 +- ...reamble_sync.xml => jay_pocsag_decoder.xml} | 6 +++--- gr-jay/include/jay/CMakeLists.txt | 2 +- .../jay/{preamble_sync.h => pocsag_decoder.h} | 16 ++++++++-------- gr-jay/lib/CMakeLists.txt | 2 +- ...ble_sync_impl.cc => pocsag_decoder_impl.cc} | 18 +++++++++--------- ...amble_sync_impl.h => pocsag_decoder_impl.h} | 14 +++++++------- gr-jay/python/CMakeLists.txt | 2 +- ...a_preamble_sync.py => qa_pocsag_decoder.py} | 0 gr-jay/swig/jay_swig.i | 6 +++--- 10 files changed, 34 insertions(+), 34 deletions(-) rename gr-jay/grc/{jay_preamble_sync.xml => jay_pocsag_decoder.xml} (66%) rename gr-jay/include/jay/{preamble_sync.h => pocsag_decoder.h} (71%) rename gr-jay/lib/{preamble_sync_impl.cc => pocsag_decoder_impl.cc} (84%) rename gr-jay/lib/{preamble_sync_impl.h => pocsag_decoder_impl.h} (85%) rename gr-jay/python/{qa_preamble_sync.py => qa_pocsag_decoder.py} (100%) diff --git a/gr-jay/grc/CMakeLists.txt b/gr-jay/grc/CMakeLists.txt index 7d8432d..dbbc941 100644 --- a/gr-jay/grc/CMakeLists.txt +++ b/gr-jay/grc/CMakeLists.txt @@ -21,5 +21,5 @@ install(FILES jay_square_ff.xml jay_square2_ff.xml jay_garage.xml - jay_preamble_sync.xml DESTINATION share/gnuradio/grc/blocks + jay_pocsag_decoder.xml DESTINATION share/gnuradio/grc/blocks ) diff --git a/gr-jay/grc/jay_preamble_sync.xml b/gr-jay/grc/jay_pocsag_decoder.xml similarity index 66% rename from gr-jay/grc/jay_preamble_sync.xml rename to gr-jay/grc/jay_pocsag_decoder.xml index c1b1d60..845fe3f 100644 --- a/gr-jay/grc/jay_preamble_sync.xml +++ b/gr-jay/grc/jay_pocsag_decoder.xml @@ -1,9 +1,9 @@ - Preamble Synchronizer - jay_preamble_sync + POCSAG Decoder + jay_pocsag_decoder [JAY] import jay - jay.preamble_sync() + jay.pocsag_decoder() in byte diff --git a/gr-jay/include/jay/CMakeLists.txt b/gr-jay/include/jay/CMakeLists.txt index 76c0d23..2dc1708 100644 --- a/gr-jay/include/jay/CMakeLists.txt +++ b/gr-jay/include/jay/CMakeLists.txt @@ -26,5 +26,5 @@ install(FILES square_ff.h square2_ff.h garage.h - preamble_sync.h DESTINATION include/jay + pocsag_decoder.h DESTINATION include/jay ) diff --git a/gr-jay/include/jay/preamble_sync.h b/gr-jay/include/jay/pocsag_decoder.h similarity index 71% rename from gr-jay/include/jay/preamble_sync.h rename to gr-jay/include/jay/pocsag_decoder.h index a44e508..599bddb 100644 --- a/gr-jay/include/jay/preamble_sync.h +++ b/gr-jay/include/jay/pocsag_decoder.h @@ -19,8 +19,8 @@ */ -#ifndef INCLUDED_JAY_PREAMBLE_SYNC_H -#define INCLUDED_JAY_PREAMBLE_SYNC_H +#ifndef INCLUDED_JAY_POCSAG_DECODER_H +#define INCLUDED_JAY_POCSAG_DECODER_H #include #include @@ -33,17 +33,17 @@ namespace gr { * \ingroup jay * */ - class JAY_API preamble_sync : virtual public gr::block + class JAY_API pocsag_decoder : 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::preamble_sync. + * \brief Return a shared_ptr to a new instance of jay::pocsag_decoder. * - * To avoid accidental use of raw pointers, jay::preamble_sync's + * To avoid accidental use of raw pointers, jay::pocsag_decoder's * constructor is in a private implementation - * class. jay::preamble_sync::make is the public interface for + * class. jay::pocsag_decoder::make is the public interface for * creating new instances. */ static sptr make(); @@ -52,5 +52,5 @@ namespace gr { } // namespace jay } // namespace gr -#endif /* INCLUDED_JAY_PREAMBLE_SYNC_H */ +#endif /* INCLUDED_JAY_POCSAG_DECODER_H */ diff --git a/gr-jay/lib/CMakeLists.txt b/gr-jay/lib/CMakeLists.txt index 33b3152..4c7ede5 100644 --- a/gr-jay/lib/CMakeLists.txt +++ b/gr-jay/lib/CMakeLists.txt @@ -30,7 +30,7 @@ list(APPEND jay_sources square2_ff_impl.cc garage_impl.cc PocsagDecoder.cpp - preamble_sync_impl.cc ) + pocsag_decoder_impl.cc ) set(jay_sources "${jay_sources}" PARENT_SCOPE) if(NOT jay_sources) diff --git a/gr-jay/lib/preamble_sync_impl.cc b/gr-jay/lib/pocsag_decoder_impl.cc similarity index 84% rename from gr-jay/lib/preamble_sync_impl.cc rename to gr-jay/lib/pocsag_decoder_impl.cc index 40a2f70..eba9daf 100644 --- a/gr-jay/lib/preamble_sync_impl.cc +++ b/gr-jay/lib/pocsag_decoder_impl.cc @@ -23,7 +23,7 @@ #endif #include -#include "preamble_sync_impl.h" +#include "pocsag_decoder_impl.h" #define WITH_DEBUG_MESSAGES 0 @@ -32,18 +32,18 @@ namespace gr namespace jay { -preamble_sync::sptr preamble_sync::make() +pocsag_decoder::sptr pocsag_decoder::make() { - return gnuradio::get_initial_sptr (new preamble_sync_impl()); + return gnuradio::get_initial_sptr (new pocsag_decoder_impl()); } -const char* preamble_sync_impl::stateNames[NUM_STATES] = {"PreambleSlow", "SyncSlow", "DataSlow", "PreambleFast", "SyncFast", "DataFast"}; +const char* pocsag_decoder_impl::stateNames[NUM_STATES] = {"PreambleSlow", "SyncSlow", "DataSlow", "PreambleFast", "SyncFast", "DataFast"}; /* * The private constructor */ -preamble_sync_impl::preamble_sync_impl() -: gr::block("preamble_sync", gr::io_signature::make(1, 1, sizeof(uint8_t)), gr::io_signature::make(1, 1, sizeof(uint8_t))) +pocsag_decoder_impl::pocsag_decoder_impl() +: gr::block("pocsag_decoder", gr::io_signature::make(1, 1, sizeof(uint8_t)), gr::io_signature::make(1, 1, sizeof(uint8_t))) , m_state(PreambleSlow) , m_stateNext(PreambleSlow) , m_word(0) @@ -57,16 +57,16 @@ preamble_sync_impl::preamble_sync_impl() /* * Our virtual destructor. */ -preamble_sync_impl::~preamble_sync_impl() +pocsag_decoder_impl::~pocsag_decoder_impl() { } -void preamble_sync_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required) +void pocsag_decoder_impl::forecast (int noutput_items, gr_vector_int &ninput_items_required) { ninput_items_required[0] = 8*noutput_items; } -int preamble_sync_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 pocsag_decoder_impl::general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { uint8_t zero = 0x01; const uint8_t fastSyncWord[4] = {0x7C, 0xD2, 0x15, 0xD8}; diff --git a/gr-jay/lib/preamble_sync_impl.h b/gr-jay/lib/pocsag_decoder_impl.h similarity index 85% rename from gr-jay/lib/preamble_sync_impl.h rename to gr-jay/lib/pocsag_decoder_impl.h index f1e93ba..5a5a226 100644 --- a/gr-jay/lib/preamble_sync_impl.h +++ b/gr-jay/lib/pocsag_decoder_impl.h @@ -18,10 +18,10 @@ * Boston, MA 02110-1301, USA. */ -#ifndef INCLUDED_JAY_PREAMBLE_SYNC_IMPL_H -#define INCLUDED_JAY_PREAMBLE_SYNC_IMPL_H +#ifndef INCLUDED_JAY_POCSAG_DECODER_IMPL_H +#define INCLUDED_JAY_POCSAG_DECODER_IMPL_H -#include +#include #include "PocsagDecoder.hpp" namespace gr @@ -29,7 +29,7 @@ namespace gr namespace jay { -class preamble_sync_impl : public preamble_sync +class pocsag_decoder_impl : public pocsag_decoder { private: enum State @@ -57,8 +57,8 @@ class preamble_sync_impl : public preamble_sync PocsagDecoder dec; public: - preamble_sync_impl(); - ~preamble_sync_impl(); + pocsag_decoder_impl(); + ~pocsag_decoder_impl(); // Where all the action really happens void forecast (int noutput_items, gr_vector_int &ninput_items_required); @@ -72,5 +72,5 @@ class preamble_sync_impl : public preamble_sync } // namespace jay } // namespace gr -#endif /* INCLUDED_JAY_PREAMBLE_SYNC_IMPL_H */ +#endif /* INCLUDED_JAY_POCSAG_DECODER_IMPL_H */ diff --git a/gr-jay/python/CMakeLists.txt b/gr-jay/python/CMakeLists.txt index 92c5cc9..19f4e53 100644 --- a/gr-jay/python/CMakeLists.txt +++ b/gr-jay/python/CMakeLists.txt @@ -45,4 +45,4 @@ 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_preamble_sync ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_preamble_sync.py) +GR_ADD_TEST(qa_pocsag_decoder ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_pocsag_decoder.py) diff --git a/gr-jay/python/qa_preamble_sync.py b/gr-jay/python/qa_pocsag_decoder.py similarity index 100% rename from gr-jay/python/qa_preamble_sync.py rename to gr-jay/python/qa_pocsag_decoder.py diff --git a/gr-jay/swig/jay_swig.i b/gr-jay/swig/jay_swig.i index e3e2289..54f57c9 100644 --- a/gr-jay/swig/jay_swig.i +++ b/gr-jay/swig/jay_swig.i @@ -11,7 +11,7 @@ #include "jay/square_ff.h" #include "jay/square2_ff.h" #include "jay/garage.h" -#include "jay/preamble_sync.h" +#include "jay/pocsag_decoder.h" %} @@ -22,5 +22,5 @@ GR_SWIG_BLOCK_MAGIC2(jay, square2_ff); %include "jay/garage.h" GR_SWIG_BLOCK_MAGIC2(jay, garage); -%include "jay/preamble_sync.h" -GR_SWIG_BLOCK_MAGIC2(jay, preamble_sync); +%include "jay/pocsag_decoder.h" +GR_SWIG_BLOCK_MAGIC2(jay, pocsag_decoder);