diff options
Diffstat (limited to 'host/lib/cal')
-rw-r--r-- | host/lib/cal/iq_cal.cpp | 18 | ||||
-rw-r--r-- | host/lib/cal/pwr_cal.cpp | 30 |
2 files changed, 24 insertions, 24 deletions
diff --git a/host/lib/cal/iq_cal.cpp b/host/lib/cal/iq_cal.cpp index f5640b01e..f891f4f2c 100644 --- a/host/lib/cal/iq_cal.cpp +++ b/host/lib/cal/iq_cal.cpp @@ -34,31 +34,31 @@ public: { } - std::string get_name() const + std::string get_name() const override { return _name; } //! Return the name of this calibration table - std::string get_serial() const + std::string get_serial() const override { return _serial; } //! Timestamp of acquisition time - uint64_t get_timestamp() const + uint64_t get_timestamp() const override { return _timestamp; } - void set_interp_mode(const interp_mode interp) + void set_interp_mode(const interp_mode interp) override { UHD_ASSERT_THROW( interp == interp_mode::LINEAR || interp == interp_mode::NEAREST_NEIGHBOR); _interp = interp; } - std::complex<double> get_cal_coeff(const double freq) const + std::complex<double> get_cal_coeff(const double freq) const override { UHD_ASSERT_THROW(!_coeffs.empty()); // Find the first coefficient in the map that maps to a larger frequency @@ -95,13 +95,13 @@ public: void set_cal_coeff(const double freq, const std::complex<double> coeff, const double suppression_abs = 0, - const double suppression_delta = 0) + const double suppression_delta = 0) override { _coeffs[freq] = coeff; _supp[freq] = {suppression_abs, suppression_delta}; } - void clear() + void clear() override { _coeffs.clear(); _supp.clear(); @@ -110,7 +110,7 @@ public: /************************************************************************** * Container API (Serialization/Deserialization) *************************************************************************/ - std::vector<uint8_t> serialize() + std::vector<uint8_t> serialize() override { // This is a magic value to estimate the amount of space the builder will // have to reserve on top of the coeff data. @@ -151,7 +151,7 @@ public: // This will amend the existing table. If that's not desired, then it is // necessary to call clear() ahead of time. - void deserialize(const std::vector<uint8_t>& data) + void deserialize(const std::vector<uint8_t>& data) override { auto verifier = flatbuffers::Verifier(data.data(), data.size()); if (!VerifyIQCalCoeffsBuffer(verifier)) { diff --git a/host/lib/cal/pwr_cal.cpp b/host/lib/cal/pwr_cal.cpp index 82af208df..ef7128f97 100644 --- a/host/lib/cal/pwr_cal.cpp +++ b/host/lib/cal/pwr_cal.cpp @@ -55,17 +55,17 @@ public: /************************************************************************** * Container API (Basics) *************************************************************************/ - std::string get_name() const + std::string get_name() const override { return _name; } - std::string get_serial() const + std::string get_serial() const override { return _serial; } - uint64_t get_timestamp() const + uint64_t get_timestamp() const override { return _timestamp; } @@ -77,7 +77,7 @@ public: const double min_power, const double max_power, const double freq, - const boost::optional<int> temperature = boost::none) + const boost::optional<int> temperature = boost::none) override { if (min_power > max_power) { throw uhd::runtime_error( @@ -96,7 +96,7 @@ public: // a struct). double get_power(const double gain, const double freq, - const boost::optional<int> temperature = boost::none) const + const boost::optional<int> temperature = boost::none) const override { UHD_ASSERT_THROW(!_data.empty()); const uint64_t freqi = static_cast<uint64_t>(freq); @@ -134,33 +134,33 @@ public: freq, gain, f1, gain1, f2, gain2, power11, power12, power21, power22); } - void clear() + void clear() override { _data.clear(); } - void set_temperature(const int temperature) + void set_temperature(const int temperature) override { _default_temp = temperature; } - int get_temperature() const + int get_temperature() const override { return _default_temp; } - void set_ref_gain(const double gain) + void set_ref_gain(const double gain) override { _ref_gain = gain; } - double get_ref_gain() const + double get_ref_gain() const override { return _ref_gain; } - uhd::meta_range_t get_power_limits( - const double freq, const boost::optional<int> temperature = boost::none) const + uhd::meta_range_t get_power_limits(const double freq, + const boost::optional<int> temperature = boost::none) const override { const auto table = at_nearest(_get_table(temperature), uint64_t(freq)); return uhd::meta_range_t(table.min_power, table.max_power); @@ -168,7 +168,7 @@ public: double get_gain(const double power_dbm, const double freq, - const boost::optional<int> temperature = boost::none) const + const boost::optional<int> temperature = boost::none) const override { UHD_ASSERT_THROW(!_data.empty()); const uint64_t freqi = static_cast<uint64_t>(freq); @@ -223,7 +223,7 @@ public: /************************************************************************** * Container API (Serialization/Deserialization) *************************************************************************/ - std::vector<uint8_t> serialize() + std::vector<uint8_t> serialize() override { const size_t initial_size_bytes = 1024 * 20; // 20 kiB as an initial guess flatbuffers::FlatBufferBuilder builder(initial_size_bytes); @@ -268,7 +268,7 @@ public: // This will amend the existing table. If that's not desired, then it is // necessary to call clear() ahead of time. - void deserialize(const std::vector<uint8_t>& data) + void deserialize(const std::vector<uint8_t>& data) override { auto verifier = flatbuffers::Verifier(data.data(), data.size()); if (!VerifyPowerCalBuffer(verifier)) { |