FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
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
 Calculates the state derivatives.
 
- Public Member Functions inherited from CSrcBase
 CSrcBase (std::string sSimObjectName, ISimObjectCreator *pCreator)
 The constructor.
 
virtual ~CSrcBase ()
 The destructor.
 
- Public Member Functions inherited from fhsim_base::SignalBlock
 SignalBlock (const std::string &name, ISimObjectCreator *creator, PortWidthRule rule=PortWidthRule::DefaultOne)
 

Protected Member Functions

void CalcOutput (const double dT, const double *const adX)
 Calculations of the output signals.
 
- Protected Member Functions inherited from CSrcBase
bool ReadTwinParameters (std::string sTagA, double dDefaultA, std::string sTagB, double dDefaultB, std::vector< double > &vals, 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.
 
virtual const double * SignalDot (const double dT, const double *const adX)
 The derivative of the output signal.
 
- Protected Member Functions inherited from fhsim_base::SignalBlock
int PortWidth () const
 The number of elements in the signals of the block (the parameter PortWidth).
 
std::vector< double > ReadScalarOrVector (ISimObjectCreator *creator, const std::string &name, double defaultValue) const
 
std::vector< double > ReadScalarOrVector (ISimObjectCreator *creator, const std::string &name) const
 

Protected Attributes

std::vector< double > m_adStartValues
 
std::vector< double > m_adStopValues
 
std::vector< double > m_adStartTimes
 
std::vector< double > m_adStopTimes
 
- Protected Attributes inherited from CSrcBase
std::vector< double > m_outDot
 The derivative of the output signal (the output signal is m_out).
 
- Protected Attributes inherited from fhsim_base::SignalBlock
std::vector< double > m_out
 The output buffer, PortWidth() elements. A block may resize it, for example to the width of an output port that differs from PortWidth.
 

Additional Inherited Members

- Public Types inherited from fhsim_base::SignalBlock
enum class  PortWidthRule { DefaultOne , Required }
 Whether the parameter PortWidth must be in the input file. More...
 
- Static Public Member Functions inherited from fhsim_base::SignalBlock
static int ReadCount (ISimObjectCreator *creator, const std::string &name, int defaultValue)
 
static int ReadCount (ISimObjectCreator *creator, const std::string &name)
 As above for a count that must be in the file.
 

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
inlinevirtual

Reimplemented from CSrcBase.

Member Data Documentation

◆ m_adStartTimes

std::vector<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

std::vector<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

std::vector<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

std::vector<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: