31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
/*
|
||
* InverterTest.cpp
|
||
*
|
||
* Created on: 5 мая 2021 г.
|
||
* Author: titov
|
||
*/
|
||
|
||
#include "InverterTest.hh"
|
||
#include "../../technological/function/InverterDebug.hh"
|
||
|
||
bool application::procedures::InverterTest::input( Environment & env ) {
|
||
|
||
return ( resource = env.rholder.getShared<driver::IInverter>( links.inverter ) )
|
||
and grab( pwm_u, env.rholder.getShared<peripheral::IPwmOverride>( links.pwm_u ) )
|
||
and grab( pwm_v, env.rholder.getShared<peripheral::IPwmOverride>( links.pwm_v ) )
|
||
and grab( pwm_w, env.rholder.getShared<peripheral::IPwmOverride>( links.pwm_w ) );
|
||
|
||
}
|
||
|
||
void application::procedures::InverterTest::build( Environment & env ) {
|
||
|
||
technological::function::InverterDebug * inverter_test =
|
||
memories::instance_object<technological::function::InverterDebug>(env.static_object_ma,
|
||
*pwm_u, *pwm_v, *pwm_w, *resource);
|
||
|
||
env.rholder.share<technological::ITechFunction>(*inverter_test, links.function);
|
||
|
||
}
|
||
|
||
application::procedures::InverterTest::InverterTest( const Links & links ) : links(links) {}
|