63 lines
1.3 KiB
C++
63 lines
1.3 KiB
C++
/*
|
||
* PhaseSpaceOverride.cpp
|
||
*
|
||
* Created on: 2 дек. 2023 г.
|
||
* Author: titov
|
||
*/
|
||
|
||
#include "PhaseSpaceOverride.hh"
|
||
|
||
#include <cmath>
|
||
|
||
void processing::acs::PhaseSpaceOverride::set( TypeInput point ) {
|
||
|
||
if( control_override ) {
|
||
|
||
TypeInput input;
|
||
|
||
input.value = value;
|
||
input.d_value = d_value;
|
||
|
||
output->set( input );
|
||
|
||
} else
|
||
output->set( point );
|
||
|
||
}
|
||
|
||
processing::acs::PhaseSpaceOverride::TypeOutput processing::acs::PhaseSpaceOverride::get() const {
|
||
|
||
//todo: Реализовать либо ошибку, либо еще что.
|
||
|
||
processing::acs::PhaseSpaceOverride::TypeOutput none(0.0f, 0.0f);
|
||
return none;
|
||
|
||
}
|
||
|
||
void processing::acs::PhaseSpaceOverride::set_output( SetInterface * new_output ) {
|
||
|
||
output = new_output;
|
||
|
||
}
|
||
|
||
void processing::acs::PhaseSpaceOverride::reset() {}
|
||
|
||
void processing::acs::PhaseSpaceOverride::configure( Setting & config ) {
|
||
|
||
value = config.value;
|
||
d_value = config.d_value;
|
||
|
||
}
|
||
|
||
bool processing::acs::PhaseSpaceOverride::Setting::isValid() {
|
||
|
||
using namespace std;
|
||
|
||
return not isnan(value) and isfinite(d_value);
|
||
|
||
}
|
||
|
||
processing::acs::PhaseSpaceOverride::PhaseSpaceOverride(systemic::IStatus & control_override) :
|
||
control_override(control_override), value(0.0f), d_value(0.0f), output(nullptr) {}
|
||
|