Base class for simulating Actuator and Sensor behaviour wihtin the Process. More...
#include <transfer_device.hpp>
Public Member Functions | |
uint | getDim () const |
BooleanType | hasDeadTime () const |
BooleanType | hasNoise () const |
BooleanType | isEmpty () const |
TransferDevice & | operator= (const TransferDevice &rhs) |
TransferDevice () | |
TransferDevice (uint _dim, BlockName _name=BN_DEFAULT, double _samplingTime=DEFAULT_SAMPLING_TIME) | |
TransferDevice (const TransferDevice &rhs) | |
virtual | ~TransferDevice () |
Protected Member Functions | |
virtual returnValue | generateNoise (double startTime, double endTime, VariablesGrid ¤tNoise) const |
virtual returnValue | init (double _startTime=0.0, const DVector &_startValue=emptyConstVector) |
Protected Attributes | |
Noise ** | additiveNoise |
DVector | deadTimes |
VariablesGrid | lastSignal |
DVector | noiseSamplingTimes |
Base class for simulating Actuator and Sensor behaviour wihtin the Process.
The class TransferDevive serves as a base class for simulating Actuator and Sensor behaviour within the Process. It is intended to collect common features of the Actuator and Sensor.
At the moment, it basically stores an array of additive noise as well as the dead times of each component. It also provides a common way to generate noise.
Definition at line 61 of file transfer_device.hpp.
Default constructor.
Definition at line 46 of file transfer_device.cpp.
TransferDevice::TransferDevice | ( | uint | _dim, |
BlockName | _name = BN_DEFAULT , |
||
double | _samplingTime = DEFAULT_SAMPLING_TIME |
||
) |
Constructor which takes the dimension, the name and the sampling time of the transfer device.
[in] | _dim | Dimension of transfer device signal. |
[in] | _name | Name of the block. |
[in] | _samplingTime | Sampling time. |
Definition at line 54 of file transfer_device.cpp.
TransferDevice::TransferDevice | ( | const TransferDevice & | rhs | ) |
Copy constructor (deep copy).
[in] | rhs | Right-hand side object. |
Definition at line 75 of file transfer_device.cpp.
TransferDevice::~TransferDevice | ( | ) | [virtual] |
Destructor.
Definition at line 98 of file transfer_device.cpp.
returnValue TransferDevice::generateNoise | ( | double | startTime, |
double | endTime, | ||
VariablesGrid & | currentNoise | ||
) | const [protected, virtual] |
Generates additive noise on the given time interval based on the internal noise settings and sampling times.
[in] | startTime | Start time for noise generation. |
[in] | endTime | End time for noise generation. |
[out] | currentNoise | Generated additive noise on given time interval. |
Definition at line 194 of file transfer_device.cpp.
uint TransferDevice::getDim | ( | ) | const [inline] |
Returns dimension of transfer device.
BooleanType TransferDevice::hasDeadTime | ( | ) | const [inline] |
Returns whether dead time have been specified.
BooleanType TransferDevice::hasNoise | ( | ) | const [inline] |
Returns whether additive noise has been specified.
returnValue TransferDevice::init | ( | double | _startTime = 0.0 , |
const DVector & | _startValue = emptyConstVector |
||
) | [protected, virtual] |
Initializes all components of the transfer device and the lastSignal member based on the given start information.
[in] | _startTime | Start time. |
[in] | _startValue | Initial value of the transfer device signal. |
Reimplemented in Sensor.
Definition at line 158 of file transfer_device.cpp.
BooleanType TransferDevice::isEmpty | ( | ) | const [inline] |
Returns whether transfer device is empty (i.e. has dimension 0).
TransferDevice & TransferDevice::operator= | ( | const TransferDevice & | rhs | ) |
Assignment operator (deep copy).
[in] | rhs | Right-hand side object. |
Definition at line 111 of file transfer_device.cpp.
Noise** TransferDevice::additiveNoise [protected] |
Array of additive noise for each component of the transfer device signal.
Definition at line 177 of file transfer_device.hpp.
DVector TransferDevice::deadTimes [protected] |
Dead times for each component of the transfer device signal.
Definition at line 180 of file transfer_device.hpp.
VariablesGrid TransferDevice::lastSignal [protected] |
Most recent transfer device signal.
Definition at line 175 of file transfer_device.hpp.
DVector TransferDevice::noiseSamplingTimes [protected] |
Noise sampling times for each component of the transfer device signal.
Definition at line 178 of file transfer_device.hpp.