LimitRms

class LimitRms : public vslib::Component

Public Functions

inline LimitRms(std::string_view name, Component &parent, const double iteration_period = 5e-6)

Constructor for the LimitRms Component, initializes rms_limit, and rms_time_constant Parameters.

Parameters:
  • name – Name of this Limit Component

  • parent – Parent of this Limit Component

  • iteration_period – Iteration period at which this Limit Component is called

inline bool limit(const double input) noexcept

Checks the provided value against RMS limit and returns compliant value

Parameters:

input – Numerical input to be checked against set RMS limit

Returns:

Returns true if the provided input does not violate the limit, false otherwise

inline void reset() noexcept

Resets this Limit Component to the initial state of buffers and buffer pointers.

inline virtual std::optional<fgc4::utils::Warning> verifyParameters() override

Verifies parameters after they are set, to be called after parameters of this component are modified. The checks need to run on the inactive buffer values.

Public Members

Parameter<double> rms_limit_min

Minimal value of root-mean square.

Parameter<double> rms_limit_max

Maximal value of root-mean square.

Parameter<double> rms_time_constant

Time constant to calculate filter factor.