45 lines
998 B
C++
45 lines
998 B
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_ */
|