Base class for building-blocks of the SimulationEnvironment. More...
#include <simulation_block.hpp>
Protected Attributes | |
BlockName | name |
RealClock | realClock |
double | samplingTime |
Protected Attributes inherited from UserInteraction | |
BlockStatus | status |
Protected Attributes inherited from Options | |
std::vector< OptionsList > | lists |
Protected Attributes inherited from Logging | |
std::vector< LogRecord > | logCollection |
int | logIdx |
Protected Attributes inherited from Plotting | |
PlotCollection | plotCollection |
Base class for building-blocks of the SimulationEnvironment.
The class SimulationBlock serves as base class for all building-blocks of the SimulationEnvironment. All common functionality, like storing of the sampling time, should be collected here.
Definition at line 56 of file simulation_block.hpp.
BEGIN_NAMESPACE_ACADO SimulationBlock::SimulationBlock | ( | ) |
Default constructor.
Definition at line 41 of file simulation_block.cpp.
SimulationBlock::SimulationBlock | ( | BlockName | _name, |
double | _samplingTime = DEFAULT_SAMPLING_TIME |
||
) |
Constructor which takes the name of the block and the sampling time.
@param[in] _name Name of the block, see documentation of BlockName for details. @param[in] _samplingTime Sampling time of the block (has to be positive).
Definition at line 48 of file simulation_block.cpp.
SimulationBlock::SimulationBlock | ( | const SimulationBlock & | rhs | ) |
Copy constructor (deep copy).
@param[in] rhs Right-hand side object.
Definition at line 57 of file simulation_block.cpp.
|
virtual |
Destructor.
Definition at line 65 of file simulation_block.cpp.
|
inline |
Returns name of the block.
|
inline |
Returns sampling time of the block.
|
inline |
Returns whether the block has been defined (i.e. setup properly).
SimulationBlock & SimulationBlock::operator= | ( | const SimulationBlock & | rhs | ) |
Assignment Operator (deep copy).
@param[in] rhs Right-hand side object.
Definition at line 70 of file simulation_block.cpp.
|
inline |
Assigns new name to the block.
@param[in] _name New name.
|
inline |
Assigns new sampling time to the block.
@param[in] _samplingTime New sampling time.
|
protected |
Name of the block, see documentation of BlockName for details.
Definition at line 146 of file simulation_block.hpp.
|
protected |
Clock for real time measurements to be optionally used in derived classes.
Definition at line 149 of file simulation_block.hpp.
|
protected |
Sampling time of the block.
Definition at line 147 of file simulation_block.hpp.