Base class for simulating Actuator and Sensor behaviour wihtin the Process. More...
#include <transfer_device.hpp>
Protected Attributes | |
Noise ** | additiveNoise |
DVector | deadTimes |
VariablesGrid | lastSignal |
DVector | noiseSamplingTimes |
Protected Attributes inherited from SimulationBlock | |
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 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.
BEGIN_NAMESPACE_ACADO TransferDevice::TransferDevice | ( | ) |
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).
@param[in] rhs Right-hand side object.
Definition at line 75 of file transfer_device.cpp.
|
virtual |
Destructor.
Definition at line 98 of file transfer_device.cpp.
|
protectedvirtual |
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.
|
inline |
Returns dimension of transfer device.
|
inline |
Returns whether dead time have been specified.
|
inline |
Returns whether additive noise has been specified.
|
protectedvirtual |
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.
|
inline |
Returns whether transfer device is empty (i.e. has dimension 0).
TransferDevice & TransferDevice::operator= | ( | const TransferDevice & | rhs | ) |
Assignment operator (deep copy).
@param[in] rhs Right-hand side object.
Definition at line 111 of file transfer_device.cpp.
|
protected |
Array of additive noise for each component of the transfer device signal.
Definition at line 177 of file transfer_device.hpp.
|
protected |
Dead times for each component of the transfer device signal.
Definition at line 180 of file transfer_device.hpp.
|
protected |
Most recent transfer device signal.
Definition at line 175 of file transfer_device.hpp.
|
protected |
Noise sampling times for each component of the transfer device signal.
Definition at line 178 of file transfer_device.hpp.