diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc index 924efd2da..5e4b5a4bc 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc @@ -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_); diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h index e79f586c9..ddcc4dd40 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h @@ -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; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc index 5a61f5b5a..d9f369527 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.cc @@ -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; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h index 5e4ff6df7..2dfeca167 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_cc.h @@ -51,7 +51,7 @@ class glonass_l1_ca_telemetry_decoder_cc; typedef boost::shared_ptr 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);