mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Make declarations more readable
Remove unused parameters
This commit is contained in:
parent
47f6855610
commit
a144d52c74
@ -29,15 +29,19 @@
|
|||||||
#include <utility> // for std::move
|
#include <utility> // for std::move
|
||||||
|
|
||||||
|
|
||||||
Channel::Channel(const ConfigurationInterface* configuration, uint32_t channel, std::shared_ptr<AcquisitionInterface> acq,
|
Channel::Channel(const ConfigurationInterface* configuration,
|
||||||
std::shared_ptr<TrackingInterface> trk, std::shared_ptr<TelemetryDecoderInterface> nav,
|
uint32_t channel,
|
||||||
const std::string& role, const std::string& signal_str, Concurrent_Queue<pmt::pmt_t>* queue)
|
std::shared_ptr<AcquisitionInterface> acq,
|
||||||
|
std::shared_ptr<TrackingInterface> trk,
|
||||||
|
std::shared_ptr<TelemetryDecoderInterface> nav,
|
||||||
|
const std::string& role,
|
||||||
|
const std::string& signal_str,
|
||||||
|
Concurrent_Queue<pmt::pmt_t>* queue) : acq_(std::move(acq)),
|
||||||
|
trk_(std::move(trk)),
|
||||||
|
nav_(std::move(nav)),
|
||||||
|
role_(role),
|
||||||
|
channel_(channel)
|
||||||
{
|
{
|
||||||
acq_ = std::move(acq);
|
|
||||||
trk_ = std::move(trk);
|
|
||||||
nav_ = std::move(nav);
|
|
||||||
role_ = role;
|
|
||||||
channel_ = channel;
|
|
||||||
channel_fsm_ = std::make_shared<ChannelFsm>();
|
channel_fsm_ = std::make_shared<ChannelFsm>();
|
||||||
|
|
||||||
flag_enable_fpga_ = configuration->property("GNSS-SDR.enable_FPGA", false);
|
flag_enable_fpga_ = configuration->property("GNSS-SDR.enable_FPGA", false);
|
||||||
|
@ -54,23 +54,27 @@ class Channel : public ChannelInterface
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
Channel(const ConfigurationInterface* configuration, uint32_t channel, std::shared_ptr<AcquisitionInterface> acq,
|
Channel(const ConfigurationInterface* configuration,
|
||||||
std::shared_ptr<TrackingInterface> trk, std::shared_ptr<TelemetryDecoderInterface> nav,
|
uint32_t channel,
|
||||||
const std::string& role, const std::string& signal_str, Concurrent_Queue<pmt::pmt_t>* queue);
|
std::shared_ptr<AcquisitionInterface> acq,
|
||||||
|
std::shared_ptr<TrackingInterface> trk,
|
||||||
|
std::shared_ptr<TelemetryDecoderInterface> nav,
|
||||||
|
const std::string& role,
|
||||||
|
const std::string& signal_str,
|
||||||
|
Concurrent_Queue<pmt::pmt_t>* queue);
|
||||||
|
|
||||||
~Channel() = default; //!< Destructor
|
~Channel() = default; //!< Destructor
|
||||||
|
|
||||||
void connect(gr::top_block_sptr top_block) override; //!< connects the tracking block to the top_block and to the telemetry
|
void connect(gr::top_block_sptr top_block) override; //!< Connects the tracking block to the top_block and to the telemetry
|
||||||
void disconnect(gr::top_block_sptr top_block) override;
|
void disconnect(gr::top_block_sptr top_block) override;
|
||||||
gr::basic_block_sptr get_left_block() override; //!< gets the gnuradio tracking block pointer
|
gr::basic_block_sptr get_left_block() override;
|
||||||
gr::basic_block_sptr get_left_block_trk() override; //!< gets the gnuradio tracking block pointer
|
gr::basic_block_sptr get_left_block_trk() override; //!< Gets the GNU Radio tracking block input pointer
|
||||||
gr::basic_block_sptr get_left_block_acq() override; //!< gets the gnuradio tracking block pointer
|
gr::basic_block_sptr get_left_block_acq() override; //!< Gets the GNU Radio acquisition block input pointer
|
||||||
gr::basic_block_sptr get_right_block() override;
|
gr::basic_block_sptr get_right_block() override; //!< Gets the GNU Radio channel block output pointer
|
||||||
|
|
||||||
inline std::string role() override { return role_; }
|
inline std::string role() override { return role_; }
|
||||||
//! Returns "Channel"
|
inline std::string implementation() override { return std::string("Channel"); } //!< Returns "Channel"
|
||||||
inline std::string implementation() override { return std::string("Channel"); }
|
inline size_t item_size() override { return 2 * sizeof(float); }
|
||||||
inline size_t item_size() override { return 0; }
|
|
||||||
inline Gnss_Signal get_signal() const override { return gnss_signal_; }
|
inline Gnss_Signal get_signal() const override { return gnss_signal_; }
|
||||||
void start_acquisition() override; //!< Start the State Machine
|
void start_acquisition() override; //!< Start the State Machine
|
||||||
void stop_channel() override; //!< Stop the State Machine
|
void stop_channel() override; //!< Stop the State Machine
|
||||||
|
@ -38,9 +38,10 @@ channel_msg_receiver_cc_sptr channel_msg_receiver_make_cc(std::shared_ptr<Channe
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat) : gr::block("channel_msg_receiver_cc", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)),
|
channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm,
|
||||||
d_channel_fsm(std::move(channel_fsm)),
|
bool repeat) : gr::block("channel_msg_receiver_cc", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)),
|
||||||
d_repeat(repeat)
|
d_channel_fsm(std::move(channel_fsm)),
|
||||||
|
d_repeat(repeat)
|
||||||
{
|
{
|
||||||
this->message_port_register_in(pmt::mp("events"));
|
this->message_port_register_in(pmt::mp("events"));
|
||||||
this->set_msg_handler(pmt::mp("events"),
|
this->set_msg_handler(pmt::mp("events"),
|
||||||
|
@ -25,21 +25,15 @@
|
|||||||
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ArraySignalConditioner::ArraySignalConditioner(const ConfigurationInterface *configuration,
|
ArraySignalConditioner::ArraySignalConditioner(std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
|
||||||
std::shared_ptr<GNSSBlockInterface> in_filt,
|
std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||||
std::shared_ptr<GNSSBlockInterface> res,
|
std::shared_ptr<GNSSBlockInterface> res,
|
||||||
std::string role,
|
std::string role) : data_type_adapt_(std::move(data_type_adapt)),
|
||||||
std::string implementation) : data_type_adapt_(std::move(data_type_adapt)),
|
in_filt_(std::move(in_filt)),
|
||||||
in_filt_(std::move(in_filt)),
|
res_(std::move(res)),
|
||||||
res_(std::move(res)),
|
role_(std::move(role))
|
||||||
role_(std::move(role)),
|
|
||||||
implementation_(std::move(implementation))
|
|
||||||
{
|
{
|
||||||
connected_ = false;
|
connected_ = false;
|
||||||
if (configuration)
|
|
||||||
{
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,9 +40,10 @@ class ArraySignalConditioner : public GNSSBlockInterface
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
ArraySignalConditioner(const ConfigurationInterface *configuration,
|
ArraySignalConditioner(std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
|
std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||||
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation);
|
std::shared_ptr<GNSSBlockInterface> res,
|
||||||
|
std::string role);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
~ArraySignalConditioner() = default;
|
~ArraySignalConditioner() = default;
|
||||||
@ -55,7 +56,7 @@ public:
|
|||||||
inline std::string role() override { return role_; }
|
inline std::string role() override { return role_; }
|
||||||
//! Returns "Array_Signal_Conditioner"
|
//! Returns "Array_Signal_Conditioner"
|
||||||
inline std::string implementation() override { return "Array_Signal_Conditioner"; }
|
inline std::string implementation() override { return "Array_Signal_Conditioner"; }
|
||||||
inline size_t item_size() override { return 0; }
|
inline size_t item_size() override { return data_type_adapt_->item_size(); }
|
||||||
|
|
||||||
inline std::shared_ptr<GNSSBlockInterface> data_type_adapter() { return data_type_adapt_; }
|
inline std::shared_ptr<GNSSBlockInterface> data_type_adapter() { return data_type_adapt_; }
|
||||||
inline std::shared_ptr<GNSSBlockInterface> input_filter() { return in_filt_; }
|
inline std::shared_ptr<GNSSBlockInterface> input_filter() { return in_filt_; }
|
||||||
@ -66,7 +67,6 @@ private:
|
|||||||
std::shared_ptr<GNSSBlockInterface> in_filt_;
|
std::shared_ptr<GNSSBlockInterface> in_filt_;
|
||||||
std::shared_ptr<GNSSBlockInterface> res_;
|
std::shared_ptr<GNSSBlockInterface> res_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
std::string implementation_;
|
|
||||||
bool connected_;
|
bool connected_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,27 +19,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "signal_conditioner.h"
|
#include "signal_conditioner.h"
|
||||||
#include "configuration_interface.h"
|
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
SignalConditioner::SignalConditioner(const ConfigurationInterface *configuration,
|
SignalConditioner::SignalConditioner(std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
|
||||||
std::shared_ptr<GNSSBlockInterface> in_filt,
|
std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||||
std::shared_ptr<GNSSBlockInterface> res,
|
std::shared_ptr<GNSSBlockInterface> res,
|
||||||
std::string role,
|
std::string role) : data_type_adapt_(std::move(data_type_adapt)),
|
||||||
std::string implementation) : data_type_adapt_(std::move(data_type_adapt)),
|
in_filt_(std::move(in_filt)),
|
||||||
in_filt_(std::move(in_filt)),
|
res_(std::move(res)),
|
||||||
res_(std::move(res)),
|
role_(std::move(role))
|
||||||
role_(std::move(role)),
|
|
||||||
implementation_(std::move(implementation))
|
|
||||||
{
|
{
|
||||||
connected_ = false;
|
connected_ = false;
|
||||||
if (configuration)
|
|
||||||
{
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class ConfigurationInterface;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This class wraps blocks to change data_type_adapter, input_filter and resampler
|
* \brief This class wraps blocks to change data_type_adapter, input_filter and resampler
|
||||||
* to be applied to the input flow of sampled signal.
|
* to be applied to the input flow of sampled signal.
|
||||||
@ -37,9 +35,10 @@ class SignalConditioner : public GNSSBlockInterface
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
SignalConditioner(const ConfigurationInterface *configuration,
|
SignalConditioner(std::shared_ptr<GNSSBlockInterface> data_type_adapt,
|
||||||
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
|
std::shared_ptr<GNSSBlockInterface> in_filt,
|
||||||
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation);
|
std::shared_ptr<GNSSBlockInterface> res,
|
||||||
|
std::string role);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
~SignalConditioner() = default;
|
~SignalConditioner() = default;
|
||||||
@ -53,7 +52,7 @@ public:
|
|||||||
|
|
||||||
inline std::string implementation() override { return "Signal_Conditioner"; } //!< Returns "Signal_Conditioner"
|
inline std::string implementation() override { return "Signal_Conditioner"; } //!< Returns "Signal_Conditioner"
|
||||||
|
|
||||||
inline size_t item_size() override { return 0; }
|
inline size_t item_size() override { return data_type_adapt_->item_size(); }
|
||||||
|
|
||||||
inline std::shared_ptr<GNSSBlockInterface> data_type_adapter() { return data_type_adapt_; }
|
inline std::shared_ptr<GNSSBlockInterface> data_type_adapter() { return data_type_adapt_; }
|
||||||
inline std::shared_ptr<GNSSBlockInterface> input_filter() { return in_filt_; }
|
inline std::shared_ptr<GNSSBlockInterface> input_filter() { return in_filt_; }
|
||||||
@ -64,7 +63,6 @@ private:
|
|||||||
std::shared_ptr<GNSSBlockInterface> in_filt_;
|
std::shared_ptr<GNSSBlockInterface> in_filt_;
|
||||||
std::shared_ptr<GNSSBlockInterface> res_;
|
std::shared_ptr<GNSSBlockInterface> res_;
|
||||||
std::string role_;
|
std::string role_;
|
||||||
std::string implementation_;
|
|
||||||
bool connected_;
|
bool connected_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -242,20 +242,20 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalConditioner(
|
|||||||
if (signal_conditioner == "Array_Signal_Conditioner")
|
if (signal_conditioner == "Array_Signal_Conditioner")
|
||||||
{
|
{
|
||||||
// instantiate the array version
|
// instantiate the array version
|
||||||
std::unique_ptr<GNSSBlockInterface> conditioner_ = std::make_unique<ArraySignalConditioner>(configuration,
|
std::unique_ptr<GNSSBlockInterface> conditioner_ = std::make_unique<ArraySignalConditioner>(
|
||||||
GetBlock(configuration, role_datatypeadapter, 1, 1),
|
GetBlock(configuration, role_datatypeadapter, 1, 1),
|
||||||
GetBlock(configuration, role_inputfilter, 1, 1),
|
GetBlock(configuration, role_inputfilter, 1, 1),
|
||||||
GetBlock(configuration, role_resampler, 1, 1),
|
GetBlock(configuration, role_resampler, 1, 1),
|
||||||
role_conditioner, "Signal_Conditioner");
|
role_conditioner);
|
||||||
return conditioner_;
|
return conditioner_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// single-antenna version
|
// single-antenna version
|
||||||
std::unique_ptr<GNSSBlockInterface> conditioner_ = std::make_unique<SignalConditioner>(configuration,
|
std::unique_ptr<GNSSBlockInterface> conditioner_ = std::make_unique<SignalConditioner>(
|
||||||
GetBlock(configuration, role_datatypeadapter, 1, 1),
|
GetBlock(configuration, role_datatypeadapter, 1, 1),
|
||||||
GetBlock(configuration, role_inputfilter, 1, 1),
|
GetBlock(configuration, role_inputfilter, 1, 1),
|
||||||
GetBlock(configuration, role_resampler, 1, 1),
|
GetBlock(configuration, role_resampler, 1, 1),
|
||||||
role_conditioner, "Signal_Conditioner");
|
role_conditioner);
|
||||||
return conditioner_;
|
return conditioner_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user