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.
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.
[in] | _nY | Number of proces outputs. |
[in] | _samplingTime | Sampling time. |
Definition at line 51 of file sensor.cpp.
Sensor::Sensor | ( | const Sensor & | rhs | ) |
Copy constructor (deep copy).
[in] | rhs | Right-hand side object. |
Definition at line 58 of file sensor.cpp.
Sensor::~Sensor | ( | ) | [virtual] |
Destructor.
Definition at line 63 of file sensor.cpp.
returnValue Sensor::addSensorNoise | ( | VariablesGrid & | _y | ) | const [protected] |
Adds noise to given signal.
[in,out] | _y | Sensor signal to be noised. |
Definition at line 292 of file sensor.cpp.
returnValue Sensor::delaySensorOutput | ( | VariablesGrid & | _y | ) | [protected] |
Delays given signal according to the internal dead times.
[in,out] | _y | Sensor signal to be delayed. |
Definition at line 224 of file sensor.cpp.
returnValue Sensor::getDelayedOutputGrid | ( | const VariablesGrid & | _y, |
VariablesGrid & | _yDelayed | ||
) | const [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.
uint Sensor::getNY | ( | ) | const [inline] |
Returns number of sensor signal components.
double Sensor::getOutputDeadTime | ( | uint | idx | ) | const [inline] |
Returns dead time of given component of the sensor signal.
[in] | idx | Index of component. |
DVector Sensor::getOutputDeadTimes | ( | ) | const [inline] |
Returns dead times of the sensor signal.
Noise* Sensor::getOutputNoise | ( | uint | idx | ) | const [inline] |
Returns pointer to additive noise of given component of the sensor signal.
[in] | idx | Index of component. |
returnValue Sensor::init | ( | double | _startTime = 0.0 , |
const DVector & | _startValue = emptyConstVector |
||
) | [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).
[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.
[in] | idx | Index of component. |
[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.
[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.
[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.
returnValue Sensor::step | ( | VariablesGrid & | _y | ) | [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.