45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
/*
|
||
* BrakeSetup.h
|
||
*
|
||
* Created on: 21 сент. 2019 г.
|
||
* Author: LeonidTitov
|
||
*/
|
||
|
||
#ifndef SOURCE_APPLICATION_raw_signals_BRAKESETUP_H_
|
||
#define SOURCE_APPLICATION_raw_signals_BRAKESETUP_H_
|
||
|
||
#include "../ISetupStep.hh"
|
||
|
||
#include "../../driver/IDiscreteOutput.hh"
|
||
|
||
#include <exception>
|
||
|
||
namespace application { namespace board {
|
||
|
||
struct Brake : public ISetupStep {
|
||
|
||
typedef driver::IDiscreteOutput IDiscreteOutput;
|
||
|
||
IDiscreteOutput * output = nullptr;
|
||
|
||
bool input( Environment & env );
|
||
void build( Environment & env );
|
||
|
||
struct Links {
|
||
Environment::Id discrete_output; //!<Дискретный выход управления тормозом.
|
||
Environment::Id brake; //!<Модуль управления тормозом.
|
||
|
||
Environment::StatusId engaged; //!<Тормоз наложен.
|
||
Environment::StatusId disengaged; //!<Тормоз снят.
|
||
};
|
||
|
||
const Links & links;
|
||
|
||
Brake( const Links & links ) : links(links) {}
|
||
};
|
||
|
||
}
|
||
}
|
||
|
||
#endif /* SOURCE_APPLICATION_raw_signals_BRAKESETUP_H_ */
|