1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-25 22:43:14 +00:00

Remove unneded cstdlib include

This commit is contained in:
Carles Fernandez 2017-08-12 15:52:23 +02:00
parent e8f401911f
commit 59164c33bd
16 changed files with 59 additions and 85 deletions

View File

@ -19,7 +19,6 @@
#ifndef GNSS_SDR_VOLK_QA_UTILS_H
#define GNSS_SDR_VOLK_QA_UTILS_H
#include <cstdlib>
#include <string>
#include <iostream>
#include <fstream>

View File

@ -29,7 +29,6 @@
*/
#include "signal_generator_c.h"
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <gnuradio/io_signature.h>

View File

@ -33,7 +33,6 @@
#include <string>
#include <vector>
#include <cstdlib>
#include <random>
#include <boost/scoped_array.hpp>
#include <gnuradio/random.h>

View File

@ -31,7 +31,6 @@
*/
#include "file_signal_source.h"
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <iomanip>

View File

@ -31,7 +31,6 @@
*/
#include "nsr_file_signal_source.h"
#include <cstdlib>
#include <exception>
#include <fstream>
#include <iomanip>

View File

@ -30,7 +30,6 @@
*/
#include "spir_file_signal_source.h"
#include <cstdlib>
#include <exception>
#include <fstream>
#include <iomanip>

View File

@ -30,7 +30,6 @@
*/
#include "two_bit_cpx_file_signal_source.h"
#include <cstdlib>
#include <exception>
#include <fstream>
#include <iomanip>
@ -43,9 +42,6 @@
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,
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)
{
if (samples_ > 0)

View File

@ -31,7 +31,6 @@
*/
#include "two_bit_packed_file_signal_source.h"
#include <cstdlib>
#include <exception>
#include <fstream>
#include <iomanip>
@ -45,9 +44,6 @@
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,
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);
big_endian_items_ = configuration->property(role + ".big_endian_items", true);
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);
dump_ = configuration->property(role + ".dump", false);
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
// well read them in as bytes.
if( big_endian_items_ )
{
item_size_ = sizeof(short);
}
{
item_size_ = sizeof(short);
}
else
{
item_size_ = sizeof(char);
}
{
item_size_ = sizeof(char);
}
}
else
{
@ -102,51 +98,51 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
}
if( sample_type_.compare("real") == 0 )
{
is_complex_ = false;
}
{
is_complex_ = false;
}
else if( sample_type_.compare("iq" ) == 0 )
{
is_complex_ = true;
reverse_interleaving_ = false;
}
{
is_complex_ = true;
reverse_interleaving_ = false;
}
else if( sample_type_.compare("qi") == 0 )
{
is_complex_ = true;
reverse_interleaving_ = true;
}
{
is_complex_ = true;
reverse_interleaving_ = true;
}
else
{
LOG(WARNING) << sample_type_ << " unrecognized sample type. Assuming: "
<< ( is_complex_ ? ( reverse_interleaving_ ? "qi" : "iq" ) : "real" );
}
{
LOG(WARNING) << sample_type_ << " unrecognized sample type. Assuming: "
<< ( is_complex_ ? ( reverse_interleaving_ ? "qi" : "iq" ) : "real" );
}
try
{
file_source_ = gr::blocks::file_source::make(item_size_, filename_.c_str(), repeat_);
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_,
item_size_, big_endian_items_, reverse_interleaving_);
if( is_complex_ )
{
char_to_float_ =
gr::blocks::interleaved_char_to_complex::make(false);
}
{
char_to_float_ =
gr::blocks::interleaved_char_to_complex::make(false);
}
else
{
char_to_float_ =
gr::blocks::char_to_float::make();
}
{
char_to_float_ =
gr::blocks::char_to_float::make();
}
}
catch (const std::exception &e)
@ -168,7 +164,7 @@ TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterfac
<< 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);
}
@ -257,20 +253,20 @@ void TwoBitPackedFileSignalSource::connect(gr::top_block_sptr top_block)
DLOG(INFO) << "connected unpack samples to char to float";
if( enable_throttle_control_ )
{
right_block = throttle_;
top_block->connect( left_block, 0, right_block, 0 );
left_block = right_block;
DLOG(INFO) << " connected to throttle";
}
{
right_block = throttle_;
top_block->connect( left_block, 0, right_block, 0 );
left_block = right_block;
DLOG(INFO) << " connected to throttle";
}
top_block->connect(left_block, 0, valve_, 0);
DLOG(INFO) << "connected to valve";
if (dump_)
{
top_block->connect(valve_, 0, sink_, 0);
DLOG(INFO) << "connected valve to file sink";
}
{
top_block->connect(valve_, 0, sink_, 0);
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";
if( enable_throttle_control_ )
{
right_block = throttle_;
top_block->disconnect( left_block, 0, right_block, 0 );
left_block = right_block;
DLOG(INFO) << " disconnected to throttle";
}
{
right_block = throttle_;
top_block->disconnect( left_block, 0, right_block, 0 );
left_block = right_block;
DLOG(INFO) << " disconnected to throttle";
}
top_block->disconnect(left_block, 0, valve_, 0);
DLOG(INFO) << "disconnected to valve";
if (dump_)
{
top_block->disconnect(valve_, 0, sink_, 0);
DLOG(INFO) << "disconnected valve to file sink";
}
{
top_block->disconnect(valve_, 0, sink_, 0);
DLOG(INFO) << "disconnected valve to file sink";
}
}

View File

@ -31,7 +31,6 @@
#include "galileo_e1b_telemetry_decoder_cc.h"
#include <cstdlib>
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h>

View File

@ -35,7 +35,6 @@
*/
#include "galileo_e5a_telemetry_decoder_cc.h"
#include <cstdlib>
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <gnuradio/io_signature.h>

View File

@ -33,7 +33,6 @@
#include <cerrno>
#include <chrono>
#include <cmath>
#include <cstdlib>
#include <limits>
#include <numeric>
#include <random>
@ -652,7 +651,7 @@ int main(int argc, char **argv)
if ((sysv_msqid = msgget(sysv_msg_key, msgflg )) == -1)
{
std::cout << "GNSS-SDR can not create message queues!" << std::endl;
exit(1);
return 1;
}
ttff_msgbuf msg;
msg.mtype = 1;

View File

@ -32,7 +32,6 @@
#include <chrono>
#include <cstdlib>
#include <iostream>
#include <boost/make_shared.hpp>
#include <gnuradio/top_block.h>

View File

@ -33,7 +33,6 @@
#include <chrono>
#include <cstdlib>
#include <iostream>
#include <boost/make_shared.hpp>
#include <gnuradio/top_block.h>

View File

@ -33,7 +33,6 @@
#include <chrono>
#include <cstdlib>
#include <iostream>
#include <boost/make_shared.hpp>
#include <gnuradio/top_block.h>

View File

@ -32,7 +32,6 @@
#include <unistd.h>
#include <chrono>
#include <cstdlib>
#include <exception>
#include <iostream>
#include <armadillo>

View File

@ -32,7 +32,6 @@
#include <unistd.h>
#include <chrono>
#include <cstdlib>
#include <exception>
#include <iostream>
#include <string>