Marine systems simulation
CSrcBase Class Referenceabstract
+ Inheritance diagram for CSrcBase:
+ Collaboration diagram for CSrcBase:

Public Member Functions

 CSrcBase (std::string sSimObjectName, ISimObjectCreator *pCreator)
 The constructor.
 
virtual ~CSrcBase ()
 The destructor.
 
virtual void OdeFcn (const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
 Calculates the state derivatives. More...
 

Protected Member Functions

void ReadParameter (std::string sTag, double *adVals, double dDefault, ISimObjectCreator *pCreator)
 Utility function to read a parameter.
 
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 void CalcOutput (const double dT, const double *const adX)=0
 Calculations of the output signals. More...
 
virtual const double * Signal (const double dT, const double *const adX)
 The output signal.
 
virtual const double * SignalDot (const double dT, const double *const adX)
 The derivative of the output signal.
 

Protected Attributes

double * m_adOutSignal
 The output signal.
 
double * m_adOutSignalDot
 The derivative of the output signal.
 
int m_iPortWidth
 The width of the output port.
 
sfh::timers::Timer m_OutputTimer
 Timer to ensure that signals are updated only once per timestep.
 

Member Function Documentation

◆ CalcOutput()

virtual void CSrcBase::CalcOutput ( const double  dT,
const double *const  adX 
)
protectedpure virtual

Implemented in CRamp, CStep, CChirpsignal, and CSine.

◆ OdeFcn()

virtual void CSrcBase::OdeFcn ( const double  dT,
const double *const  adX,
double *const  adXDot,
const bool  bIsMajorTimeStep 
)
inlinevirtual

Reimplemented in CChirpsignal, and CStep.


The documentation for this class was generated from the following file: