mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-30 14:53:03 +00:00
Remove tabs from the source code
This commit is contained in:
@@ -46,13 +46,13 @@ using google::LogMessage;
|
||||
|
||||
|
||||
DEFINE_string(signal_source, "-",
|
||||
"If defined, path to the file containing the signal samples (overrides the configuration file)");
|
||||
"If defined, path to the file containing the signal samples (overrides the configuration file)");
|
||||
|
||||
|
||||
FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) :
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
{
|
||||
std::string default_filename = "./example_capture.dat";
|
||||
std::string default_item_type = "short";
|
||||
@@ -99,11 +99,11 @@ FileSignalSource::FileSignalSource(ConfigurationInterface* configuration,
|
||||
}
|
||||
else if (item_type_.compare("byte") == 0)
|
||||
{
|
||||
item_size_ = sizeof(int8_t);
|
||||
item_size_ = sizeof(int8_t);
|
||||
}
|
||||
else if (item_type_.compare("ibyte") == 0)
|
||||
{
|
||||
item_size_ = sizeof(int8_t);
|
||||
item_size_ = sizeof(int8_t);
|
||||
is_complex = true;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -47,7 +47,7 @@ class ConfigurationInterface;
|
||||
class Gn3sSignalSource: public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
Gn3sSignalSource(ConfigurationInterface* configuration,
|
||||
Gn3sSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
unsigned int out_stream, gr::msg_queue::sptr queue);
|
||||
|
||||
|
||||
@@ -45,13 +45,13 @@
|
||||
using google::LogMessage;
|
||||
|
||||
DEFINE_string(nsr_signal_source, "-",
|
||||
"If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)");
|
||||
"If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)");
|
||||
|
||||
|
||||
NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) :
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
{
|
||||
std::string default_filename = "../data/my_capture.dat";
|
||||
std::string default_item_type = "byte";
|
||||
|
||||
@@ -50,7 +50,7 @@ class ConfigurationInterface;
|
||||
class OsmosdrSignalSource: public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
OsmosdrSignalSource(ConfigurationInterface* configuration,
|
||||
OsmosdrSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ RawArraySignalSource::RawArraySignalSource(ConfigurationInterface* configuration
|
||||
//dump_ = configuration->property(role + ".dump", false);
|
||||
//dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
||||
|
||||
dump_=false;
|
||||
dump_ = false;
|
||||
|
||||
std::string default_ethernet_dev = "eth0";
|
||||
eth_device_ = configuration->property(role + ".ethernet_dev", default_ethernet_dev);
|
||||
@@ -88,7 +88,7 @@ RawArraySignalSource::RawArraySignalSource(ConfigurationInterface* configuration
|
||||
}
|
||||
if (dump_)
|
||||
{
|
||||
//TODO: multichannel recorder
|
||||
//TODO: multichannel recorder
|
||||
DLOG(INFO) << "Dumping output into file " << dump_filename_;
|
||||
file_sink_ = gr::blocks::file_sink::make(item_size_, dump_filename_.c_str());
|
||||
}
|
||||
@@ -109,7 +109,7 @@ void RawArraySignalSource::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (dump_)
|
||||
{
|
||||
//TODO: multichannel recorder
|
||||
//TODO: multichannel recorder
|
||||
top_block->connect(raw_array_source_, 0, file_sink_, 0);
|
||||
DLOG(INFO) << "connected raw_array_source_ to file sink";
|
||||
}
|
||||
@@ -125,7 +125,7 @@ void RawArraySignalSource::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (dump_)
|
||||
{
|
||||
//TODO: multichannel recorder
|
||||
//TODO: multichannel recorder
|
||||
top_block->disconnect(raw_array_source_, 0, file_sink_, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class ConfigurationInterface;
|
||||
class RawArraySignalSource: public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
RawArraySignalSource(ConfigurationInterface* configuration,
|
||||
RawArraySignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
unsigned int out_stream, gr::msg_queue::sptr queue);
|
||||
|
||||
|
||||
@@ -80,13 +80,13 @@ RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration,
|
||||
// 1. Make the gr block
|
||||
try
|
||||
{
|
||||
std::cout << "Connecting to " << address_ << ":" << port_ << std::endl;
|
||||
LOG (INFO) << "Connecting to " << address_ << ":" << port_;
|
||||
signal_source_ = rtl_tcp_make_signal_source_c (address_, port_, flip_iq_);
|
||||
std::cout << "Connecting to " << address_ << ":" << port_ << std::endl;
|
||||
LOG (INFO) << "Connecting to " << address_ << ":" << port_;
|
||||
signal_source_ = rtl_tcp_make_signal_source_c (address_, port_, flip_iq_);
|
||||
}
|
||||
catch( boost::exception & e )
|
||||
{
|
||||
DLOG(FATAL) << "Boost exception: " << boost::diagnostic_information(e);
|
||||
DLOG(FATAL) << "Boost exception: " << boost::diagnostic_information(e);
|
||||
}
|
||||
|
||||
// 2 set sampling rate
|
||||
@@ -99,25 +99,25 @@ RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration,
|
||||
signal_source_->set_agc_mode(true);
|
||||
|
||||
if (this->AGC_enabled_ == true)
|
||||
{
|
||||
std::cout << "AGC enabled" << std::endl;
|
||||
LOG(INFO) << "AGC enabled";
|
||||
signal_source_->set_agc_mode(true);
|
||||
}
|
||||
{
|
||||
std::cout << "AGC enabled" << std::endl;
|
||||
LOG(INFO) << "AGC enabled";
|
||||
signal_source_->set_agc_mode(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "AGC disabled" << std::endl;
|
||||
LOG(INFO) << "AGC disabled";
|
||||
signal_source_->set_agc_mode(false);
|
||||
{
|
||||
std::cout << "AGC disabled" << std::endl;
|
||||
LOG(INFO) << "AGC disabled";
|
||||
signal_source_->set_agc_mode(false);
|
||||
|
||||
std::cout << "Setting gain to " << gain_ << std::endl;
|
||||
LOG(INFO) << "Setting gain to " << gain_;
|
||||
signal_source_->set_gain(gain_);
|
||||
std::cout << "Setting gain to " << gain_ << std::endl;
|
||||
LOG(INFO) << "Setting gain to " << gain_;
|
||||
signal_source_->set_gain(gain_);
|
||||
|
||||
std::cout << "Setting IF gain to " << if_gain_ << std::endl;
|
||||
LOG(INFO) << "Setting IF gain to " << if_gain_;
|
||||
signal_source_->set_if_gain(if_gain_);
|
||||
}
|
||||
std::cout << "Setting IF gain to " << if_gain_ << std::endl;
|
||||
LOG(INFO) << "Setting IF gain to " << if_gain_;
|
||||
signal_source_->set_if_gain(if_gain_);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -145,43 +145,58 @@ RtlTcpSignalSource::~RtlTcpSignalSource()
|
||||
{}
|
||||
|
||||
|
||||
void RtlTcpSignalSource::connect(gr::top_block_sptr top_block) {
|
||||
if ( samples_ ) {
|
||||
top_block->connect (signal_source_, 0, valve_, 0);
|
||||
DLOG(INFO) << "connected rtl tcp source to valve";
|
||||
if ( dump_ ) {
|
||||
top_block->connect(valve_, 0, file_sink_, 0);
|
||||
DLOG(INFO) << "connected valve to file sink";
|
||||
}
|
||||
}
|
||||
else if ( dump_ ) {
|
||||
top_block->connect(signal_source_, 0, file_sink_, 0);
|
||||
DLOG(INFO) << "connected rtl tcp source to file sink";
|
||||
}
|
||||
void RtlTcpSignalSource::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if ( samples_ )
|
||||
{
|
||||
top_block->connect (signal_source_, 0, valve_, 0);
|
||||
DLOG(INFO) << "connected rtl tcp source to valve";
|
||||
if ( dump_ )
|
||||
{
|
||||
top_block->connect(valve_, 0, file_sink_, 0);
|
||||
DLOG(INFO) << "connected valve to file sink";
|
||||
}
|
||||
}
|
||||
else if ( dump_ )
|
||||
{
|
||||
top_block->connect(signal_source_, 0, file_sink_, 0);
|
||||
DLOG(INFO) << "connected rtl tcp source to file sink";
|
||||
}
|
||||
}
|
||||
|
||||
void RtlTcpSignalSource::disconnect(gr::top_block_sptr top_block) {
|
||||
if ( samples_ ) {
|
||||
top_block->disconnect (signal_source_, 0, valve_, 0);
|
||||
if ( dump_ ) {
|
||||
top_block->disconnect(valve_, 0, file_sink_, 0);
|
||||
}
|
||||
}
|
||||
else if ( dump_ ) {
|
||||
top_block->disconnect(signal_source_, 0, file_sink_, 0);
|
||||
}
|
||||
|
||||
void RtlTcpSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if ( samples_ )
|
||||
{
|
||||
top_block->disconnect (signal_source_, 0, valve_, 0);
|
||||
if ( dump_ )
|
||||
{
|
||||
top_block->disconnect(valve_, 0, file_sink_, 0);
|
||||
}
|
||||
}
|
||||
else if ( dump_ )
|
||||
{
|
||||
top_block->disconnect(signal_source_, 0, file_sink_, 0);
|
||||
}
|
||||
}
|
||||
|
||||
gr::basic_block_sptr RtlTcpSignalSource::get_left_block() {
|
||||
|
||||
gr::basic_block_sptr RtlTcpSignalSource::get_left_block()
|
||||
{
|
||||
LOG(WARNING) << "Trying to get signal source left block.";
|
||||
return gr::basic_block_sptr();
|
||||
}
|
||||
|
||||
gr::basic_block_sptr RtlTcpSignalSource::get_right_block() {
|
||||
if (samples_ != 0) {
|
||||
return valve_;
|
||||
}
|
||||
else {
|
||||
return signal_source_;
|
||||
}
|
||||
|
||||
gr::basic_block_sptr RtlTcpSignalSource::get_right_block()
|
||||
{
|
||||
if (samples_ != 0)
|
||||
{
|
||||
return valve_;
|
||||
}
|
||||
else
|
||||
{
|
||||
return signal_source_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class ConfigurationInterface;
|
||||
class RtlTcpSignalSource: public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
RtlTcpSignalSource(ConfigurationInterface* configuration,
|
||||
RtlTcpSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ DEFINE_string(spir_signal_source, "-",
|
||||
SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) :
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
{
|
||||
std::string default_filename = "../data/my_capture.dat";
|
||||
std::string default_item_type = "int";
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
using google::LogMessage;
|
||||
|
||||
//DEFINE_string(two_bit_cpx_signal_source, "-",
|
||||
// "If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)");
|
||||
// "If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)");
|
||||
|
||||
|
||||
TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) :
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
{
|
||||
std::string default_filename = "../data/my_capture.dat";
|
||||
std::string default_item_type = "byte";
|
||||
@@ -104,7 +104,7 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con
|
||||
<< std::endl;
|
||||
|
||||
LOG(WARNING) << "file_signal_source: Unable to open the samples file "
|
||||
<< filename_.c_str() << ", exiting the program.";
|
||||
<< filename_.c_str() << ", exiting the program.";
|
||||
throw(e);
|
||||
}
|
||||
|
||||
@@ -172,14 +172,10 @@ TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* con
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
TwoBitCpxFileSignalSource::~TwoBitCpxFileSignalSource()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
|
||||
void TwoBitCpxFileSignalSource::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
if (samples_ > 0)
|
||||
@@ -302,9 +298,6 @@ void TwoBitCpxFileSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
gr::basic_block_sptr TwoBitCpxFileSignalSource::get_left_block()
|
||||
{
|
||||
LOG(WARNING) << "Left block of a signal source should not be retrieved";
|
||||
@@ -313,9 +306,6 @@ gr::basic_block_sptr TwoBitCpxFileSignalSource::get_left_block()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
gr::basic_block_sptr TwoBitCpxFileSignalSource::get_right_block()
|
||||
{
|
||||
if (samples_ > 0)
|
||||
|
||||
@@ -46,13 +46,13 @@
|
||||
using google::LogMessage;
|
||||
|
||||
//DEFINE_string(two_bit_packed_signal_source, "-",
|
||||
// "If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)");
|
||||
// "If defined, path to the file containing the NSR (byte to 2-bit packed) signal samples (overrides the configuration file)");
|
||||
|
||||
|
||||
TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_streams, unsigned int out_streams,
|
||||
boost::shared_ptr<gr::msg_queue> queue) :
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(queue)
|
||||
{
|
||||
std::string default_filename = "../data/my_capture.dat";
|
||||
std::string default_item_type = "byte";
|
||||
@@ -101,7 +101,6 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
|
||||
item_size_ = sizeof(char);
|
||||
}
|
||||
|
||||
|
||||
if( sample_type_.compare("real") == 0 )
|
||||
{
|
||||
is_complex_ = false;
|
||||
@@ -236,14 +235,10 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
TwoBitPackedFileSignalSource::~TwoBitPackedFileSignalSource()
|
||||
{}
|
||||
|
||||
|
||||
|
||||
|
||||
void TwoBitPackedFileSignalSource::connect(gr::top_block_sptr top_block)
|
||||
{
|
||||
gr::basic_block_sptr left_block = file_source_;
|
||||
@@ -276,10 +271,6 @@ void TwoBitPackedFileSignalSource::connect(gr::top_block_sptr top_block)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void TwoBitPackedFileSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||
{
|
||||
gr::basic_block_sptr left_block = file_source_;
|
||||
@@ -321,9 +312,6 @@ gr::basic_block_sptr TwoBitPackedFileSignalSource::get_left_block()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
gr::basic_block_sptr TwoBitPackedFileSignalSource::get_right_block()
|
||||
{
|
||||
return valve_;
|
||||
|
||||
Reference in New Issue
Block a user