- renamed preamble_sync to pocsag_decoder

git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@415 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-02-09 09:43:48 +00:00
parent cb8a024ef0
commit cd4f8ad51d
10 changed files with 34 additions and 34 deletions
+1 -1
View File
@@ -21,5 +21,5 @@ install(FILES
jay_square_ff.xml jay_square_ff.xml
jay_square2_ff.xml jay_square2_ff.xml
jay_garage.xml jay_garage.xml
jay_preamble_sync.xml DESTINATION share/gnuradio/grc/blocks jay_pocsag_decoder.xml DESTINATION share/gnuradio/grc/blocks
) )
@@ -1,9 +1,9 @@
<block> <block>
<name>Preamble Synchronizer</name> <name>POCSAG Decoder</name>
<key>jay_preamble_sync</key> <key>jay_pocsag_decoder</key>
<category>[JAY]</category> <category>[JAY]</category>
<import>import jay</import> <import>import jay</import>
<make>jay.preamble_sync()</make> <make>jay.pocsag_decoder()</make>
<sink> <sink>
<name>in</name> <name>in</name>
<type>byte</type> <type>byte</type>
+1 -1
View File
@@ -26,5 +26,5 @@ install(FILES
square_ff.h square_ff.h
square2_ff.h square2_ff.h
garage.h garage.h
preamble_sync.h DESTINATION include/jay pocsag_decoder.h DESTINATION include/jay
) )
@@ -19,8 +19,8 @@
*/ */
#ifndef INCLUDED_JAY_PREAMBLE_SYNC_H #ifndef INCLUDED_JAY_POCSAG_DECODER_H
#define INCLUDED_JAY_PREAMBLE_SYNC_H #define INCLUDED_JAY_POCSAG_DECODER_H
#include <jay/api.h> #include <jay/api.h>
#include <gnuradio/block.h> #include <gnuradio/block.h>
@@ -33,17 +33,17 @@ namespace gr {
* \ingroup jay * \ingroup jay
* *
*/ */
class JAY_API preamble_sync : virtual public gr::block class JAY_API pocsag_decoder : virtual public gr::block
{ {
public: public:
typedef boost::shared_ptr<preamble_sync> sptr; typedef boost::shared_ptr<pocsag_decoder> 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 * 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. * creating new instances.
*/ */
static sptr make(); static sptr make();
@@ -52,5 +52,5 @@ namespace gr {
} // namespace jay } // namespace jay
} // namespace gr } // namespace gr
#endif /* INCLUDED_JAY_PREAMBLE_SYNC_H */ #endif /* INCLUDED_JAY_POCSAG_DECODER_H */
+1 -1
View File
@@ -30,7 +30,7 @@ list(APPEND jay_sources
square2_ff_impl.cc square2_ff_impl.cc
garage_impl.cc garage_impl.cc
PocsagDecoder.cpp PocsagDecoder.cpp
preamble_sync_impl.cc ) pocsag_decoder_impl.cc )
set(jay_sources "${jay_sources}" PARENT_SCOPE) set(jay_sources "${jay_sources}" PARENT_SCOPE)
if(NOT jay_sources) if(NOT jay_sources)
@@ -23,7 +23,7 @@
#endif #endif
#include <gnuradio/io_signature.h> #include <gnuradio/io_signature.h>
#include "preamble_sync_impl.h" #include "pocsag_decoder_impl.h"
#define WITH_DEBUG_MESSAGES 0 #define WITH_DEBUG_MESSAGES 0
@@ -32,18 +32,18 @@ namespace gr
namespace jay 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 * The private constructor
*/ */
preamble_sync_impl::preamble_sync_impl() pocsag_decoder_impl::pocsag_decoder_impl()
: gr::block("preamble_sync", gr::io_signature::make(1, 1, sizeof(uint8_t)), gr::io_signature::make(1, 1, sizeof(uint8_t))) : 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_state(PreambleSlow)
, m_stateNext(PreambleSlow) , m_stateNext(PreambleSlow)
, m_word(0) , m_word(0)
@@ -57,16 +57,16 @@ preamble_sync_impl::preamble_sync_impl()
/* /*
* Our virtual destructor. * 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; 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; uint8_t zero = 0x01;
const uint8_t fastSyncWord[4] = {0x7C, 0xD2, 0x15, 0xD8}; const uint8_t fastSyncWord[4] = {0x7C, 0xD2, 0x15, 0xD8};
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
#ifndef INCLUDED_JAY_PREAMBLE_SYNC_IMPL_H #ifndef INCLUDED_JAY_POCSAG_DECODER_IMPL_H
#define INCLUDED_JAY_PREAMBLE_SYNC_IMPL_H #define INCLUDED_JAY_POCSAG_DECODER_IMPL_H
#include <jay/preamble_sync.h> #include <jay/pocsag_decoder.h>
#include "PocsagDecoder.hpp" #include "PocsagDecoder.hpp"
namespace gr namespace gr
@@ -29,7 +29,7 @@ namespace gr
namespace jay namespace jay
{ {
class preamble_sync_impl : public preamble_sync class pocsag_decoder_impl : public pocsag_decoder
{ {
private: private:
enum State enum State
@@ -57,8 +57,8 @@ class preamble_sync_impl : public preamble_sync
PocsagDecoder dec; PocsagDecoder dec;
public: public:
preamble_sync_impl(); pocsag_decoder_impl();
~preamble_sync_impl(); ~pocsag_decoder_impl();
// Where all the action really happens // Where all the action really happens
void forecast (int noutput_items, gr_vector_int &ninput_items_required); 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 jay
} // namespace gr } // namespace gr
#endif /* INCLUDED_JAY_PREAMBLE_SYNC_IMPL_H */ #endif /* INCLUDED_JAY_POCSAG_DECODER_IMPL_H */
+1 -1
View File
@@ -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_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_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_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)
+3 -3
View File
@@ -11,7 +11,7 @@
#include "jay/square_ff.h" #include "jay/square_ff.h"
#include "jay/square2_ff.h" #include "jay/square2_ff.h"
#include "jay/garage.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" %include "jay/garage.h"
GR_SWIG_BLOCK_MAGIC2(jay, garage); GR_SWIG_BLOCK_MAGIC2(jay, garage);
%include "jay/preamble_sync.h" %include "jay/pocsag_decoder.h"
GR_SWIG_BLOCK_MAGIC2(jay, preamble_sync); GR_SWIG_BLOCK_MAGIC2(jay, pocsag_decoder);