mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-08 19:23:07 +00:00
Apply fixes by clang-tidy
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user