mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-27 05:27:40 +00:00
Apply fixes by clang-tidy
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include "pcps_acquisition_fpga.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <utility>
|
||||
|
||||
|
||||
#define AQ_DOWNSAMPLING_DELAY 40 // delay due to the downsampling filter in the acquisition
|
||||
@@ -50,7 +51,7 @@ using google::LogMessage;
|
||||
|
||||
pcps_acquisition_fpga_sptr pcps_make_acquisition_fpga(pcpsconf_fpga_t conf_)
|
||||
{
|
||||
return pcps_acquisition_fpga_sptr(new pcps_acquisition_fpga(conf_));
|
||||
return pcps_acquisition_fpga_sptr(new pcps_acquisition_fpga(std::move(conf_)));
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +62,7 @@ pcps_acquisition_fpga::pcps_acquisition_fpga(pcpsconf_fpga_t conf_) : gr::block(
|
||||
// printf("acq constructor start\n");
|
||||
this->message_port_register_out(pmt::mp("events"));
|
||||
|
||||
acq_parameters = conf_;
|
||||
acq_parameters = std::move(conf_);
|
||||
d_sample_counter = 0ULL; // SAMPLE COUNTER
|
||||
d_active = false;
|
||||
d_state = 0;
|
||||
@@ -256,7 +257,7 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
d_gnss_synchro->Acq_doppler_hz = static_cast<double>(doppler);
|
||||
d_gnss_synchro->Acq_samplestamp_samples = d_sample_counter;
|
||||
|
||||
d_test_statistics = (d_mag / d_input_power); //* correction_factor;
|
||||
d_test_statistics = (d_mag / d_input_power); // correction_factor;
|
||||
}
|
||||
|
||||
// In the case of the FPGA the option of dumping the results of the acquisition to a file is not available
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <fcntl.h> // libraries used by the GIPO
|
||||
#include <iostream>
|
||||
#include <sys/mman.h> // libraries used by the GIPO
|
||||
#include <utility>
|
||||
|
||||
|
||||
#define PAGE_SIZE 0x10000 // default page size for the multicorrelator memory map
|
||||
@@ -102,7 +103,7 @@ fpga_acquisition::fpga_acquisition(std::string device_name,
|
||||
|
||||
//printf("AAA- vector_length = %d\n ", vector_length);
|
||||
// initial values
|
||||
d_device_name = device_name;
|
||||
d_device_name = std::move(device_name);
|
||||
//d_freq = freq;
|
||||
d_fs_in = fs_in;
|
||||
d_vector_length = vector_length;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
#endif
|
||||
|
||||
Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
|
||||
@@ -45,7 +45,7 @@ class Ad9361FpgaSignalSource : public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
Ad9361FpgaSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
~Ad9361FpgaSignalSource();
|
||||
|
||||
@@ -43,7 +43,7 @@ using google::LogMessage;
|
||||
|
||||
|
||||
CustomUDPSignalSource::CustomUDPSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
// DUMP PARAMETERS
|
||||
|
||||
@@ -54,7 +54,7 @@ class CustomUDPSignalSource : public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
CustomUDPSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
virtual ~CustomUDPSignalSource();
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
using google::LogMessage;
|
||||
|
||||
Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
|
||||
@@ -46,7 +46,7 @@ class Fmcomms2SignalSource : public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
Fmcomms2SignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
virtual ~Fmcomms2SignalSource();
|
||||
|
||||
@@ -44,7 +44,7 @@ using google::LogMessage;
|
||||
|
||||
|
||||
OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
// DUMP PARAMETERS
|
||||
|
||||
@@ -52,7 +52,7 @@ class OsmosdrSignalSource : public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
OsmosdrSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
virtual ~OsmosdrSignalSource();
|
||||
|
||||
@@ -41,7 +41,7 @@ using google::LogMessage;
|
||||
|
||||
|
||||
PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
const std::string& role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
|
||||
@@ -48,7 +48,7 @@ class PlutosdrSignalSource : public GNSSBlockInterface
|
||||
{
|
||||
public:
|
||||
PlutosdrSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream,
|
||||
const std::string& role, unsigned int in_stream,
|
||||
unsigned int out_stream, boost::shared_ptr<gr::msg_queue> queue);
|
||||
|
||||
virtual ~PlutosdrSignalSource();
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "gr_complex_ip_packet_source.h"
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <utility>
|
||||
|
||||
|
||||
const int FIFO_SIZE = 1472000;
|
||||
@@ -76,15 +77,15 @@ typedef struct gr_udp_header
|
||||
|
||||
gr_complex_ip_packet_source::sptr
|
||||
gr_complex_ip_packet_source::make(std::string src_device,
|
||||
std::string origin_address,
|
||||
const std::string& origin_address,
|
||||
int udp_port,
|
||||
int udp_packet_size,
|
||||
int n_baseband_channels,
|
||||
std::string wire_sample_type,
|
||||
const std::string& wire_sample_type,
|
||||
size_t item_size,
|
||||
bool IQ_swap_)
|
||||
{
|
||||
return gnuradio::get_initial_sptr(new gr_complex_ip_packet_source(src_device,
|
||||
return gnuradio::get_initial_sptr(new gr_complex_ip_packet_source(std::move(src_device),
|
||||
origin_address,
|
||||
udp_port,
|
||||
udp_packet_size,
|
||||
@@ -99,11 +100,11 @@ gr_complex_ip_packet_source::make(std::string src_device,
|
||||
* The private constructor
|
||||
*/
|
||||
gr_complex_ip_packet_source::gr_complex_ip_packet_source(std::string src_device,
|
||||
__attribute__((unused)) std::string origin_address,
|
||||
__attribute__((unused)) const std::string& origin_address,
|
||||
int udp_port,
|
||||
int udp_packet_size,
|
||||
int n_baseband_channels,
|
||||
std::string wire_sample_type,
|
||||
const std::string& wire_sample_type,
|
||||
size_t item_size,
|
||||
bool IQ_swap_)
|
||||
: gr::sync_block("gr_complex_ip_packet_source",
|
||||
@@ -129,7 +130,7 @@ gr_complex_ip_packet_source::gr_complex_ip_packet_source(std::string src_device,
|
||||
exit(0);
|
||||
}
|
||||
std::cout << "d_wire_sample_type:" << d_wire_sample_type << std::endl;
|
||||
d_src_device = src_device;
|
||||
d_src_device = std::move(src_device);
|
||||
d_udp_port = udp_port;
|
||||
d_udp_payload_size = udp_packet_size;
|
||||
d_fifo_full = false;
|
||||
|
||||
@@ -84,19 +84,19 @@ private:
|
||||
public:
|
||||
typedef boost::shared_ptr<gr_complex_ip_packet_source> sptr;
|
||||
static sptr make(std::string src_device,
|
||||
std::string origin_address,
|
||||
const std::string& origin_address,
|
||||
int udp_port,
|
||||
int udp_packet_size,
|
||||
int n_baseband_channels,
|
||||
std::string wire_sample_type,
|
||||
const std::string& wire_sample_type,
|
||||
size_t item_size,
|
||||
bool IQ_swap_);
|
||||
gr_complex_ip_packet_source(std::string src_device,
|
||||
std::string origin_address,
|
||||
const std::string& origin_address,
|
||||
int udp_port,
|
||||
int udp_packet_size,
|
||||
int n_baseband_channels,
|
||||
std::string wire_sample_type,
|
||||
const std::string& wire_sample_type,
|
||||
size_t item_size,
|
||||
bool IQ_swap_);
|
||||
~gr_complex_ip_packet_source();
|
||||
|
||||
@@ -179,9 +179,9 @@ bool cfg_ad9361_streaming_ch(struct iio_context *ctx, struct stream_cfg *cfg, en
|
||||
bool config_ad9361_rx_local(uint64_t bandwidth_,
|
||||
uint64_t sample_rate_,
|
||||
uint64_t freq_,
|
||||
std::string rf_port_select_,
|
||||
std::string gain_mode_rx1_,
|
||||
std::string gain_mode_rx2_,
|
||||
const std::string& rf_port_select_,
|
||||
const std::string& gain_mode_rx1_,
|
||||
const std::string& gain_mode_rx2_,
|
||||
double rf_gain_rx1_,
|
||||
double rf_gain_rx2_)
|
||||
|
||||
@@ -291,13 +291,13 @@ bool config_ad9361_rx_local(uint64_t bandwidth_,
|
||||
}
|
||||
|
||||
|
||||
bool config_ad9361_rx_remote(std::string remote_host,
|
||||
bool config_ad9361_rx_remote(const std::string& remote_host,
|
||||
uint64_t bandwidth_,
|
||||
uint64_t sample_rate_,
|
||||
uint64_t freq_,
|
||||
std::string rf_port_select_,
|
||||
std::string gain_mode_rx1_,
|
||||
std::string gain_mode_rx2_,
|
||||
const std::string& rf_port_select_,
|
||||
const std::string& gain_mode_rx1_,
|
||||
const std::string& gain_mode_rx2_,
|
||||
double rf_gain_rx1_,
|
||||
double rf_gain_rx2_)
|
||||
{
|
||||
@@ -543,7 +543,7 @@ bool config_ad9361_lo_local(uint64_t bandwidth_,
|
||||
}
|
||||
|
||||
|
||||
bool config_ad9361_lo_remote(std::string remote_host,
|
||||
bool config_ad9361_lo_remote(const std::string& remote_host,
|
||||
uint64_t bandwidth_,
|
||||
uint64_t sample_rate_,
|
||||
uint64_t freq_rf_tx_hz_,
|
||||
@@ -680,7 +680,7 @@ bool config_ad9361_lo_remote(std::string remote_host,
|
||||
}
|
||||
|
||||
|
||||
bool ad9361_disable_lo_remote(std::string remote_host)
|
||||
bool ad9361_disable_lo_remote(const std::string& remote_host)
|
||||
{
|
||||
std::cout << "AD9361 Acquiring IIO REMOTE context in host " << remote_host << std::endl;
|
||||
struct iio_context *ctx;
|
||||
|
||||
@@ -92,19 +92,19 @@ bool cfg_ad9361_streaming_ch(struct iio_context *ctx, struct stream_cfg *cfg, en
|
||||
bool config_ad9361_rx_local(uint64_t bandwidth_,
|
||||
uint64_t sample_rate_,
|
||||
uint64_t freq_,
|
||||
std::string rf_port_select_,
|
||||
std::string gain_mode_rx1_,
|
||||
std::string gain_mode_rx2_,
|
||||
const std::string& rf_port_select_,
|
||||
const std::string& gain_mode_rx1_,
|
||||
const std::string& gain_mode_rx2_,
|
||||
double rf_gain_rx1_,
|
||||
double rf_gain_rx2_);
|
||||
|
||||
bool config_ad9361_rx_remote(std::string remote_host,
|
||||
bool config_ad9361_rx_remote(const std::string& remote_host,
|
||||
uint64_t bandwidth_,
|
||||
uint64_t sample_rate_,
|
||||
uint64_t freq_,
|
||||
std::string rf_port_select_,
|
||||
std::string gain_mode_rx1_,
|
||||
std::string gain_mode_rx2_,
|
||||
const std::string& rf_port_select_,
|
||||
const std::string& gain_mode_rx1_,
|
||||
const std::string& gain_mode_rx2_,
|
||||
double rf_gain_rx1_,
|
||||
double rf_gain_rx2_);
|
||||
|
||||
@@ -115,7 +115,7 @@ bool config_ad9361_lo_local(uint64_t bandwidth_,
|
||||
int64_t freq_dds_tx_hz_,
|
||||
double scale_dds_dbfs_);
|
||||
|
||||
bool config_ad9361_lo_remote(std::string remote_host,
|
||||
bool config_ad9361_lo_remote(const std::string& remote_host,
|
||||
uint64_t bandwidth_,
|
||||
uint64_t sample_rate_,
|
||||
uint64_t freq_rf_tx_hz_,
|
||||
@@ -124,7 +124,7 @@ bool config_ad9361_lo_remote(std::string remote_host,
|
||||
double scale_dds_dbfs_);
|
||||
|
||||
|
||||
bool ad9361_disable_lo_remote(std::string remote_host);
|
||||
bool ad9361_disable_lo_remote(const std::string& remote_host);
|
||||
|
||||
bool ad9361_disable_lo_local();
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
const size_t PAGE_SIZE = 0x10000;
|
||||
const unsigned int TEST_REGISTER_TRACK_WRITEVAL = 0x55AA;
|
||||
|
||||
fpga_switch::fpga_switch(std::string device_name)
|
||||
fpga_switch::fpga_switch(const std::string& device_name)
|
||||
{
|
||||
if ((d_device_descriptor = open(device_name.c_str(), O_RDWR | O_SYNC)) == -1)
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
class fpga_switch
|
||||
{
|
||||
public:
|
||||
fpga_switch(std::string device_name);
|
||||
fpga_switch(const std::string& device_name);
|
||||
~fpga_switch();
|
||||
void set_switch_position(int switch_position);
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ void GalileoE1DllPllVemlTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GalileoE1DllPllVemlTrackingFpga::GalileoE1DllPllVemlTrackingFpga(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
//dllpllconf_t trk_param;
|
||||
|
||||
@@ -52,7 +52,7 @@ class GalileoE1DllPllVemlTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GalileoE1DllPllVemlTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ void GalileoE5aDllPllTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GalileoE5aDllPllTrackingFpga::GalileoE5aDllPllTrackingFpga(
|
||||
ConfigurationInterface *configuration, std::string role,
|
||||
ConfigurationInterface *configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
//printf("creating the E5A tracking");
|
||||
|
||||
@@ -52,7 +52,7 @@ class GalileoE5aDllPllTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GalileoE5aDllPllTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ void GpsL1CaDllPllTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GpsL1CaDllPllTrackingFpga::GpsL1CaDllPllTrackingFpga(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
Dll_Pll_Conf_Fpga trk_param_fpga = Dll_Pll_Conf_Fpga();
|
||||
|
||||
@@ -53,7 +53,7 @@ class GpsL1CaDllPllTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL1CaDllPllTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ void GpsL2MDllPllTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GpsL2MDllPllTrackingFpga::GpsL2MDllPllTrackingFpga(
|
||||
ConfigurationInterface* configuration, std::string role,
|
||||
ConfigurationInterface* configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
//dllpllconf_t trk_param;
|
||||
|
||||
@@ -52,7 +52,7 @@ class GpsL2MDllPllTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL2MDllPllTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ void GpsL5DllPllTrackingFpga::stop_tracking()
|
||||
}
|
||||
|
||||
GpsL5DllPllTrackingFpga::GpsL5DllPllTrackingFpga(
|
||||
ConfigurationInterface *configuration, std::string role,
|
||||
ConfigurationInterface *configuration, const std::string& role,
|
||||
unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
|
||||
{
|
||||
//printf("L5 TRK CLASS CREATED\n");
|
||||
|
||||
@@ -50,7 +50,7 @@ class GpsL5DllPllTrackingFpga : public TrackingInterface
|
||||
{
|
||||
public:
|
||||
GpsL5DllPllTrackingFpga(ConfigurationInterface* configuration,
|
||||
std::string role,
|
||||
const std::string& role,
|
||||
unsigned int in_streams,
|
||||
unsigned int out_streams);
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
|
||||
// string manipulation
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
// constants
|
||||
#include "GPS_L1_CA.h"
|
||||
@@ -160,7 +161,7 @@ fpga_multicorrelator_8sc::fpga_multicorrelator_8sc(int32_t n_correlators,
|
||||
{
|
||||
//printf("tracking fpga class created\n");
|
||||
d_n_correlators = n_correlators;
|
||||
d_device_name = device_name;
|
||||
d_device_name = std::move(device_name);
|
||||
d_device_base = device_base;
|
||||
d_track_pilot = track_pilot;
|
||||
d_device_descriptor = 0;
|
||||
|
||||
Reference in New Issue
Block a user