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

44 lines
1.3 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.

/*
* StatusTrigger.hh
*
* Created on: 4 авг. 2020 г.
* Author: LeonidTitov
*/
#ifndef UMLIBRARY_APPLICATION_SCHEMATIC_STATUSTRIGGER_HH_
#define UMLIBRARY_APPLICATION_SCHEMATIC_STATUSTRIGGER_HH_
#include "../ISetupStep.hh"
namespace application { namespace schematic {
//!Триггер реализующий логику хранения состояния бита устанвливаемого и сбрасываемого действиями.
struct StatusTrigger : public ISetupStep {
struct Links {
Environment::StatusId trigger; //!<Итоговый статус.
Environment::Id set; //!<"Действие" по установке статуса в 1.
Environment::Id reset; //!<"Действие" по установке статуса в 0.
};
//!Значения по умолчанию.
struct Setting {
uint16_t initial_value; //!<Начальное значение.
};
const Links & links;
const Setting & config;
bool input( Environment & env ) { return true; }
void build( Environment & env );
StatusTrigger( const Links & links, const Setting & config );
};
}}
#endif /* UMLIBRARY_APPLICATION_SCHEMATIC_STATUSTRIGGER_HH_ */