58 lines
1.4 KiB
C++
58 lines
1.4 KiB
C++
|
|
/*
|
|||
|
|
* InverterDebug.h
|
|||
|
|
*
|
|||
|
|
* Created on: 4 <EFBFBD><EFBFBD><EFBFBD>. 2017 <EFBFBD>.
|
|||
|
|
* Author: titov
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#ifndef SOURCES_TECHNOLOGICAL_INVERTERDEBUG_H_
|
|||
|
|
#define SOURCES_TECHNOLOGICAL_INVERTERDEBUG_H_
|
|||
|
|
|
|||
|
|
#include "../../peripheral/IPwmOverride.hh"
|
|||
|
|
|
|||
|
|
#include "../../driver/IInverter.hh"
|
|||
|
|
#include "../../common/ResourceKeeper.hpp"
|
|||
|
|
|
|||
|
|
#include "../ITechFunction.hh"
|
|||
|
|
|
|||
|
|
namespace technological { namespace function {
|
|||
|
|
|
|||
|
|
class InverterDebug : public ITechFunction {
|
|||
|
|
public:
|
|||
|
|
struct Input {
|
|||
|
|
float time_a;
|
|||
|
|
float time_b;
|
|||
|
|
float time_c;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
InverterDebug( peripheral::IPwmOverride & u, peripheral::IPwmOverride & v, peripheral::IPwmOverride & w,
|
|||
|
|
ResourceKeeper<driver::IInverter> & inv );
|
|||
|
|
|
|||
|
|
bool run( const char * value, std::size_t size );
|
|||
|
|
//!<21><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
void stop();
|
|||
|
|
//!<21><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
short getState() const;
|
|||
|
|
//!<21><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
bool getResult( char * value, std::size_t size ) const { return true; }
|
|||
|
|
|
|||
|
|
~InverterDebug() noexcept;
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
peripheral::IPwmOverride & pwm_u;
|
|||
|
|
peripheral::IPwmOverride & pwm_v;
|
|||
|
|
peripheral::IPwmOverride & pwm_w;
|
|||
|
|
|
|||
|
|
ResourceKeeper<driver::IInverter> & inverter_resource;
|
|||
|
|
driver::IInverter * inverter;
|
|||
|
|
|
|||
|
|
static bool validate( Input & input );
|
|||
|
|
void prepare_time(const Input & input, float (& time)[3]);
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
} }
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endif /* SOURCES_TECHNOLOGICAL_INVERTERDEBUG_H_ */
|