8 #include "IMovableItemCallback.h"
9 #include "ISimGUICallback.h"
47 {
Std_TraceMsg(0,
"Caught Error in desctructor of EquationGain\r\n",
"", -1,
false,
true);}
70 CStdPostFixEval *lpEval =
new CStdPostFixEval;
74 lpEval->AddVariable(
"x");
75 lpEval->Equation(strEquation);
77 catch(CStdErrorInfo oError)
79 if(lpEval)
delete lpEval;
84 if(lpEval)
delete lpEval;
85 THROW_PARAM_ERROR(Std_Err_lSettingEquation, Std_Err_strSettingEquation,
"Equation", strEquation);
124 m_lpEval->SetVariable(
"x", fltInput);
136 if(strDataType ==
"EQUATION")
144 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
153 aryProperties.Add(
new TypeProperty(
"Equation", AnimatPropertyType::String, AnimatPropertyDirection::Set));
156 void EquationGain::Load(CStdXml &oXml)
Base class file for all Animat simulation objects.
Root namespace for the base simulation library for AnimatLab.
EquationGain()
Default constructor.
std::string m_strGainEquation
The post-fix gain equation.
Class that stores information about types for QueryProperty information.
virtual std::string GainEquation()
Gets the post-fix gain equation.
bool InLimits(float fltInput)
Tells whether the input value is within the defined limit ranges.
Declares the gain base class.
CStdPostFixEval * m_lpEval
The pointer to the postfix equation evaluator.
virtual float CalculateGain(float fltInput)
Calculates the gain.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
float CalculateLimitOutput(float fltInput)
Calculates the output when the input is outside of the limit ranges.
virtual ~EquationGain()
Destructor.
virtual void QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
Declares the equation gain class.
virtual void QueryProperties(CStdPtrArray< TypeProperty > &aryProperties)
Queries this object for a list of properties that can be changed using SetData.