#ifndef CPROCESS_CUT_H
#define CPROCESS_CUT_H
#include "cmprocess.h"

//切割操作
class CProcess_Cut : public CMProcess
{
public:
    enum msg_id
    {
        PROCESS_Cut_MSG_ID=MAX_PROCESS_MSG_ID,
        CUT_CUTLINE,    //切割线
        CUTPOS,         //切割位置,也是按X方向切割
        CALIBRATION,
		MOVECUTPOS,
        MAX_PROCESS_Cut_MSG_ID,
    };
    CProcess_Cut(const QString& name,int32_t id);
    int CutLine(int iSideID, int iLineID, int iLayerID, int iTimes/*=-1*/);
    int CutPos(int iSideID, double dStartPos, double dEndPos, double dPosLocation, int iLayerID, bool bXDirect=true);
    int Calibration(int32_t iCamId);
    int32_t decode_msg(int32_t id,const char* pmsg);
	int MoveCutPos(double dFirstX, double dFirstY);

    void do_msg(int iID,QVariantList& vlInput,V_MsgOutput* pvlOutput);

	void ClearRecoveredData(int iSideId);
	void ClearRealtimeData(int iSideId);
	bool WriteRecoveredData(int iSideId, int iLineId, int iLayer, int iTimes, bool bFinished);
	bool WriteRealtimeData(int iSideId, int iLineId, int iLayer, int iTimes, int iLineSize, int iLayerSize, int iTimesSize, int iEndLine);
	bool ReadRealtimeData(int iSideId, int& iLineId, int& iLayer, int& iTimes, int& iLineSize, int& iLayerSize, int& iTimesSize, int& iEndLine);
};

#endif // CPROCESS_CUT_H
