88 lines
2.1 KiB
C++
88 lines
2.1 KiB
C++
/*
|
|
* ManagedPiControlProcess.hh
|
|
*
|
|
* Created on: 14 ÿíâ. 2022 ã.
|
|
* Author: titov
|
|
*/
|
|
|
|
#ifndef UMLIBRARY_PROCESSING_ACS_MANAGEDPICONTROLPROCESS_HH_
|
|
#define UMLIBRARY_PROCESSING_ACS_MANAGEDPICONTROLPROCESS_HH_
|
|
|
|
|
|
#include "ControlSystemInterface.hh"
|
|
|
|
#include "../../systemic/ISignal.hh"
|
|
#include "../../systemic/IStatus.hh"
|
|
#include "../../systemic/IProcess.hh"
|
|
#include "../../systemic/FlagStiker.hh"
|
|
#include "../../systemic/ApplyParameter.hpp"
|
|
#include "../../common/ShadowGuard.hh"
|
|
|
|
|
|
#include "../../control/regulator/ManagedPiController.hh"
|
|
|
|
namespace processing { namespace acs {
|
|
|
|
//!Ïðîöåññ âûïîëíåíèÿ óïðàâëÿåìîãî ÏÈ-Ðåãóëÿòîðà, ñ ðàçðåøåíèåì èíòåãðèðîâàíèÿ è âîçìîæíîñòüþ ñáðîñà èíòåãðàëüíîé ñóììû.
|
|
class ManagedPiControlProcess : public ValueToValueUnitInterface, public systemic::IProcess {
|
|
public:
|
|
typedef control::regulator::ManagedPiController Regulator;
|
|
|
|
//!Óñòàíîâèòü îøèáêó ðåãóëèðîâàíèÿ.
|
|
void set( TypeInput );
|
|
TypeOutput get() const;
|
|
void set_output( SetInterface * );
|
|
|
|
vector::ITechValue & getLimit();
|
|
|
|
void setSampleTime( float ts_in_second );
|
|
void process();
|
|
void reset();
|
|
|
|
void apply();
|
|
|
|
ManagedPiControlProcess( Regulator & regulator,
|
|
systemic::ISignal & reset_value, systemic::IStatus & operate,
|
|
systemic::Parameter<Regulator> params );
|
|
|
|
private:
|
|
Regulator & regulator;
|
|
systemic::ISignal & reset_value;
|
|
systemic::IStatus & operate;
|
|
|
|
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;
|
|
|
|
bool need_reset;
|
|
bool proc_enable;
|
|
|
|
bool isConnected() const;
|
|
void do_reset();
|
|
|
|
SetInterface * output;
|
|
|
|
control::Value value_error; //!<Âõîä: îøèáêà ðåãóëÿòîðà.
|
|
control::Value value_output;
|
|
|
|
std::atomic_flag update_lock;
|
|
systemic::ApplyParameter<Regulator> apply_params;
|
|
};
|
|
|
|
}}
|
|
|
|
|
|
|
|
#endif /* UMLIBRARY_PROCESSING_ACS_MANAGEDPICONTROLPROCESS_HH_ */
|