1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 04:00:34 +00:00

Pass GNSS_Satellite objects by reference instead of by value

Added override keyworkd
This commit is contained in:
Carles Fernandez 2017-10-12 18:32:49 +02:00
parent 9cec205132
commit f2aaf0c851
4 changed files with 16 additions and 16 deletions

View File

@ -67,7 +67,7 @@ GlonassL1CaTelemetryDecoder::~GlonassL1CaTelemetryDecoder()
{}
void GlonassL1CaTelemetryDecoder::set_satellite(Gnss_Satellite satellite)
void GlonassL1CaTelemetryDecoder::set_satellite(const Gnss_Satellite & satellite)
{
satellite_ = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
telemetry_decoder_->set_satellite(satellite_);

View File

@ -63,12 +63,12 @@ public:
{
return "GLONASS_L1_CA_Telemetry_Decoder";
}
void connect(gr::top_block_sptr top_block);
void disconnect(gr::top_block_sptr top_block);
gr::basic_block_sptr get_left_block();
gr::basic_block_sptr get_right_block();
void set_satellite(Gnss_Satellite satellite);
void set_channel(int channel){telemetry_decoder_->set_channel(channel);}
void connect(gr::top_block_sptr top_block) override;
void disconnect(gr::top_block_sptr top_block) override;
gr::basic_block_sptr get_left_block() override;
gr::basic_block_sptr get_right_block() override;
void set_satellite(const Gnss_Satellite & satellite) override;
void set_channel(int channel) override {telemetry_decoder_->set_channel(channel);}
void reset()
{
return;

View File

@ -49,14 +49,14 @@ using google::LogMessage;
glonass_l1_ca_telemetry_decoder_cc_sptr
glonass_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump)
glonass_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite & satellite, bool dump)
{
return glonass_l1_ca_telemetry_decoder_cc_sptr(new glonass_l1_ca_telemetry_decoder_cc(satellite, dump));
}
glonass_l1_ca_telemetry_decoder_cc::glonass_l1_ca_telemetry_decoder_cc(
Gnss_Satellite satellite,
const Gnss_Satellite & satellite,
bool dump) :
gr::block("glonass_l1_ca_telemetry_decoder_cc", gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)),
gr::io_signature::make(1, 1, sizeof(Gnss_Synchro)))
@ -415,7 +415,7 @@ int glonass_l1_ca_telemetry_decoder_cc::general_work (int noutput_items __attrib
}
void glonass_l1_ca_telemetry_decoder_cc::set_satellite(Gnss_Satellite satellite)
void glonass_l1_ca_telemetry_decoder_cc::set_satellite(const Gnss_Satellite & satellite)
{
d_satellite = Gnss_Satellite(satellite.get_system(), satellite.get_PRN());
DLOG(INFO) << "Setting decoder Finite State Machine to satellite "<< d_satellite;

View File

@ -51,7 +51,7 @@ class glonass_l1_ca_telemetry_decoder_cc;
typedef boost::shared_ptr<glonass_l1_ca_telemetry_decoder_cc> glonass_l1_ca_telemetry_decoder_cc_sptr;
glonass_l1_ca_telemetry_decoder_cc_sptr glonass_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
glonass_l1_ca_telemetry_decoder_cc_sptr glonass_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite & satellite, bool dump);
/*!
* \brief This class implements a block that decodes the GNAV data defined in GLONASS ICD v5.1
@ -62,9 +62,9 @@ glonass_l1_ca_telemetry_decoder_cc_sptr glonass_l1_ca_make_telemetry_decoder_cc(
class glonass_l1_ca_telemetry_decoder_cc : public gr::block
{
public:
~glonass_l1_ca_telemetry_decoder_cc(); //!< Class destructor
void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel
~glonass_l1_ca_telemetry_decoder_cc(); //!< Class destructor
void set_satellite(const Gnss_Satellite & satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel
/*!
* \brief This is where all signal processing takes place
@ -74,8 +74,8 @@ public:
private:
friend glonass_l1_ca_telemetry_decoder_cc_sptr
glonass_l1_ca_make_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
glonass_l1_ca_telemetry_decoder_cc(Gnss_Satellite satellite, bool dump);
glonass_l1_ca_make_telemetry_decoder_cc(const Gnss_Satellite & satellite, bool dump);
glonass_l1_ca_telemetry_decoder_cc(const Gnss_Satellite & satellite, bool dump);
void decode_string(double *symbols, int frame_length);