Public Member Functions | Protected Attributes

Base class for building-blocks of the SimulationEnvironment. More...

#include <simulation_block.hpp>

Inheritance diagram for SimulationBlock:
Inheritance graph
[legend]

List of all members.

Public Member Functions

BlockName getName () const
double getSamplingTime () const
BooleanType isDefined () const
SimulationBlockoperator= (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

Detailed Description

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.

Author:
Hans Joachim Ferreau, Boris Houska

Definition at line 56 of file simulation_block.hpp.


Constructor & Destructor Documentation

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.

Parameters:
[in]_nameName of the block, see documentation of BlockName for details.
[in]_samplingTimeSampling time of the block (has to be positive).

Definition at line 48 of file simulation_block.cpp.

Copy constructor (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 57 of file simulation_block.cpp.

Destructor.

Definition at line 65 of file simulation_block.cpp.


Member Function Documentation

BlockName SimulationBlock::getName ( ) const [inline]

Returns name of the block.

Returns:
Name of the block
double SimulationBlock::getSamplingTime ( ) const [inline]

Returns sampling time of the block.

Returns:
Sampling time of the block

Returns whether the block has been defined (i.e. setup properly).

Returns:
BT_TRUE iff block has been defined,
BT_FALSE otherwise
SimulationBlock & SimulationBlock::operator= ( const SimulationBlock rhs)

Assignment Operator (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 70 of file simulation_block.cpp.

Assigns new name to the block.

Parameters:
[in]_nameNew name.
Returns:
SUCCESSFUL_RETURN
returnValue SimulationBlock::setSamplingTime ( double  _samplingTime) [inline]

Assigns new sampling time to the block.

Parameters:
[in]_samplingTimeNew sampling time.
Returns:
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS

Member Data Documentation

Name of the block, see documentation of BlockName for details.

Definition at line 146 of file simulation_block.hpp.

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.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:01:40