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

56 lines
1.6 KiB
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.

/*
* MoveToPointWithTimeout.hh
*
* Created on: 8 июл. 2020 г.
* Author: LeonidTitov
*/
#ifndef UMLIBRARY_TECHNOLOGICAL_FUNCTION_MOVETOPOINTWITHTIMEOUT_HH_
#define UMLIBRARY_TECHNOLOGICAL_FUNCTION_MOVETOPOINTWITHTIMEOUT_HH_
#include "MoveToPoint.hh"
namespace technological { namespace function {
class MoveToPointWithTimeout : public MoveToPoint {
public:
struct Setting {
float retention_accuracy; //!<Точность достижения позиции.
float on_position_timeout; //!<Время удержания заданного положения, с.
float permit_speed_factor; //!<Допустимая скорость, отн.
float permit_time; //!<Допустимое время, в секундах.
Setting();
bool isValid();
};
void configure( Setting & config );
short getState() const;
void stop();
MoveToPointWithTimeout( ResourceKeeper< technological::adapter::TieInterface<vector::ITechValue> > & control_system_wrapper,
ResourceKeeper<vector::ITechValue> & speed_limit,
ResourceKeeper<vector::ITechValue> & torque_limit,
ResourceKeeper<vector::ITechValue> & acc_limit
);
protected:
virtual void on_start( Input & input, float start_point, systemic::time_t on_position_timeout );
virtual void in_progress();
private:
systemic::Timer compite_timer;
float permit_speed_factor;
float permit_time;
bool move_failure;
};
}}
#endif /* UMLIBRARY_TECHNOLOGICAL_FUNCTION_MOVETOPOINTWITHTIMEOUT_HH_ */