64 lines
1.2 KiB
C++
64 lines
1.2 KiB
C++
|
|
/*
|
|||
|
|
* ValueOverride.cpp
|
|||
|
|
*
|
|||
|
|
* Created on: 2 <EFBFBD><EFBFBD><EFBFBD>. 2023 <EFBFBD>.
|
|||
|
|
* Author: titov
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#ifndef UMLIBRARY_PROCESSING_ACS_VALUEOVERRIDE_CPP_
|
|||
|
|
#define UMLIBRARY_PROCESSING_ACS_VALUEOVERRIDE_CPP_
|
|||
|
|
|
|||
|
|
#include "ValueOverride.hh"
|
|||
|
|
|
|||
|
|
#include <cmath>
|
|||
|
|
|
|||
|
|
void processing::acs::ValueOverride::set( TypeInput point ) {
|
|||
|
|
|
|||
|
|
if( control_override ) {
|
|||
|
|
|
|||
|
|
TypeInput input;
|
|||
|
|
|
|||
|
|
input = value;
|
|||
|
|
|
|||
|
|
output->set( input );
|
|||
|
|
|
|||
|
|
} else
|
|||
|
|
output->set( point );
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
processing::acs::ValueOverride::TypeOutput processing::acs::ValueOverride::get() const {
|
|||
|
|
|
|||
|
|
//todo: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>.
|
|||
|
|
return 0.0f;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void processing::acs::ValueOverride::set_output( SetInterface * new_output ) {
|
|||
|
|
|
|||
|
|
output = new_output;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void processing::acs::ValueOverride::reset() {}
|
|||
|
|
|
|||
|
|
void processing::acs::ValueOverride::configure( Setting & config ) {
|
|||
|
|
|
|||
|
|
value = config.value;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool processing::acs::ValueOverride::Setting::isValid() {
|
|||
|
|
|
|||
|
|
using namespace std;
|
|||
|
|
|
|||
|
|
return not isnan(value);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
processing::acs::ValueOverride::ValueOverride(systemic::IStatus & control_override) :
|
|||
|
|
control_override(control_override), value(0.0f), output(nullptr) {}
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif /* UMLIBRARY_PROCESSING_ACS_VALUEOVERRIDE_CPP_ */
|