#ifndef GTL_MATH_SPEC_MEAS_H #define GTL_MATH_SPEC_MEAS_H #include #include #include #include "core/gtl_analog_data.h" #include "math_global.h" namespace gtl { namespace math { class MATH_EXPORT spec_meas { Q_GADGET public: spec_meas(); enum class types { rms, max, freq_max }; Q_ENUM(types) struct params { int id; QString chan; spec_meas::types type; qreal value; gtl::analog_data* ad; explicit params() { chan = ""; type = math::spec_meas::types::rms; value = 0; id = 0; ad = nullptr; } }; static qreal rms(const std::vector::iterator& begin, const std::vector::iterator& end); static qreal max(const std::vector::iterator& begin, const std::vector::iterator& end); static qreal freq_max(const std::vector::iterator& begin, const std::vector::iterator& end, const qreal resolution); }; } // namespace math } // namespace gtl Q_DECLARE_METATYPE(gtl::math::spec_meas::params) typedef QList QListSpecMeasParams; typedef QSharedPointer SpecMeasParamsListPtr; Q_DECLARE_METATYPE(SpecMeasParamsListPtr) #endif // GTL_MATH_SPEC_MEAS_H