MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/application/schematic/LateBindingSignal.hh
2024-06-07 11:12:56 +03:00

67 lines
1.7 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.

/*
* LateBindingSignal.hh
*
* Created on: 28 сент. 2020 г.
* Author: LeonidTitov
*/
#ifndef UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSIGNAL_HH_
#define UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSIGNAL_HH_
#include "../../schematic/LateBindingValue.hpp"
#include "../ISetupStep.hh"
namespace application { namespace schematic {
//!Сигнал позднего связывания.
struct LateBindingSignal : public ISetupStep {
bool input( Environment & env ) { return true; }
void build( Environment & env );
struct Links {
Environment::SignalId late; //!<Сигнал позднего связывания.
Environment::Id bind; //!<Интерфейс связывания.
};
//!Начальные значения.
struct Setting {
float default_value; //!<Значение cигнала до связывания.
};
const Links & links;
const Setting & setting;
LateBindingSignal( const Links & links, const Setting & setting ) :
links(links), setting(setting) {}
};
//!Связывание сигнала позднего связывания.
struct BindSignal : public ISetupStep {
::schematic::LateBindingValue<float> * late_signal = nullptr;
systemic::ISignal * origin = nullptr;
bool input( Environment & env );
void build( Environment & env );
struct Links {
Environment::Id bind; //!<Интерфейс связывания.
Environment::SignalId origin; //!<Сигнал для привязки.
};
const Links & links;
BindSignal( const Links & links ) :
links(links) {}
};
}}
#endif /* UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSIGNAL_HH_ */