Base class for building-blocks of the SimulationEnvironment. More...
#include <simulation_block.hpp>
Public Member Functions | |
BlockName | getName () const |
double | getSamplingTime () const |
BooleanType | isDefined () const |
SimulationBlock & | operator= (const SimulationBlock &rhs) |
returnValue | setName (BlockName _name) |
returnValue | setSamplingTime (double _samplingTime) |
SimulationBlock () | |
SimulationBlock (BlockName _name, double _samplingTime=DEFAULT_SAMPLING_TIME) | |
SimulationBlock (const SimulationBlock &rhs) | |
virtual | ~SimulationBlock () |
Protected Attributes | |
BlockName | name |
RealClock | realClock |
double | samplingTime |
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.
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.
[in] | _name | Name of the block, see documentation of BlockName for details. |
[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).
[in] | rhs | Right-hand side object. |
Definition at line 57 of file simulation_block.cpp.
SimulationBlock::~SimulationBlock | ( | ) | [virtual] |
Destructor.
Definition at line 65 of file simulation_block.cpp.
BlockName SimulationBlock::getName | ( | ) | const [inline] |
Returns name of the block.
double SimulationBlock::getSamplingTime | ( | ) | const [inline] |
Returns sampling time of the block.
BooleanType SimulationBlock::isDefined | ( | ) | const [inline] |
Returns whether the block has been defined (i.e. setup properly).
SimulationBlock & SimulationBlock::operator= | ( | const SimulationBlock & | rhs | ) |
Assignment Operator (deep copy).
[in] | rhs | Right-hand side object. |
Definition at line 70 of file simulation_block.cpp.
returnValue SimulationBlock::setName | ( | BlockName | _name | ) | [inline] |
Assigns new name to the block.
[in] | _name | New name. |
returnValue SimulationBlock::setSamplingTime | ( | double | _samplingTime | ) | [inline] |
Assigns new sampling time to the block.
[in] | _samplingTime | New sampling time. |
BlockName SimulationBlock::name [protected] |
Name of the block, see documentation of BlockName for details.
Definition at line 146 of file simulation_block.hpp.
RealClock SimulationBlock::realClock [protected] |
Clock for real time measurements to be optionally used in derived classes.
Definition at line 149 of file simulation_block.hpp.
double SimulationBlock::samplingTime [protected] |
Sampling time of the block.
Definition at line 147 of file simulation_block.hpp.