- renamed garage to bit_slicer

git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@416 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-02-09 10:04:20 +00:00
parent cd4f8ad51d
commit 5451847729
10 changed files with 42 additions and 42 deletions
+1 -1
View File
@@ -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 )
@@ -23,7 +23,7 @@
#endif
#include <gnuradio/io_signature.h>
#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)
{
@@ -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 <jay/garage.h>
#include <jay/bit_slicer.h>
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 */