Allows to simulate the behaviour of sensors within the Process. More...
#include <sensor.hpp>
Allows to simulate the behaviour of sensors within the Process.
The class Sensor allows to simulate the behaviour of sensors within the Process.
Definition at line 54 of file sensor.hpp.
BEGIN_NAMESPACE_ACADO Sensor::Sensor | ( | ) |
Default constructor.
Definition at line 46 of file sensor.cpp.
Sensor::Sensor | ( | uint | _nY, |
double | _samplingTime = DEFAULT_SAMPLING_TIME |
||
) |
Constructor which takes the number of process outputs and the sampling time.
@param[in] _nY Number of proces outputs. @param[in] _samplingTime Sampling time.
Definition at line 51 of file sensor.cpp.
Sensor::Sensor | ( | const Sensor & | rhs | ) |
Copy constructor (deep copy).
@param[in] rhs Right-hand side object.
Definition at line 58 of file sensor.cpp.
|
virtual |
Destructor.
Definition at line 63 of file sensor.cpp.
|
protected |
Adds noise to given signal.
@param[in,out] _y Sensor signal to be noised.
Definition at line 292 of file sensor.cpp.
|
protected |
Delays given signal according to the internal dead times.
@param[in,out] _y Sensor signal to be delayed.
Definition at line 224 of file sensor.cpp.
|
protected |
Returns time grid for representing the given sensor signal in delayed form.
[in] | _y | Sensor signal to be delayed. |
[out] | _yDelayed | Time grid for representing delayed sensor signal. |
Definition at line 258 of file sensor.cpp.
|
inline |
Returns number of sensor signal components.
\return Number of sensor signal components.
|
inline |
Returns dead time of given component of the sensor signal.
@param[in] idx Index of component.
|
inline |
Returns dead times of the sensor signal.
Returns pointer to additive noise of given component of the sensor signal.
@param[in] idx Index of component.
|
virtual |
Initializes all components of the sensor and the lastSignal member based on the given start information.
[in] | _startTime | Start time. |
[in] | _startValue | Initial value of the sensor signal. |
Reimplemented from TransferDevice.
Definition at line 180 of file sensor.cpp.
Assignment operator (deep copy).
@param[in] rhs Right-hand side object.
Definition at line 68 of file sensor.cpp.
returnValue Sensor::setOutputDeadTime | ( | uint | idx, |
double | _deadTime | ||
) |
Assigns new dead time to given component of the sensor signal.
@param[in] idx Index of component. @param[in] _deadTimes New dead time.
Definition at line 160 of file sensor.cpp.
returnValue Sensor::setOutputDeadTimes | ( | const DVector & | _deadTimes | ) |
Assigns new dead times to each component of the sensor signal.
@param[in] _deadTimes New dead times.
Definition at line 125 of file sensor.cpp.
returnValue Sensor::setOutputDeadTimes | ( | double | _deadTime | ) |
Assigns new dead time to all components of the sensor signal.
@param[in] _deadTime New dead time.
Definition at line 144 of file sensor.cpp.
returnValue Sensor::setOutputNoise | ( | const Noise & | _noise, |
double | _noiseSamplingTime | ||
) |
Assigns new additive noise with given sampling time to all components of the sensor signal.
[in] | _noise | New additive noise. |
[in] | _noiseSamplingTime | New noise sampling time. |
Definition at line 81 of file sensor.cpp.
returnValue Sensor::setOutputNoise | ( | uint | idx, |
const Noise & | _noise, | ||
double | _noiseSamplingTime | ||
) |
Assigns new additive noise with given sampling time to given component of the sensor signal.
[in] | idx | Index of component. |
[in] | _noise | New additive noise. |
[in] | _noiseSamplingTime | New noise sampling time. |
Definition at line 102 of file sensor.cpp.
|
virtual |
Performs one step of the sensor transforming the given signal according to the internal sensor settings.
[in,out] | _y | Sensor signal to be transformed. |
Definition at line 192 of file sensor.cpp.