MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/technological/adapter/ControlSystemTie.hh
2024-06-07 11:12:56 +03:00

37 lines
804 B
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.

/*
* ControlSystemTie.hh
*
* Created on: 30 мая 2020 г.
* Author: LeonidTitov
*/
#ifndef UMLIBRARY_TECHNOLOGICAL_ADAPTER_CONTROLSYSTEMTIE_HH_
#define UMLIBRARY_TECHNOLOGICAL_ADAPTER_CONTROLSYSTEMTIE_HH_
#include "ControlSystemWrapper.hpp"
namespace technological { namespace adapter {
template<class Interconnect, class Output>
struct OnControlUnitConnect {
void operator()( Interconnect * control_unit, Output * output ) {
control_unit->set_output(output);
control_unit->reset();
}
};
template<class Interconnect>
struct OnControlUnitDisconnect {
void operator()( Interconnect * control_unit ) {
control_unit->reset();
control_unit->set_output( nullptr );
}
};
}}
#endif /* UMLIBRARY_TECHNOLOGICAL_ADAPTER_CONTROLSYSTEMTIE_HH_ */