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

60 lines
1.4 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.

/*
* SubtractValueAsync.hh
*
* Created on: 8 июн. 2020 г.
* Author: LeonidTitov
*/
#ifndef UMLIBRARY_PROCESSING_ACS_SUBTRACTVALUEASYNC_HH_
#define UMLIBRARY_PROCESSING_ACS_SUBTRACTVALUEASYNC_HH_
#include "ControlSystemInterface.hh"
#include "../../systemic/ISignal.hh"
#include "../../systemic/IProcess.hh"
namespace processing { namespace acs {
//!Задание сигнала с учетом коррекции по сигналу, вычитание.
class SubtractValueAsync : public ValueToValueUnitInterface {
public:
//!Установить заданное значение.
void set( TypeInput );
TypeOutput get() const;
void set_output( SetInterface * );
void reset();
SubtractValueAsync( systemic::ISignal & subtrahend );
private:
systemic::ISignal & subtrahend;
SetInterface * output;
};
//!Вычитание сигнала из заданного значения.
class SubtractValueProcess : public ValueToValueUnitInterface, public systemic::IProcess {
public:
void set( TypeInput );
TypeOutput get() const;
void set_output( SetInterface * );
void reset();
void process();
SubtractValueProcess( systemic::ISignal & subtrahend );
private:
TypeInput demand;
systemic::ISignal & subtrahend;
volatile bool proc_enable;
SetInterface * output;
};
}}
#endif /* UMLIBRARY_PROCESSING_ACS_SUBTRACTVALUEASYNC_HH_ */