19#include "sfh/timers/Timer.h"
27 CSrcBase(std::string sSimObjectName, ISimObjectCreator* pCreator);
33 virtual void OdeFcn(
const double dT,
const double*
const adX,
double*
const adXDot,
const bool bIsMajorTimeStep){};
35#ifdef FH_VISUALIZATION
37 virtual void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator) { }
40 virtual void RenderUpdate(
const double T,
const double*
const X) { }
45 void ReadParameter(std::string sTag,
double* adVals,
double dDefault, ISimObjectCreator* pCreator);
48 bool ReadTwinParameters(std::string sTagA,
double dDefaultA, std::string sTagB,
double dDefaultB,
double* adVals, ISimObjectCreator* pCreator);
51 virtual void CalcOutput(
const double dT,
const double*
const adX) = 0;
54 virtual const double*
Signal(
const double dT,
const double*
const adX);
57 virtual const double*
SignalDot(
const double dT,
const double*
const adX);
Definition: CSrcBase.h:24
CSrcBase(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor.
virtual const double * SignalDot(const double dT, const double *const adX)
The derivative of the output signal.
virtual void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
Definition: CSrcBase.h:33
sfh::timers::Timer m_OutputTimer
Timer to ensure that signals are updated only once per timestep.
Definition: CSrcBase.h:62
virtual void CalcOutput(const double dT, const double *const adX)=0
Calculations of the output signals.
void ReadParameter(std::string sTag, double *adVals, double dDefault, ISimObjectCreator *pCreator)
Utility function to read a parameter.
virtual ~CSrcBase()
The destructor.
double * m_adOutSignal
The output signal.
Definition: CSrcBase.h:59
int m_iPortWidth
The width of the output port.
Definition: CSrcBase.h:61
bool ReadTwinParameters(std::string sTagA, double dDefaultA, std::string sTagB, double dDefaultB, double *adVals, ISimObjectCreator *pCreator)
Utility function to read a parameter with two possible representations or units.
virtual const double * Signal(const double dT, const double *const adX)
The output signal.
double * m_adOutSignalDot
The derivative of the output signal.
Definition: CSrcBase.h:60