MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/technological/drivecontrol/ControlStateActions.cpp
2024-06-07 11:12:56 +03:00

50 lines
1.1 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.

/*
* ControlStateActions.cpp
*
* Created on: 23 окт. 2022 г.
* Author: titov
*/
#include "ControlStateActions.hh"
bool technological::drivecontrol::ControlStateActions::on_entry() {
bool result;
if( result = state.on_entry() )
entry_action();
return result;
}
bool technological::drivecontrol::ControlStateActions::execute(CommandCode code,
const char * args,
std::size_t size ) {
return state.execute(code, args, size);
}
technological::drivecontrol::ControlStateActions::CommandCode technological::drivecontrol::ControlStateActions::isComplite() const {
return state.isComplite();
}
void technological::drivecontrol::ControlStateActions::reset() {
state.reset();
}
void technological::drivecontrol::ControlStateActions::on_exit() {
exit_action();
state.on_exit();
}
technological::drivecontrol::ControlStateActions::ControlStateActions(
IExecutorState & state, Action & do_entry, Action & do_exit) : state(state), entry_action(do_entry), exit_action(do_exit) {}