34 lines
806 B
C++
34 lines
806 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_ */
|