mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-09 19:53:04 +00:00
Remove unneded cstdlib include
This commit is contained in:
@@ -19,7 +19,6 @@
|
|||||||
#ifndef GNSS_SDR_VOLK_QA_UTILS_H
|
#ifndef GNSS_SDR_VOLK_QA_UTILS_H
|
||||||
#define GNSS_SDR_VOLK_QA_UTILS_H
|
#define GNSS_SDR_VOLK_QA_UTILS_H
|
||||||
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|||||||
@@ -29,7 +29,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "signal_generator_c.h"
|
#include "signal_generator_c.h"
|
||||||
#include <cstdlib>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstdlib>
|
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <boost/scoped_array.hpp>
|
#include <boost/scoped_array.hpp>
|
||||||
#include <gnuradio/random.h>
|
#include <gnuradio/random.h>
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "file_signal_source.h"
|
#include "file_signal_source.h"
|
||||||
#include <cstdlib>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "nsr_file_signal_source.h"
|
#include "nsr_file_signal_source.h"
|
||||||
#include <cstdlib>
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "spir_file_signal_source.h"
|
#include "spir_file_signal_source.h"
|
||||||
#include <cstdlib>
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "two_bit_cpx_file_signal_source.h"
|
#include "two_bit_cpx_file_signal_source.h"
|
||||||
#include <cstdlib>
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@@ -43,9 +42,6 @@
|
|||||||
|
|
||||||
using google::LogMessage;
|
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)");
|
|
||||||
|
|
||||||
|
|
||||||
TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* configuration,
|
TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* configuration,
|
||||||
std::string role, unsigned int in_streams, unsigned int out_streams,
|
std::string role, unsigned int in_streams, unsigned int out_streams,
|
||||||
@@ -237,10 +233,6 @@ void TwoBitCpxFileSignalSource::connect(gr::top_block_sptr top_block)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void TwoBitCpxFileSignalSource::disconnect(gr::top_block_sptr top_block)
|
void TwoBitCpxFileSignalSource::disconnect(gr::top_block_sptr top_block)
|
||||||
{
|
{
|
||||||
if (samples_ > 0)
|
if (samples_ > 0)
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "two_bit_packed_file_signal_source.h"
|
#include "two_bit_packed_file_signal_source.h"
|
||||||
#include <cstdlib>
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
@@ -45,9 +44,6 @@
|
|||||||
|
|
||||||
using google::LogMessage;
|
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)");
|
|
||||||
|
|
||||||
|
|
||||||
TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterface* configuration,
|
TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterface* configuration,
|
||||||
std::string role, unsigned int in_streams, unsigned int out_streams,
|
std::string role, unsigned int in_streams, unsigned int out_streams,
|
||||||
@@ -70,7 +66,7 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
|
|||||||
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
item_type_ = configuration->property(role + ".item_type", default_item_type);
|
||||||
big_endian_items_ = configuration->property(role + ".big_endian_items", true);
|
big_endian_items_ = configuration->property(role + ".big_endian_items", true);
|
||||||
big_endian_bytes_ = configuration->property(role + ".big_endian_bytes", false);
|
big_endian_bytes_ = configuration->property(role + ".big_endian_bytes", false);
|
||||||
sample_type_ = configuration->property(role + ".sample_type", default_sample_type ); // options: "real", "iq", "qi"
|
sample_type_ = configuration->property(role + ".sample_type", default_sample_type ); // options: "real", "iq", "qi"
|
||||||
repeat_ = configuration->property(role + ".repeat", false);
|
repeat_ = configuration->property(role + ".repeat", false);
|
||||||
dump_ = configuration->property(role + ".dump", false);
|
dump_ = configuration->property(role + ".dump", false);
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
|
||||||
@@ -87,13 +83,13 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
|
|||||||
// If we have shorts stored in little endian format, might as
|
// If we have shorts stored in little endian format, might as
|
||||||
// well read them in as bytes.
|
// well read them in as bytes.
|
||||||
if( big_endian_items_ )
|
if( big_endian_items_ )
|
||||||
{
|
{
|
||||||
item_size_ = sizeof(short);
|
item_size_ = sizeof(short);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
item_size_ = sizeof(char);
|
item_size_ = sizeof(char);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -102,51 +98,51 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( sample_type_.compare("real") == 0 )
|
if( sample_type_.compare("real") == 0 )
|
||||||
{
|
{
|
||||||
is_complex_ = false;
|
is_complex_ = false;
|
||||||
}
|
}
|
||||||
else if( sample_type_.compare("iq" ) == 0 )
|
else if( sample_type_.compare("iq" ) == 0 )
|
||||||
{
|
{
|
||||||
is_complex_ = true;
|
is_complex_ = true;
|
||||||
reverse_interleaving_ = false;
|
reverse_interleaving_ = false;
|
||||||
}
|
}
|
||||||
else if( sample_type_.compare("qi") == 0 )
|
else if( sample_type_.compare("qi") == 0 )
|
||||||
{
|
{
|
||||||
is_complex_ = true;
|
is_complex_ = true;
|
||||||
reverse_interleaving_ = true;
|
reverse_interleaving_ = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(WARNING) << sample_type_ << " unrecognized sample type. Assuming: "
|
LOG(WARNING) << sample_type_ << " unrecognized sample type. Assuming: "
|
||||||
<< ( is_complex_ ? ( reverse_interleaving_ ? "qi" : "iq" ) : "real" );
|
<< ( is_complex_ ? ( reverse_interleaving_ ? "qi" : "iq" ) : "real" );
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
file_source_ = gr::blocks::file_source::make(item_size_, filename_.c_str(), repeat_);
|
file_source_ = gr::blocks::file_source::make(item_size_, filename_.c_str(), repeat_);
|
||||||
|
|
||||||
if( seconds_to_skip > 0 )
|
if( seconds_to_skip > 0 )
|
||||||
{
|
|
||||||
bytes_to_skip = static_cast< long >(
|
|
||||||
seconds_to_skip * sampling_frequency_ / 4 );
|
|
||||||
if( is_complex_ )
|
|
||||||
{
|
{
|
||||||
bytes_to_skip <<= 1;
|
bytes_to_skip = static_cast< long >(
|
||||||
|
seconds_to_skip * sampling_frequency_ / 4 );
|
||||||
|
if( is_complex_ )
|
||||||
|
{
|
||||||
|
bytes_to_skip <<= 1;
|
||||||
|
}
|
||||||
|
file_source_->seek( bytes_to_skip, SEEK_SET );
|
||||||
}
|
}
|
||||||
file_source_->seek( bytes_to_skip, SEEK_SET );
|
|
||||||
}
|
|
||||||
|
|
||||||
unpack_samples_ = make_unpack_2bit_samples( big_endian_bytes_,
|
unpack_samples_ = make_unpack_2bit_samples( big_endian_bytes_,
|
||||||
item_size_, big_endian_items_, reverse_interleaving_);
|
item_size_, big_endian_items_, reverse_interleaving_);
|
||||||
if( is_complex_ )
|
if( is_complex_ )
|
||||||
{
|
{
|
||||||
char_to_float_ =
|
char_to_float_ =
|
||||||
gr::blocks::interleaved_char_to_complex::make(false);
|
gr::blocks::interleaved_char_to_complex::make(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char_to_float_ =
|
char_to_float_ =
|
||||||
gr::blocks::char_to_float::make();
|
gr::blocks::char_to_float::make();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
@@ -168,7 +164,7 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
LOG(WARNING) << "file_signal_source: Unable to open the samples file "
|
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);
|
throw(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,20 +253,20 @@ void TwoBitPackedFileSignalSource::connect(gr::top_block_sptr top_block)
|
|||||||
DLOG(INFO) << "connected unpack samples to char to float";
|
DLOG(INFO) << "connected unpack samples to char to float";
|
||||||
|
|
||||||
if( enable_throttle_control_ )
|
if( enable_throttle_control_ )
|
||||||
{
|
{
|
||||||
right_block = throttle_;
|
right_block = throttle_;
|
||||||
top_block->connect( left_block, 0, right_block, 0 );
|
top_block->connect( left_block, 0, right_block, 0 );
|
||||||
left_block = right_block;
|
left_block = right_block;
|
||||||
DLOG(INFO) << " connected to throttle";
|
DLOG(INFO) << " connected to throttle";
|
||||||
}
|
}
|
||||||
|
|
||||||
top_block->connect(left_block, 0, valve_, 0);
|
top_block->connect(left_block, 0, valve_, 0);
|
||||||
DLOG(INFO) << "connected to valve";
|
DLOG(INFO) << "connected to valve";
|
||||||
if (dump_)
|
if (dump_)
|
||||||
{
|
{
|
||||||
top_block->connect(valve_, 0, sink_, 0);
|
top_block->connect(valve_, 0, sink_, 0);
|
||||||
DLOG(INFO) << "connected valve to file sink";
|
DLOG(INFO) << "connected valve to file sink";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -290,20 +286,20 @@ void TwoBitPackedFileSignalSource::disconnect(gr::top_block_sptr top_block)
|
|||||||
DLOG(INFO) << "disconnected unpack samples to char to float";
|
DLOG(INFO) << "disconnected unpack samples to char to float";
|
||||||
|
|
||||||
if( enable_throttle_control_ )
|
if( enable_throttle_control_ )
|
||||||
{
|
{
|
||||||
right_block = throttle_;
|
right_block = throttle_;
|
||||||
top_block->disconnect( left_block, 0, right_block, 0 );
|
top_block->disconnect( left_block, 0, right_block, 0 );
|
||||||
left_block = right_block;
|
left_block = right_block;
|
||||||
DLOG(INFO) << " disconnected to throttle";
|
DLOG(INFO) << " disconnected to throttle";
|
||||||
}
|
}
|
||||||
|
|
||||||
top_block->disconnect(left_block, 0, valve_, 0);
|
top_block->disconnect(left_block, 0, valve_, 0);
|
||||||
DLOG(INFO) << "disconnected to valve";
|
DLOG(INFO) << "disconnected to valve";
|
||||||
if (dump_)
|
if (dump_)
|
||||||
{
|
{
|
||||||
top_block->disconnect(valve_, 0, sink_, 0);
|
top_block->disconnect(valve_, 0, sink_, 0);
|
||||||
DLOG(INFO) << "disconnected valve to file sink";
|
DLOG(INFO) << "disconnected valve to file sink";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "galileo_e1b_telemetry_decoder_cc.h"
|
#include "galileo_e1b_telemetry_decoder_cc.h"
|
||||||
#include <cstdlib>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "galileo_e5a_telemetry_decoder_cc.h"
|
#include "galileo_e5a_telemetry_decoder_cc.h"
|
||||||
#include <cstdlib>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
#include <gnuradio/io_signature.h>
|
#include <gnuradio/io_signature.h>
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdlib>
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <random>
|
#include <random>
|
||||||
@@ -652,7 +651,7 @@ int main(int argc, char **argv)
|
|||||||
if ((sysv_msqid = msgget(sysv_msg_key, msgflg )) == -1)
|
if ((sysv_msqid = msgget(sysv_msg_key, msgflg )) == -1)
|
||||||
{
|
{
|
||||||
std::cout << "GNSS-SDR can not create message queues!" << std::endl;
|
std::cout << "GNSS-SDR can not create message queues!" << std::endl;
|
||||||
exit(1);
|
return 1;
|
||||||
}
|
}
|
||||||
ttff_msgbuf msg;
|
ttff_msgbuf msg;
|
||||||
msg.mtype = 1;
|
msg.mtype = 1;
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <gnuradio/top_block.h>
|
#include <gnuradio/top_block.h>
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <gnuradio/top_block.h>
|
#include <gnuradio/top_block.h>
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
#include <gnuradio/top_block.h>
|
#include <gnuradio/top_block.h>
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <armadillo>
|
#include <armadillo>
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdlib>
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
Reference in New Issue
Block a user