MotorControlModuleSDFM_TMS3.../Projects/EFC_Application/UMLibrary/processing/acs/PiControllerProcess.hh

87 lines
1.9 KiB
C++
Raw Permalink Normal View History

/*
* PiControllerProcess.hh
*
* Created on: 5 <EFBFBD><EFBFBD><EFBFBD>. 2020 <EFBFBD>.
* Author: LeonidTitov
*/
#ifndef UMLIBRARY_PROCESSING_ACS_PICONTROLLERPROCESS_HH_
#define UMLIBRARY_PROCESSING_ACS_PICONTROLLERPROCESS_HH_
#include "ControlSystemInterface.hh"
#include "../../systemic/ISignal.hh"
#include "../../systemic/IProcess.hh"
#include "../../common/ShadowGuard.hh"
#include "../../control/regulator/PiController.hh"
namespace processing { namespace acs {
//!<21><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
class PiControllerProcess : public ValueToValueUnitInterface, public systemic::IProcess {
public:
typedef control::regulator::PiController Regulator;
//!<21><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
void set( TypeInput );
TypeOutput get() const;
void set_output( SetInterface * );
vector::ITechValue & getLimit();
void setSampleTime( float ts_in_second );
void process();
void reset();
vector::ITechValue & getTrackingTract();
PiControllerProcess( Regulator & regulator, systemic::ISignal & current_value );
private:
Regulator & regulator;
systemic::ISignal & current_value;
struct Limit : vector::ITechValue {
void set( float limit ) {
regulator.setOutputLimit(limit);
}
float get() const {
return regulator.getOutputLimit();
}
Regulator & regulator;
Limit(Regulator & regulator) : regulator(regulator) {}
} limit;
struct TrackingTract : vector::ITechValue {
void set( float tracked_value ) {
value = tracked_value;
}
float get() const {
return value;
}
control::Value value;
TrackingTract() : value(0.0f) {}
} tracking;
bool proc_enable;
bool isConnected() const;
SetInterface * output;
control::Value value_error; //!<<3C><><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
control::Value value_output;
};
}}
#endif /* UMLIBRARY_PROCESSING_ACS_PICONTROLLERPROCESS_HH_ */