1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-13 19:50:34 +00:00

Changing names to emphasize that they are complex types

This commit is contained in:
Carles Fernandez 2015-02-04 02:12:37 +01:00
parent 75ee6c1bf5
commit bd01c841c9
6 changed files with 54 additions and 54 deletions

View File

@ -34,8 +34,8 @@
#include <gnuradio/blocks/file_sink.h>
#include <volk/volk.h>
#include "direct_resampler_conditioner_cc.h"
#include "direct_resampler_conditioner_ss.h"
#include "direct_resampler_conditioner_bb.h"
#include "direct_resampler_conditioner_cs.h"
#include "direct_resampler_conditioner_cb.h"
#include "configuration_interface.h"
@ -67,7 +67,7 @@ DirectResamplerConditioner::DirectResamplerConditioner(
else if (item_type_.compare("cshort") == 0)
{
item_size_ = sizeof(lv_16sc_t);
resampler_ = direct_resampler_make_conditioner_ss(sample_freq_in_, sample_freq_out_);
resampler_ = direct_resampler_make_conditioner_cs(sample_freq_in_, sample_freq_out_);
DLOG(INFO) << "sample_freq_in " << sample_freq_in_;
DLOG(INFO) << "sample_freq_out" << sample_freq_out_;
DLOG(INFO) << "Item size " << item_size_;
@ -76,7 +76,7 @@ DirectResamplerConditioner::DirectResamplerConditioner(
else if (item_type_.compare("cbyte") == 0)
{
item_size_ = sizeof(lv_8sc_t);
resampler_ = direct_resampler_make_conditioner_bb(sample_freq_in_, sample_freq_out_);
resampler_ = direct_resampler_make_conditioner_cb(sample_freq_in_, sample_freq_out_);
DLOG(INFO) << "sample_freq_in " << sample_freq_in_;
DLOG(INFO) << "sample_freq_out" << sample_freq_out_;
DLOG(INFO) << "Item size " << item_size_;

View File

@ -19,8 +19,8 @@
set(RESAMPLER_GR_BLOCKS_SOURCES
direct_resampler_conditioner_cc.cc
direct_resampler_conditioner_ss.cc
direct_resampler_conditioner_bb.cc
direct_resampler_conditioner_cs.cc
direct_resampler_conditioner_cb.cc
)
include_directories(

View File

@ -1,5 +1,5 @@
/*!
* \file direct_resampler_conditioner_bb.cc
* \file direct_resampler_conditioner_cb.cc
* \brief Nearest neighborhood resampler with std::complex<signed char>
* input and std::complex<signed char> output
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
@ -32,7 +32,7 @@
*/
#include "direct_resampler_conditioner_bb.h"
#include "direct_resampler_conditioner_cb.h"
#include <algorithm>
#include <iostream>
#include <gnuradio/io_signature.h>
@ -41,18 +41,18 @@
using google::LogMessage;
direct_resampler_conditioner_bb_sptr direct_resampler_make_conditioner_bb(
direct_resampler_conditioner_cb_sptr direct_resampler_make_conditioner_cb(
double sample_freq_in, double sample_freq_out)
{
return direct_resampler_conditioner_bb_sptr(
new direct_resampler_conditioner_bb(sample_freq_in,
return direct_resampler_conditioner_cb_sptr(
new direct_resampler_conditioner_cb(sample_freq_in,
sample_freq_out));
}
direct_resampler_conditioner_bb::direct_resampler_conditioner_bb(
direct_resampler_conditioner_cb::direct_resampler_conditioner_cb(
double sample_freq_in, double sample_freq_out) :
gr::block("direct_resampler_make_conditioner_bb", gr::io_signature::make(1,
gr::block("direct_resampler_make_conditioner_cb", gr::io_signature::make(1,
1, sizeof(lv_8sc_t)), gr::io_signature::make(1, 1, sizeof(lv_8sc_t))),
d_sample_freq_in(sample_freq_in), d_sample_freq_out(
sample_freq_out), d_phase(0), d_lphase(0), d_history(1)
@ -72,12 +72,12 @@ direct_resampler_conditioner_bb::direct_resampler_conditioner_bb(
set_output_multiple(1);
}
direct_resampler_conditioner_bb::~direct_resampler_conditioner_bb()
direct_resampler_conditioner_cb::~direct_resampler_conditioner_cb()
{
}
void direct_resampler_conditioner_bb::forecast(int noutput_items,
void direct_resampler_conditioner_cb::forecast(int noutput_items,
gr_vector_int &ninput_items_required)
{
@ -91,7 +91,7 @@ void direct_resampler_conditioner_bb::forecast(int noutput_items,
}
}
int direct_resampler_conditioner_bb::general_work(int noutput_items,
int direct_resampler_conditioner_cb::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{

View File

@ -1,5 +1,5 @@
/*!
* \file direct_resampler_conditioner_bb.h
* \file direct_resampler_conditioner_cb.h
* \brief Nearest neighborhood resampler with
* std::complex<signed char> input and std::complex<signed char> output
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
@ -29,30 +29,30 @@
* -------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_BB_H
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_BB_H
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CB_H
#include <gnuradio/block.h>
class direct_resampler_conditioner_bb;
typedef boost::shared_ptr<direct_resampler_conditioner_bb>
direct_resampler_conditioner_bb_sptr;
class direct_resampler_conditioner_cb;
typedef boost::shared_ptr<direct_resampler_conditioner_cb>
direct_resampler_conditioner_cb_sptr;
direct_resampler_conditioner_bb_sptr
direct_resampler_make_conditioner_bb(double sample_freq_in,
direct_resampler_conditioner_cb_sptr
direct_resampler_make_conditioner_cb(double sample_freq_in,
double sample_freq_out);
/*!
* \brief This class implements a direct resampler conditioner for std::complex<signed char>
*
* Direct resampling without interpolation
*/
class direct_resampler_conditioner_bb: public gr::block
class direct_resampler_conditioner_cb: public gr::block
{
private:
friend direct_resampler_conditioner_bb_sptr
direct_resampler_make_conditioner_bb(double sample_freq_in,
friend direct_resampler_conditioner_cb_sptr
direct_resampler_make_conditioner_cb(double sample_freq_in,
double sample_freq_out);
double d_sample_freq_in;
@ -62,12 +62,12 @@ private:
unsigned int d_phase_step;
unsigned int d_history;
direct_resampler_conditioner_bb(double sample_freq_in,
direct_resampler_conditioner_cb(double sample_freq_in,
double sample_freq_out);
public:
~direct_resampler_conditioner_bb();
~direct_resampler_conditioner_cb();
unsigned int sample_freq_in() const
{
@ -83,4 +83,4 @@ public:
gr_vector_void_star &output_items);
};
#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_SS_H */
#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H */

View File

@ -1,5 +1,5 @@
/*!
* \file direct_resampler_conditioner_ss.cc
* \file direct_resampler_conditioner_cs.cc
* \brief Nearest neighborhood resampler with
* complex short input and complex short output
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
@ -32,7 +32,7 @@
*/
#include "direct_resampler_conditioner_ss.h"
#include "direct_resampler_conditioner_cs.h"
#include <algorithm>
#include <iostream>
#include <gnuradio/io_signature.h>
@ -41,18 +41,18 @@
using google::LogMessage;
direct_resampler_conditioner_ss_sptr direct_resampler_make_conditioner_ss(
direct_resampler_conditioner_cs_sptr direct_resampler_make_conditioner_cs(
double sample_freq_in, double sample_freq_out)
{
return direct_resampler_conditioner_ss_sptr(
new direct_resampler_conditioner_ss(sample_freq_in,
return direct_resampler_conditioner_cs_sptr(
new direct_resampler_conditioner_cs(sample_freq_in,
sample_freq_out));
}
direct_resampler_conditioner_ss::direct_resampler_conditioner_ss(
direct_resampler_conditioner_cs::direct_resampler_conditioner_cs(
double sample_freq_in, double sample_freq_out) :
gr::block("direct_resampler_make_conditioner_ss", gr::io_signature::make(1,
gr::block("direct_resampler_make_conditioner_cs", gr::io_signature::make(1,
1, sizeof(lv_16sc_t)), gr::io_signature::make(1, 1, sizeof(lv_16sc_t))),
d_sample_freq_in(sample_freq_in), d_sample_freq_out(
sample_freq_out), d_phase(0), d_lphase(0), d_history(1)
@ -72,12 +72,12 @@ direct_resampler_conditioner_ss::direct_resampler_conditioner_ss(
set_output_multiple(1);
}
direct_resampler_conditioner_ss::~direct_resampler_conditioner_ss()
direct_resampler_conditioner_cs::~direct_resampler_conditioner_cs()
{
}
void direct_resampler_conditioner_ss::forecast(int noutput_items,
void direct_resampler_conditioner_cs::forecast(int noutput_items,
gr_vector_int &ninput_items_required)
{
@ -91,7 +91,7 @@ void direct_resampler_conditioner_ss::forecast(int noutput_items,
}
}
int direct_resampler_conditioner_ss::general_work(int noutput_items,
int direct_resampler_conditioner_cs::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{

View File

@ -1,5 +1,5 @@
/*!
* \file direct_resampler_conditioner_ss.h
* \file direct_resampler_conditioner_cs.h
* \brief Nearest neighborhood resampler with
* std::complex<short> input and std::complex<short> output
* \author Luis Esteve, 2011. luis(at)epsilon-formacion.com
@ -29,30 +29,30 @@
* -------------------------------------------------------------------------
*/
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_SS_H
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_SS_H
#ifndef GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H
#define GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H
#include <gnuradio/block.h>
class direct_resampler_conditioner_ss;
typedef boost::shared_ptr<direct_resampler_conditioner_ss>
direct_resampler_conditioner_ss_sptr;
class direct_resampler_conditioner_cs;
typedef boost::shared_ptr<direct_resampler_conditioner_cs>
direct_resampler_conditioner_cs_sptr;
direct_resampler_conditioner_ss_sptr
direct_resampler_make_conditioner_ss(double sample_freq_in,
direct_resampler_conditioner_cs_sptr
direct_resampler_make_conditioner_cs(double sample_freq_in,
double sample_freq_out);
/*!
* \brief This class implements a direct resampler conditioner for std::complex<short>
*
* Direct resampling without interpolation
*/
class direct_resampler_conditioner_ss: public gr::block
class direct_resampler_conditioner_cs: public gr::block
{
private:
friend direct_resampler_conditioner_ss_sptr
direct_resampler_make_conditioner_ss(double sample_freq_in,
friend direct_resampler_conditioner_cs_sptr
direct_resampler_make_conditioner_cs(double sample_freq_in,
double sample_freq_out);
double d_sample_freq_in;
@ -62,12 +62,12 @@ private:
unsigned int d_phase_step;
unsigned int d_history;
direct_resampler_conditioner_ss(double sample_freq_in,
direct_resampler_conditioner_cs(double sample_freq_in,
double sample_freq_out);
public:
~direct_resampler_conditioner_ss();
~direct_resampler_conditioner_cs();
unsigned int sample_freq_in() const
{
@ -83,4 +83,4 @@ public:
gr_vector_void_star &output_items);
};
#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_SS_H */
#endif /* GNSS_SDR_DIRECT_RESAMPLER_CONDITIONER_CS_H */