Marine systems simulation
CStep Class Reference
+ Inheritance diagram for CStep:
+ Collaboration diagram for CStep:

Public Member Functions

 CStep (std::string sSimObjectName, ISimObjectCreator *pCreator)
 The constructor sets the pointer to the output object and the parser object.
 
void OdeFcn (const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
 Calculates the state derivatives. More...
 
- Public Member Functions inherited from CSrcBase
 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 CalcOutput (const double dT, const double *const adX)
 Calculations of the output signals. More...
 
- Protected Member Functions inherited from CSrcBase
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_adStartValues
 
double * m_adStopValues
 
double * m_adStartTimes
 
double * m_adStopTimes
 
- Protected Attributes inherited from CSrcBase
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()

void CStep::CalcOutput ( const double  dT,
const double *const  adX 
)
protectedvirtual

Implements CSrcBase.

◆ OdeFcn()

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

Reimplemented from CSrcBase.

Member Data Documentation

◆ m_adStartTimes

double* CStep::m_adStartTimes
protected

The time to start the step. This may either be a scalar, or a comma separated list referrint to the different elements of the signal.

◆ m_adStartValues

double* CStep::m_adStartValues
protected

The start value of the output port. This may either be a scalar, or a comma separated list refering to the different elements of the signal.

◆ m_adStopTimes

double* CStep::m_adStopTimes
protected

The time to stop the step. This may either be a scalar, or a comma separated list referrint to the different elements of the signal. If this is negative, this is a true step function with unlimited duration. If it is larger than zero, it is a pulse function, which goes back to the StartValue after the StopTime.

◆ m_adStopValues

double* CStep::m_adStopValues
protected

The stop value of the output port. This may either be a scalar, or a comma separated list refering to the different elements of the signal.


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