65 if( m_bUseLimits && ( (fltInput < m_fltLowerLimit) || (fltInput > m_fltUpperLimit) ) )
83 if(fltInput < m_fltLowerLimit)
84 return m_fltLowerOutput;
86 if(fltInput > m_fltUpperLimit)
87 return m_fltUpperOutput;
99 void UseLimits(
bool bVal);
102 void LowerLimit(
float fltVal);
105 void UpperLimit(
float fltVal);
108 void LowerOutput(
float fltVal);
111 void UpperOutput(
float fltVal);
129 virtual float CalculateGain(
float fltInput) = 0;
131 virtual bool SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError =
true);
132 virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
133 virtual void Load(CStdXml &oXml);
136 Gain ANIMAT_PORT *
LoadGain(Simulator *lpSim, std::string strName, CStdXml &oXml);
Root namespace for the base simulation library for AnimatLab.
float m_fltUpperLimit
The upper limit value that is checked if UseLimits is true.
bool InLimits(float fltInput)
Tells whether the input value is within the defined limit ranges.
float m_fltLowerLimit
The lower limit value that is checked if UseLimits is true.
float CalculateLimitOutput(float fltInput)
Calculates the output when the input is outside of the limit ranges.
float m_fltLowerOutput
The lower limit output that is used if UseLimits is true and the input is below the lower limit...
float m_fltUpperOutput
The upper limit output that is used if UseLimits is true and the input is above the upper limit...
bool m_bUseLimits
Determines whether or not the gain uses upper and lower limits during its calculations.
Gain * LoadGain(Simulator *lpSim, std::string strName, CStdXml &oXml)
Loads a gain object.