34 lines
810 B
C++
34 lines
810 B
C++
/*
|
||
* InverterEndpoint.hh
|
||
*
|
||
* Created on: 30 мая 2020 г.
|
||
* Author: LeonidTitov
|
||
*/
|
||
|
||
#ifndef UMLIBRARY_TECHNOLOGICAL_ADAPTER_INVERTERENDPOINT_HH_
|
||
#define UMLIBRARY_TECHNOLOGICAL_ADAPTER_INVERTERENDPOINT_HH_
|
||
|
||
#include "ControlSystemWrapper.hpp"
|
||
|
||
#include "../../driver/IInverter.hh"
|
||
|
||
namespace technological { namespace adapter {
|
||
|
||
struct OnInverterEndpointConnect {
|
||
void operator()( driver::IInverter * inverter ) {
|
||
inverter->enPulse();
|
||
}
|
||
};
|
||
|
||
struct OnInverterEndpointDisconnect {
|
||
void operator()( driver::IInverter * inverter ) {
|
||
inverter->disPulse();
|
||
}
|
||
};
|
||
|
||
typedef EndpointWrapper<driver::IInverter, driver::IInverter, OnInverterEndpointConnect, OnInverterEndpointDisconnect> InverterEndpoint;
|
||
|
||
}}
|
||
|
||
#endif /* UMLIBRARY_TECHNOLOGICAL_ADAPTER_INVERTERENDPOINT_HH_ */
|