MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/processing/acs/PhaseSpaceOverride.cpp
2024-06-07 11:12:56 +03:00

63 lines
1.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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) {}