#ifndef CPROCESS_CLEAN_H
#define CPROCESS_CLEAN_H

#include "cprocess_coatclean.h"
#define PATH_CLEANTABLE_CLEAN "cleantable-clean.dat"
//清洗操作
class CProcess_Clean : public CProcess_CoatClean {
public:
    CProcess_Clean(const QString& name, int32_t id);

    virtual void ReadWriteCleanTable(bool bWrite);


    void Init_Pos() override;

public:
    QString GetActionName(int iActionID);
    void all_action_before(int iActionType, int iStep);
    void single_action_before(int iActionType, int32_t iType, double dTime, int iRPM, int iStep);
    bool single_action_wait(int iActionType, int32_t iType, double dTime, int iRPM, int iStep);
    void single_action_after(int iActionType, int32_t iType, double dTime, int iRPM, int iStep);
    void all_action_after(int iActionType, int iStep);

public:
    void nozzeloperator_clean(int32_t iType);
    void CleanArmUp(bool bUp);
    virtual void SpindleUp(bool bUp, bool bAfterChecked = false) override;
    void SpindleUpCheck(bool bUp);
    //bool  isSpindleUp();
    void MoveCleanWaitPos();
    void MoveCleanPreparePos();
    void MoveCleanEagePos();
    void MoveCleanCenterPos();
    void MoveCleanCyclic();

    void MoveSpindleInitPos(bool bhome = true, bool bWait = true);
    void SetdefaultSpeed(bool bSetSpindle = true);
    void SpindleSpin(double drpm);
    void SpindleStop();
    void Wait_Spindle_finish();

    void CheckVaccum();
    void CheckWater();
    void CloseProtect(BOOL bClose, bool bWait = true);

    void SetWaferHasWafer(bool bHas);
};

#endif // CPROCESS_CLEAN_H
