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

64 lines
1.2 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.

/*
* ValueOverride.cpp
*
* Created on: 2 дек. 2023 г.
* 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: Реализовать либо ошибку, либо еще что.
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_ */