MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/application/schematic/EnableAction.hh

49 lines
1.4 KiB
C++
Raw Normal View History

2024-06-07 11:12:56 +03:00
/*
* DiscreteSwitch.hh
*
* Created on: 21 мая 2021 г.
* Author: sozonov
*/
#ifndef UMLIBRARY_APPLICATION_SCHEMATIC_ENABLEACTION_HH_
#define UMLIBRARY_APPLICATION_SCHEMATIC_ENABLEACTION_HH_
#include "../ISetupStep.hh"
#include "../../systemic/IStatus.hh"
#include "../../schematic/DiscreteSwitch.hh"
namespace application { namespace schematic {
//!Модуль вызова функции при наличии разрешающего статуса.
struct EnableAction : public ISetupStep {
typedef systemic::IFunctor<void> Action;
typedef systemic::IValue<bool> Status;
//Входы
//Action * input_signal = nullptr; //!<Входной сигнал.
Status * enable_status = nullptr; //!<Статус разрешающий выходной сигнал.
Action * output_signal = nullptr; //!<Выходной сигнал.
bool input( Environment & env );
void build( Environment & env );
struct Links {
Environment::Id input; //!<Действие.
Environment::StatusId enable; //!<Разрешение действия.
Environment::Id output; //!<Целевое действие.
};
const Links & links;
EnableAction( const Links & links ) : links(links) {}
};
}}
#endif /* UMLIBRARY_APPLICATION_SCHEMATIC_ENABLEACTION_HH_ */