mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-18 21:23:02 +00:00
Sort private members in headers
This commit is contained in:
parent
06ce79490b
commit
03d350551f
@ -29,22 +29,21 @@
|
||||
FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
|
||||
unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
size_t item_size;
|
||||
(*this).init();
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "gr_complex") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
item_size = sizeof(gr_complex);
|
||||
item_size_ = sizeof(gr_complex);
|
||||
fir_filter_ccf_ = gr::filter::fir_filter_ccf::make(1, taps_);
|
||||
DLOG(INFO) << "input_filter(" << fir_filter_ccf_->unique_id() << ")";
|
||||
if (dump_)
|
||||
{
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
}
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "cshort"))
|
||||
{
|
||||
item_size = sizeof(lv_16sc_t);
|
||||
item_size_ = sizeof(lv_16sc_t);
|
||||
cshort_to_float_x2_ = make_cshort_to_float_x2();
|
||||
fir_filter_fff_1_ = gr::filter::fir_filter_fff::make(1, taps_);
|
||||
fir_filter_fff_2_ = gr::filter::fir_filter_fff::make(1, taps_);
|
||||
@ -56,12 +55,12 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
|
||||
if (dump_)
|
||||
{
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
}
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cshort") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
item_size = sizeof(gr_complex);
|
||||
item_size_ = sizeof(gr_complex);
|
||||
cshort_to_float_x2_ = make_cshort_to_float_x2();
|
||||
fir_filter_fff_1_ = gr::filter::fir_filter_fff::make(1, taps_);
|
||||
fir_filter_fff_2_ = gr::filter::fir_filter_fff::make(1, taps_);
|
||||
@ -71,13 +70,13 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
|
||||
if (dump_)
|
||||
{
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "gr_complex"))
|
||||
{
|
||||
item_size = sizeof(gr_complex);
|
||||
item_size_ = sizeof(gr_complex);
|
||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||
|
||||
fir_filter_fff_1_ = gr::filter::fir_filter_fff::make(1, taps_);
|
||||
@ -90,12 +89,12 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
|
||||
if (dump_)
|
||||
{
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
}
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "cbyte") && (output_item_type_ == "cbyte"))
|
||||
{
|
||||
item_size = sizeof(lv_8sc_t);
|
||||
item_size_ = sizeof(lv_8sc_t);
|
||||
cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
|
||||
|
||||
fir_filter_fff_1_ = gr::filter::fir_filter_fff::make(1, taps_);
|
||||
@ -111,7 +110,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
|
||||
if (dump_)
|
||||
{
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -108,6 +108,7 @@ private:
|
||||
std::string output_item_type_;
|
||||
std::string taps_item_type_;
|
||||
std::string role_;
|
||||
size_t item_size_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
bool dump_;
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return 0;
|
||||
return input_size_;
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
|
||||
size_t item_size()
|
||||
{
|
||||
return 0;
|
||||
return item_size_;
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block);
|
||||
@ -66,6 +66,7 @@ private:
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
bool dump_;
|
||||
|
@ -29,7 +29,6 @@
|
||||
NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
size_t item_size_;
|
||||
float p_c_factor;
|
||||
float default_p_c_factor = 0.9;
|
||||
float pfa;
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
|
||||
size_t item_size()
|
||||
{
|
||||
return 0;
|
||||
return item_size_;
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block);
|
||||
@ -66,6 +66,7 @@ private:
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
bool dump_;
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
|
||||
inline size_t item_size() override
|
||||
{
|
||||
return 0;
|
||||
return input_size_;
|
||||
}
|
||||
|
||||
void connect(gr::top_block_sptr top_block) override;
|
||||
|
@ -45,14 +45,14 @@ byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte();
|
||||
*/
|
||||
class byte_x2_to_complex_byte : public gr::sync_block
|
||||
{
|
||||
private:
|
||||
friend byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte();
|
||||
byte_x2_to_complex_byte();
|
||||
|
||||
public:
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte();
|
||||
byte_x2_to_complex_byte();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -45,14 +45,14 @@ complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2();
|
||||
*/
|
||||
class complex_byte_to_float_x2 : public gr::sync_block
|
||||
{
|
||||
private:
|
||||
friend complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2();
|
||||
complex_byte_to_float_x2();
|
||||
|
||||
public:
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2();
|
||||
complex_byte_to_float_x2();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -44,14 +44,14 @@ complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte();
|
||||
*/
|
||||
class complex_float_to_complex_byte : public gr::sync_block
|
||||
{
|
||||
private:
|
||||
friend complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte();
|
||||
complex_float_to_complex_byte();
|
||||
|
||||
public:
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte();
|
||||
complex_float_to_complex_byte();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -44,14 +44,14 @@ conjugate_cc_sptr make_conjugate_cc();
|
||||
*/
|
||||
class conjugate_cc : public gr::sync_block
|
||||
{
|
||||
private:
|
||||
friend conjugate_cc_sptr make_conjugate_cc();
|
||||
conjugate_cc();
|
||||
|
||||
public:
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend conjugate_cc_sptr make_conjugate_cc();
|
||||
conjugate_cc();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -44,14 +44,14 @@ conjugate_ic_sptr make_conjugate_ic();
|
||||
*/
|
||||
class conjugate_ic : public gr::sync_block
|
||||
{
|
||||
private:
|
||||
friend conjugate_ic_sptr make_conjugate_ic();
|
||||
conjugate_ic();
|
||||
|
||||
public:
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend conjugate_ic_sptr make_conjugate_ic();
|
||||
conjugate_ic();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -44,14 +44,14 @@ conjugate_sc_sptr make_conjugate_sc();
|
||||
*/
|
||||
class conjugate_sc : public gr::sync_block
|
||||
{
|
||||
private:
|
||||
friend conjugate_sc_sptr make_conjugate_sc();
|
||||
conjugate_sc();
|
||||
|
||||
public:
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend conjugate_sc_sptr make_conjugate_sc();
|
||||
conjugate_sc();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -45,14 +45,14 @@ cshort_to_float_x2_sptr make_cshort_to_float_x2();
|
||||
*/
|
||||
class cshort_to_float_x2 : public gr::sync_block
|
||||
{
|
||||
private:
|
||||
friend cshort_to_float_x2_sptr make_cshort_to_float_x2();
|
||||
cshort_to_float_x2();
|
||||
|
||||
public:
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend cshort_to_float_x2_sptr make_cshort_to_float_x2();
|
||||
cshort_to_float_x2();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -44,14 +44,14 @@ short_x2_to_cshort_sptr make_short_x2_to_cshort();
|
||||
*/
|
||||
class short_x2_to_cshort : public gr::sync_block
|
||||
{
|
||||
private:
|
||||
friend short_x2_to_cshort_sptr make_short_x2_to_cshort();
|
||||
short_x2_to_cshort();
|
||||
|
||||
public:
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items,
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend short_x2_to_cshort_sptr make_short_x2_to_cshort();
|
||||
short_x2_to_cshort();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -77,27 +77,28 @@ public:
|
||||
gr::basic_block_sptr get_right_block(int RF_channel) override;
|
||||
|
||||
private:
|
||||
std::string role_;
|
||||
Gr_Complex_Ip_Packet_Source::sptr udp_gnss_rx_source_;
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
std::vector<std::shared_ptr<gr::block>> null_sinks_;
|
||||
std::vector<std::shared_ptr<gr::block>> file_sink_;
|
||||
#else
|
||||
std::vector<boost::shared_ptr<gr::block>> null_sinks_;
|
||||
std::vector<boost::shared_ptr<gr::block>> file_sink_;
|
||||
#endif
|
||||
|
||||
std::string role_;
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
|
||||
size_t item_size_;
|
||||
|
||||
bool IQ_swap_;
|
||||
int RF_channels_;
|
||||
int channels_in_udp_;
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
std::vector<std::shared_ptr<gr::block>> null_sinks_;
|
||||
std::vector<std::shared_ptr<gr::block>> file_sink_;
|
||||
#else
|
||||
std::vector<boost::shared_ptr<gr::block>> null_sinks_;
|
||||
std::vector<boost::shared_ptr<gr::block>> file_sink_;
|
||||
#endif
|
||||
|
||||
Gr_Complex_Ip_Packet_Source::sptr udp_gnss_rx_source_;
|
||||
bool IQ_swap_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_CUSTOM_UDP_SIGNAL_SOURCE_H
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
@ -68,16 +69,16 @@ public:
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
private:
|
||||
std::string role_;
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
long samples_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
gr::block_sptr gn3s_source_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
std::string role_;
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
size_t item_size_;
|
||||
int64_t samples_;
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
bool dump_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_GN3S_SIGNAL_SOURCE_H
|
||||
|
@ -104,24 +104,24 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
uint32_t n_channels_;
|
||||
std::vector<std::string> filename_vec_;
|
||||
std::string item_type_;
|
||||
bool repeat_;
|
||||
std::string role_;
|
||||
uint32_t in_streams_;
|
||||
uint32_t out_streams_;
|
||||
std::vector<gr::blocks::file_source::sptr> file_source_vec_;
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
std::shared_ptr<gr::block> valve_;
|
||||
#else
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
#endif
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
std::shared_ptr<gr::block> valve_;
|
||||
#else
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
#endif
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
std::vector<gr::blocks::throttle::sptr> throttle_vec_;
|
||||
std::vector<std::string> filename_vec_;
|
||||
std::string item_type_;
|
||||
std::string role_;
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
size_t item_size_;
|
||||
uint32_t n_channels_;
|
||||
uint32_t in_streams_;
|
||||
uint32_t out_streams_;
|
||||
bool repeat_;
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
};
|
||||
|
@ -102,16 +102,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
std::string filename_;
|
||||
std::string item_type_;
|
||||
bool repeat_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
uint32_t in_streams_;
|
||||
uint32_t out_streams_;
|
||||
gr::blocks::file_source::sptr file_source_;
|
||||
unpack_byte_2bit_samples_sptr unpack_byte_;
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
@ -121,7 +111,17 @@ private:
|
||||
#endif
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
gr::blocks::throttle::sptr throttle_;
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
size_t item_size_;
|
||||
std::string filename_;
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
uint32_t in_streams_;
|
||||
uint32_t out_streams_;
|
||||
bool repeat_;
|
||||
bool dump_;
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
};
|
||||
|
@ -75,35 +75,6 @@ public:
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
private:
|
||||
std::string role_;
|
||||
|
||||
// Front-end settings
|
||||
std::string uri_; // device direction
|
||||
uint64_t freq_; // frequency of local oscilator
|
||||
uint64_t sample_rate_;
|
||||
uint64_t bandwidth_;
|
||||
uint64_t buffer_size_; // reception buffer
|
||||
bool quadrature_;
|
||||
bool rf_dc_;
|
||||
bool bb_dc_;
|
||||
std::string gain_mode_;
|
||||
double rf_gain_;
|
||||
std::string filter_file_;
|
||||
bool filter_auto_;
|
||||
std::string filter_source_;
|
||||
std::string filter_filename_;
|
||||
float Fpass_;
|
||||
float Fstop_;
|
||||
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
int64_t samples_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
|
||||
gr::iio::pluto_source::sptr plutosdr_source_;
|
||||
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
@ -112,6 +83,34 @@ private:
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
#endif
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
|
||||
std::string role_;
|
||||
std::string dump_filename_;
|
||||
|
||||
// Front-end settings
|
||||
std::string uri_; // device direction
|
||||
std::string gain_mode_;
|
||||
std::string filter_file_;
|
||||
std::string filter_source_;
|
||||
std::string filter_filename_;
|
||||
std::string item_type_;
|
||||
double rf_gain_;
|
||||
int64_t samples_;
|
||||
uint64_t freq_; // frequency of local oscilator
|
||||
uint64_t sample_rate_;
|
||||
uint64_t bandwidth_;
|
||||
uint64_t buffer_size_; // reception buffer
|
||||
size_t item_size_;
|
||||
float Fpass_;
|
||||
float Fstop_;
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
|
||||
bool quadrature_;
|
||||
bool rf_dc_;
|
||||
bool bb_dc_;
|
||||
bool filter_auto_;
|
||||
bool dump_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_PLUTOSDR_SIGNAL_SOURCE_H
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <gnuradio/hier_block2.h>
|
||||
#include <pmt/pmt.h>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
@ -67,17 +68,17 @@ public:
|
||||
gr::basic_block_sptr get_right_block() override;
|
||||
|
||||
private:
|
||||
std::string role_;
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
long samples_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::string eth_device_;
|
||||
gr::block_sptr raw_array_source_;
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
std::string role_;
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
std::string eth_device_;
|
||||
size_t item_size_;
|
||||
int64_t samples_;
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
bool dump_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_RAW_ARRAY_SIGNAL_SOURCE_H
|
||||
|
@ -80,28 +80,6 @@ public:
|
||||
|
||||
private:
|
||||
void MakeBlock();
|
||||
std::string role_;
|
||||
|
||||
// rtl_tcp settings
|
||||
std::string address_;
|
||||
int16_t port_;
|
||||
bool AGC_enabled_;
|
||||
double sample_rate_;
|
||||
bool flip_iq_;
|
||||
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
|
||||
double freq_;
|
||||
double gain_;
|
||||
double if_gain_;
|
||||
double rf_gain_;
|
||||
|
||||
std::string item_type_;
|
||||
size_t item_size_;
|
||||
uint64_t samples_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
|
||||
rtl_tcp_signal_source_c_sptr signal_source_;
|
||||
|
||||
@ -111,6 +89,26 @@ private:
|
||||
boost::shared_ptr<gr::block> valve_;
|
||||
#endif
|
||||
gr::blocks::file_sink::sptr file_sink_;
|
||||
|
||||
std::string role_;
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
|
||||
// rtl_tcp settings
|
||||
std::string address_;
|
||||
size_t item_size_;
|
||||
uint64_t samples_;
|
||||
double sample_rate_;
|
||||
double freq_;
|
||||
double gain_;
|
||||
double if_gain_;
|
||||
double rf_gain_;
|
||||
unsigned int in_stream_;
|
||||
unsigned int out_stream_;
|
||||
int16_t port_;
|
||||
bool AGC_enabled_;
|
||||
bool flip_iq_;
|
||||
bool dump_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_RTL_TCP_SIGNAL_SOURCE_H
|
||||
|
@ -100,16 +100,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
std::string filename_;
|
||||
std::string item_type_;
|
||||
bool repeat_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
gr::blocks::file_source::sptr file_source_;
|
||||
unpack_intspir_1bit_samples_sptr unpack_intspir_;
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
@ -119,7 +109,21 @@ private:
|
||||
#endif
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
gr::blocks::throttle::sptr throttle_;
|
||||
std::string filename_;
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
size_t item_size_;
|
||||
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
|
||||
bool repeat_;
|
||||
bool dump_;
|
||||
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
};
|
||||
|
@ -103,34 +103,34 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
gr::blocks::file_source::sptr file_source_;
|
||||
gr::blocks::deinterleave::sptr deint_;
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
std::vector<std::shared_ptr<gr::block>> valve_vec_;
|
||||
#else
|
||||
std::vector<boost::shared_ptr<gr::block>> valve_vec_;
|
||||
#endif
|
||||
std::vector<gr::blocks::endian_swap::sptr> endian_vec_;
|
||||
std::vector<gr::blocks::null_sink::sptr> null_sinks_;
|
||||
std::vector<unpack_spir_gss6450_samples_sptr> unpack_spir_vec_;
|
||||
std::vector<gr::blocks::file_sink::sptr> sink_vec_;
|
||||
std::vector<gr::blocks::throttle::sptr> throttle_vec_;
|
||||
std::string filename_;
|
||||
bool repeat_;
|
||||
bool dump_; // Enables dumping the gr_complex sample output
|
||||
bool enable_throttle_control_;
|
||||
bool endian_swap_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
std::string item_type_;
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
size_t item_size_;
|
||||
uint32_t in_streams_;
|
||||
uint32_t out_streams_;
|
||||
uint32_t adc_bits_;
|
||||
uint32_t n_channels_;
|
||||
uint32_t sel_ch_;
|
||||
gr::blocks::file_source::sptr file_source_;
|
||||
gr::blocks::deinterleave::sptr deint_;
|
||||
std::vector<gr::blocks::endian_swap::sptr> endian_vec_;
|
||||
std::vector<gr::blocks::null_sink::sptr> null_sinks_;
|
||||
std::vector<unpack_spir_gss6450_samples_sptr> unpack_spir_vec_;
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
std::vector<std::shared_ptr<gr::block>> valve_vec_;
|
||||
#else
|
||||
std::vector<boost::shared_ptr<gr::block>> valve_vec_;
|
||||
#endif
|
||||
std::vector<gr::blocks::file_sink::sptr> sink_vec_;
|
||||
std::vector<gr::blocks::throttle::sptr> throttle_vec_;
|
||||
size_t item_size_;
|
||||
bool repeat_;
|
||||
bool dump_; // Enables dumping the gr_complex sample output
|
||||
bool enable_throttle_control_;
|
||||
bool endian_swap_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_SPIR_GSS6450_FILE_SIGNAL_SOURCE_H
|
||||
|
@ -106,19 +106,9 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
std::string filename_;
|
||||
std::string item_type_;
|
||||
bool repeat_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
gr::blocks::file_source::sptr file_source_;
|
||||
unpack_byte_2bit_cpx_samples_sptr unpack_byte_;
|
||||
gr::blocks::interleaved_short_to_complex::sptr inter_shorts_to_cpx_;
|
||||
unpack_byte_2bit_cpx_samples_sptr unpack_byte_;
|
||||
#if GNURADIO_USES_STD_POINTERS
|
||||
std::shared_ptr<gr::block> valve_;
|
||||
#else
|
||||
@ -126,7 +116,17 @@ private:
|
||||
#endif
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
gr::blocks::throttle::sptr throttle_;
|
||||
std::string filename_;
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
size_t item_size_;
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
bool repeat_;
|
||||
bool dump_;
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
};
|
||||
|
@ -125,16 +125,6 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
std::string filename_;
|
||||
std::string item_type_;
|
||||
bool repeat_;
|
||||
bool dump_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
gr::blocks::file_source::sptr file_source_;
|
||||
unpack_2bit_samples_sptr unpack_samples_;
|
||||
gr::basic_block_sptr char_to_float_;
|
||||
@ -145,12 +135,22 @@ private:
|
||||
#endif
|
||||
gr::blocks::file_sink::sptr sink_;
|
||||
gr::blocks::throttle::sptr throttle_;
|
||||
std::string filename_;
|
||||
std::string item_type_;
|
||||
std::string dump_filename_;
|
||||
std::string role_;
|
||||
std::string sample_type_;
|
||||
uint64_t samples_;
|
||||
int64_t sampling_frequency_;
|
||||
size_t item_size_;
|
||||
unsigned int in_streams_;
|
||||
unsigned int out_streams_;
|
||||
bool big_endian_items_;
|
||||
bool big_endian_bytes_;
|
||||
bool is_complex_;
|
||||
bool reverse_interleaving_;
|
||||
std::string sample_type_;
|
||||
bool repeat_;
|
||||
bool dump_;
|
||||
// Throttle control
|
||||
bool enable_throttle_control_;
|
||||
};
|
||||
|
@ -75,27 +75,6 @@ public:
|
||||
gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
boost::mutex d_mutex;
|
||||
pcap_t *descr; // ethernet pcap device descriptor
|
||||
char *fifo_buff;
|
||||
int fifo_read_ptr;
|
||||
int fifo_write_ptr;
|
||||
int fifo_items;
|
||||
int d_sock_raw;
|
||||
int d_udp_port;
|
||||
// clang-format off
|
||||
struct sockaddr_in si_me{};
|
||||
// clang-format on
|
||||
std::string d_src_device;
|
||||
std::string d_origin_address;
|
||||
int d_udp_payload_size;
|
||||
bool d_fifo_full;
|
||||
int d_n_baseband_channels;
|
||||
int d_wire_sample_type;
|
||||
int d_bytes_per_sample;
|
||||
size_t d_item_size;
|
||||
bool d_IQ_swap;
|
||||
boost::thread *d_pcap_thread;
|
||||
void demux_samples(const gr_vector_void_star &output_items, int num_samples_readed);
|
||||
void my_pcap_loop_thread(pcap_t *pcap_handle);
|
||||
void pcap_callback(u_char *args, const struct pcap_pkthdr *pkthdr, const u_char *packet);
|
||||
@ -105,6 +84,26 @@ private:
|
||||
* If any of these fail, the function returns the error and exits.
|
||||
*/
|
||||
bool open();
|
||||
|
||||
boost::thread *d_pcap_thread;
|
||||
boost::mutex d_mutex;
|
||||
struct sockaddr_in si_me{};
|
||||
std::string d_src_device;
|
||||
std::string d_origin_address;
|
||||
pcap_t *descr; // ethernet pcap device descriptor
|
||||
size_t d_item_size;
|
||||
char *fifo_buff;
|
||||
int fifo_read_ptr;
|
||||
int fifo_write_ptr;
|
||||
int fifo_items;
|
||||
int d_sock_raw;
|
||||
int d_udp_port;
|
||||
int d_udp_payload_size;
|
||||
int d_n_baseband_channels;
|
||||
int d_wire_sample_type;
|
||||
int d_bytes_per_sample;
|
||||
bool d_IQ_swap;
|
||||
bool d_fifo_full;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_GR_COMPLEX_IP_PACKET_SOURCE_H
|
||||
|
@ -55,11 +55,11 @@ rtl_tcp_signal_source_c::rtl_tcp_signal_source_c(const std::string &address,
|
||||
: gr::sync_block("rtl_tcp_signal_source_c",
|
||||
gr::io_signature::make(0, 0, 0),
|
||||
gr::io_signature::make(1, 1, sizeof(gr_complex))),
|
||||
buffer_(RTL_TCP_BUFFER_SIZE),
|
||||
socket_(io_context_),
|
||||
data_(RTL_TCP_PAYLOAD_SIZE),
|
||||
flip_iq_(flip_iq),
|
||||
buffer_(RTL_TCP_BUFFER_SIZE),
|
||||
unread_(0)
|
||||
unread_(0),
|
||||
flip_iq_(flip_iq)
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
|
||||
|
@ -82,8 +82,6 @@ public:
|
||||
void set_if_gain(int gain);
|
||||
|
||||
private:
|
||||
using buffer_type = boost::circular_buffer_space_optimized<float>;
|
||||
|
||||
friend rtl_tcp_signal_source_c_sptr
|
||||
rtl_tcp_make_signal_source_c(const std::string &address,
|
||||
int16_t port,
|
||||
@ -93,24 +91,6 @@ private:
|
||||
int16_t port,
|
||||
bool flip_iq);
|
||||
|
||||
Rtl_Tcp_Dongle_Info info_;
|
||||
|
||||
// IO members
|
||||
b_io_context io_context_;
|
||||
boost::asio::ip::tcp::socket socket_;
|
||||
std::vector<unsigned char> data_;
|
||||
bool flip_iq_;
|
||||
|
||||
// producer-consumer helpers
|
||||
boost::mutex mutex_;
|
||||
boost::condition not_full_;
|
||||
boost::condition not_empty_;
|
||||
buffer_type buffer_;
|
||||
size_t unread_;
|
||||
|
||||
// lookup for scaling data
|
||||
boost::array<float, 0xff> lookup_{};
|
||||
|
||||
// async read callback
|
||||
void handle_read(const boost::system::error_code &ec,
|
||||
size_t bytes_transferred);
|
||||
@ -124,6 +104,24 @@ private:
|
||||
{
|
||||
return unread_ > 0 || io_context_.stopped();
|
||||
}
|
||||
|
||||
boost::circular_buffer_space_optimized<float> buffer_;
|
||||
// producer-consumer helpers
|
||||
boost::mutex mutex_;
|
||||
boost::condition not_full_;
|
||||
boost::condition not_empty_;
|
||||
|
||||
// lookup for scaling data
|
||||
boost::array<float, 0xff> lookup_{};
|
||||
|
||||
// IO members
|
||||
b_io_context io_context_;
|
||||
boost::asio::ip::tcp::socket socket_;
|
||||
std::vector<unsigned char> data_;
|
||||
|
||||
Rtl_Tcp_Dongle_Info info_;
|
||||
size_t unread_;
|
||||
bool flip_iq_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_RTL_TCP_SIGNAL_SOURCE_C_H
|
||||
|
@ -103,8 +103,8 @@ unpack_2bit_samples::unpack_2bit_samples(bool big_endian_bytes,
|
||||
gr::io_signature::make(1, 1, item_size),
|
||||
gr::io_signature::make(1, 1, sizeof(char)),
|
||||
4 * item_size), // we make 4 bytes out for every byte in
|
||||
big_endian_bytes_(big_endian_bytes),
|
||||
item_size_(item_size),
|
||||
big_endian_bytes_(big_endian_bytes),
|
||||
big_endian_items_(big_endian_items),
|
||||
swap_endian_items_(false),
|
||||
reverse_interleaving_(reverse_interleaving)
|
||||
|
@ -106,13 +106,13 @@ private:
|
||||
bool big_endian_items,
|
||||
bool reverse_interleaving);
|
||||
|
||||
bool big_endian_bytes_;
|
||||
std::vector<int8_t> work_buffer_;
|
||||
size_t item_size_;
|
||||
bool big_endian_bytes_;
|
||||
bool big_endian_items_;
|
||||
bool swap_endian_items_;
|
||||
bool swap_endian_bytes_;
|
||||
bool reverse_interleaving_;
|
||||
std::vector<int8_t> work_buffer_;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_UNPACK_2BIT_SAMPLES_H
|
||||
|
@ -42,14 +42,14 @@ unpack_spir_gss6450_samples_sptr make_unpack_spir_gss6450_samples(unsigned int a
|
||||
class unpack_spir_gss6450_samples : public gr::sync_interpolator
|
||||
{
|
||||
public:
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
|
||||
friend unpack_spir_gss6450_samples_sptr make_unpack_spir_gss6450_samples_sptr(unsigned int adc_nbit);
|
||||
void decode_4bits_word(uint32_t input_uint32, gr_complex *out, int adc_bits_);
|
||||
explicit unpack_spir_gss6450_samples(unsigned int adc_nbit);
|
||||
~unpack_spir_gss6450_samples() = default;
|
||||
void decode_4bits_word(uint32_t input_uint32, gr_complex *out, int adc_bits_);
|
||||
int work(int noutput_items,
|
||||
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
|
||||
|
||||
private:
|
||||
friend unpack_spir_gss6450_samples_sptr make_unpack_spir_gss6450_samples_sptr(unsigned int adc_nbit);
|
||||
unsigned int adc_bits;
|
||||
unsigned int samples_per_int;
|
||||
};
|
||||
|
@ -55,12 +55,12 @@ private:
|
||||
static const uint32_t TEST_REGISTER_TRACK_WRITEVAL = 0x55AA;
|
||||
static const uint32_t MAX_LENGTH_DEVICEIO_NAME = 50;
|
||||
|
||||
int d_device_descriptor; // driver descriptor
|
||||
volatile unsigned* d_map_base; // driver memory map
|
||||
|
||||
// private functions
|
||||
unsigned fpga_switch_test_register(unsigned writeval);
|
||||
void close_device(void);
|
||||
|
||||
volatile unsigned* d_map_base; // driver memory map
|
||||
int d_device_descriptor; // driver descriptor
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_FPGA_SWITCH_H
|
||||
|
@ -74,31 +74,6 @@ private:
|
||||
int refcount;
|
||||
};
|
||||
|
||||
// code properties
|
||||
int d_KK;
|
||||
int d_nn;
|
||||
|
||||
// derived code properties
|
||||
int d_mm;
|
||||
int d_states;
|
||||
int d_number_symbols;
|
||||
|
||||
// trellis definition
|
||||
std::vector<int> d_out0;
|
||||
std::vector<int> d_state0;
|
||||
std::vector<int> d_out1;
|
||||
std::vector<int> d_state1;
|
||||
|
||||
// trellis state
|
||||
std::vector<float> d_pm_t;
|
||||
std::deque<Prev> d_trellis_paths;
|
||||
std::vector<float> d_metric_c; /* Set of all possible branch metrics */
|
||||
std::vector<float> d_rec_array; /* Received values for one trellis section */
|
||||
bool d_trellis_state_is_initialised;
|
||||
|
||||
// measures
|
||||
float d_indicator_metric;
|
||||
|
||||
// operations on the trellis (change decoder state)
|
||||
void init_trellis_state();
|
||||
int do_acs(const double sym[], int nbits);
|
||||
@ -112,6 +87,31 @@ private:
|
||||
void nsc_transit(int output_p[], int trans_p[], int input, const int g[], int KK, int nn);
|
||||
int nsc_enc_bit(int state_out_p[], int input, int state_in, const int g[], int KK, int nn);
|
||||
int parity_counter(int symbol, int length);
|
||||
|
||||
// trellis state
|
||||
std::deque<Prev> d_trellis_paths;
|
||||
std::vector<float> d_pm_t;
|
||||
std::vector<float> d_metric_c; /* Set of all possible branch metrics */
|
||||
std::vector<float> d_rec_array; /* Received values for one trellis section */
|
||||
|
||||
// trellis definition
|
||||
std::vector<int> d_out0;
|
||||
std::vector<int> d_state0;
|
||||
std::vector<int> d_out1;
|
||||
std::vector<int> d_state1;
|
||||
|
||||
// measures
|
||||
float d_indicator_metric;
|
||||
|
||||
// code properties
|
||||
int d_KK;
|
||||
int d_nn;
|
||||
|
||||
// derived code properties
|
||||
int d_mm;
|
||||
int d_states;
|
||||
int d_number_symbols;
|
||||
bool d_trellis_state_is_initialised;
|
||||
};
|
||||
|
||||
#endif // GNSS_SDR_VITERBI_DECODER_H
|
||||
|
@ -73,11 +73,10 @@ public:
|
||||
private:
|
||||
arma::vec mu_est;
|
||||
arma::mat Psi_est;
|
||||
|
||||
arma::vec mu_prior;
|
||||
arma::mat Psi_prior;
|
||||
int kappa_prior;
|
||||
int nu_prior;
|
||||
arma::mat Psi_prior;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -132,6 +132,9 @@ public:
|
||||
int n_correlators);
|
||||
|
||||
private:
|
||||
cudaStream_t stream1;
|
||||
// cudaStream_t stream2;
|
||||
|
||||
// Allocate the device input vectors
|
||||
GPU_Complex* d_sig_in;
|
||||
GPU_Complex* d_nco_in;
|
||||
@ -142,16 +145,14 @@ private:
|
||||
std::complex<float>* d_sig_in_cpu;
|
||||
std::complex<float>* d_corr_out_cpu;
|
||||
|
||||
int* d_shifts_samples;
|
||||
float* d_shifts_chips;
|
||||
int* d_shifts_samples;
|
||||
int d_code_length_chips;
|
||||
|
||||
int selected_gps_device;
|
||||
int threadsPerBlock;
|
||||
int blocksPerGrid;
|
||||
|
||||
cudaStream_t stream1;
|
||||
// cudaStream_t stream2;
|
||||
int num_gpu_devices;
|
||||
int selected_device;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user