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

66 lines
1.8 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.

/*
* LateBindingStatus.hh
*
* Created on: 6 нояб. 2020 г.
* Author: developer
*/
#ifndef UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSTATUS_HH_
#define UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSTATUS_HH_
#include "../../schematic/LateBindingValue.hpp"
#include "../ISetupStep.hh"
#include "../../systemic/IStatus.hh"
namespace application { namespace schematic {
//!Сигнал позднего связывания.
struct LateBindingStatus : public ISetupStep {
bool input( Environment & env ) { return true; }
void build( Environment & env );
struct Links {
Environment::StatusId late; //!<Сигнал позднего связывания.
Environment::Id bind; //!<Интерфейс связывания.
};
//!Начальные значения.
struct Setting {
bool default_value; //!<Значение статуса до связывания.
};
const Links & links;
const Setting & setting;
LateBindingStatus( const Links & links, const Setting & setting ) :
links(links), setting(setting) {}
};
//!Связывание сигнала позднего связывания.
struct BindStatus : public ISetupStep {
::schematic::LateBindingValue<bool> * late_status = nullptr;
::systemic::IStatus * origin = nullptr;
bool input( Environment & env );
void build( Environment & env );
struct Links {
Environment::Id bind; //!<Интерфейс связывания.
Environment::StatusId origin; //!<Сигнал для привязки.
};
const Links & links;
BindStatus( const Links & links ) :
links(links) {}
};
}}
#endif /* UMLIBRARY_APPLICATION_SCHEMATIC_LATEBINDINGSTATUS_HH_ */