#ifndef LOGIC_EAP_H
#define LOGIC_EAP_H
enum _ALAM_ID
{
	ALARM_RESERVED=0,
	//错误EAP相关报警
	ALARM_EAP_RESERVED=40000,
	ALARM_CoatAreaWaterLeakage,		//漏水报警
	ALARM_CleanAreaWaterLeakage,
	ALARM_CoolingWaterLeakage,

	ALARM_POWERCALI_WaitLaserStableTimeOut=40100,		//等待功率稳定超时
	ALARM_PowerCheckOutrange,				//功率复检超限

	ALARM_MAIN_LOCATE_FAILED_CantFindEage=40200,	//算法找不到边缘
	ALARM_MAIN_LOCATE_FAILED_PTNotEnough,	//定位点数量不足
	ALARM_MAIN_LOCATE_FAILED_FitOutRange,	//拟合直径超限

	ALARM_MAIN_SERACHPT_SearchRotateFailed=40220,//ALARM_MAIN_SERACHPT_FAILED
	ALARM_MAIN_SERACHPT_SearchPt1Failed,
	ALARM_MAIN_SERACHPT_SearchMIDFailed,
	ALARM_MAIN_SERACHPT_SearchPt2Failed, 
	ALARM_MAIN_SERACHPT_SearchBaseFailed,
	ALARM_MAIN_SERACHPT_SearchBaseAdjustFailed,
	
	ALARM_MAIN_ALIGNPT_AlignSearchFailed=40240,//ALARM_MAIN_ALIGNPT_FAILED,
	ALARM_MAIN_ALIGNPT_AlignMidFailed,
	ALARM_MAIN_ALIGNPT_AlignPt2Failed,
	ALARM_MAIN_ALIGNPT_AlignBaseLineOutrange,
	ALARM_MAIN_ALIGNPT_BaseLineOutrange,		//基准范围超限
	

	ALARM_COAT_FLUID_CoatingLiquidInsufficient=40300,			//胶量不足
	ALARM_COAT_FLUID_CoaingLiquidUsedMisatchDetected,	//用量与测量不一致
	ALARM_COAT_FLUID_BumpError,					//抽胶异常
	ALARM_COAT_CoatWaterPressureLow,			//水压不足
	ALARM_COAT_CoatVacuumOFF,					//真空关闭
	ALARM_COAT_CoatVaccumLeak,					//真空不足

	ALARM_CLEAN_CleanWaterPressureLow=40400,
	ALARM_CLEAN_CleanVaccumOFF,		
	ALARM_CLEAN_CleanVaccumLeak,

	//ALARM MACHINE
	ALARM_MACHINE_RESERVED=50000,

	ALARM_LASER_COMMUNICATION=50200,
	ALARM_LASER_USEAGETIMEOUT,				//激光器使用超时
	ALARM_POWER_SETDATA,					//设置功率参数参数失败
	
	ALARM_DISTANCMETER_COMMUNICATION=50210,


	ALARM_POWERMETER_COMMUNICATION=50220,
	ALARM_POWERMETER_NOTREADY,
	ALARM_POWERMETER_ZERO_Failed,
	ALARM_POWERMETER_LASERNOTREADY,



	ALARM_SCAN_COMMUNICATION=50230,

	ALARM_CAMERA_COMMUNICATION=50240,

	ALARM_LIGHT_COMMNUNICATION=50250,

	ALARM_WEIGHT_SENSOR_COMMNUNICATION=50260,

	ALARM_MOTION_COMMUNICATION=50270,
	ALARM_MOTION_ERROR,
	ALARM_PROGRAM_ERROR,
	ALARM_ACS_INIT_ERROR,
	ALARM_MOTION_INIT,
	ALARM_MOTION_MOVE,
	ALARM_MOTION_SPEED,
	ALARM_MOTION_STATE,
	ALARM_MOTION_IO,
	ALARM_MOTION_CANTMOVE_NOTINITED,
	ALARM_MOTION_CANTMOVE_NOTENABLED,
	ALARM_MOTION_CANTMOVE_AXISERROR,
	ALARM_MOTION_INIT_FAIELD_LASERON,
	ALARM_MOTION_INIT_FAIELD_OTHER_AXIS_FIRST,
	ALARM_MOTION_INIT_FAILED_OTHER_AXIS_NOTSAFE,
	ALARM_MOTION_MOVE_CALI_FAIELD_LASERON,
	
	ALARM_DOOR_LEFT_CHECK=50300,
	ALARM_DOOR_RIGHT_CHECK,

	ALARM_SCAN_CASSTE_NOTEXIST=50400,
	ALARM_SCAN_WAFER_DATAERROR,	//扫描数据异常
	ALARM_SCAN_WAFER_WPERROR,	//扫片异常

	ALARM_TRANS_ERROR_GrabWaferFailed_NotExists=50500,
	ALARM_TRANS_ERROR_RailNearCass_WaferError,
	ALARM_TRANS_ERROR_RailWaferFailed_NotExists,
	ALARM_TRANS_ERROR_TransPutWaferFailed_NotExists,
	ALARM_TRANS_ERROR_CHECKBOX_WAFERID_NotConsistent, //检查料盒扫码不一致

	//安全保护
	ALARM_CLEAN_SAFE_PROTECT=50600,
	ALARM_COAT_SAFE_PROTECT,
	ALARM_COAT_FLUID_BumpParam_ERROR, //抽胶量设置错误
	ALARM_TRANS_SAFE_PROTECT,
	ALARM_MAIN_SAFE_PROTECT,
	ALARM_MAIN_KERF_ERROR,
	ALARM_MAIN_HALFKERF_ERROR,
	ALARM_MAIN_LASERCALI_ERROR,
	ALARM_VACCUM_TIMEOUT,
	ALARM_MAIN_PRESS_CHECK,

	//逻辑层面的安全保护
	ALARM_MOTOR_MOVE_SAFER_PROTECT,
	ALARM_IO_SAFER_PROTECT,

	ALARM_MAIN_ALIGNCHECK_ERROR,	//定位检查错误

	//参数异常
	ALARM_TRANS_LOGIC_PARM=50700,
	ALARM_COAT_LOGIC_PARM,
	ALARM_CLEAN_LOGIC_PARM,
	ALARM_MAIN_LOGIC_PARAM,
	ALARM_MAIN_LEVEING_PARAM,
	ALARM_CUT_PARAM,
	ALARM_MAIN_KERF_PARAM,
	ALARM_POWERCALI_PARAMETER,

	ALARM_MAIN_ALIGN_MANUALOFFSET_GreaterHalfIndex=50800,//不能超过半个切割道
	ALARM_MAIN_LEVEING_USESAVEPT,			//使用同一点调平
	ALARM_CHANGE_SIDE_FAIELD_LASERON,
	ALARM_CHANGE_COMP_FAIELD_LASERON,

	ALARM_FALTAL_LASER_CUTLINE=50900,
	ALARM_FALTAL_LASER_ABNORMAL_SHUTDOWN,
	ALARM_FALTAL_LASER_CUTPRG_EARLY_TERMINATION,
	ALARM_FALTAL_LASER_CUTPRG_LOADFAILED,

	ALARM_LASERPATH_PowerParameter_Not_Cali=50950, //!功率未点检
	ALARM_LASERPATH_Power_NotInRange,	//!< 功率不在范围内
};

enum _EventID{
	EVENT_RESERVED=20000,
	EVENT_IDReadingStarted=20001,
	EVENT_IDReadingComplete				,
	EVENT_IDVerification				,
	EVENT_PPChanged						,
	EVENT_OperateChanged				,
	EVENT_JobStarted=20020				,
	EVENT_JobComplete					,
	EVENT_JobPaused						,
	EVENT_JobResume						,
	EVENT_JobAborted,
	EVENT_ManualStarted,
	EVENT_ManualPaused,
	EVENT_ManualAborted,
	EVENT_InitStarted=20040				,//初始化
	EVENT_InitComplete					,
	EVENT_PowerCheckStarted				,
	EVENT_PowerCheckComplete			,
	EVENT_MappingStarted				,	//! 料盒扫描开始
	EVENT_MappingComplete				,	//! 料盒扫描结束
	EVENT_CoatingStarted				,
	EVENT_CoatingComplete				,
	EVENT_CutingStarted					,
	EVENT_CutingComplete				,
	EVENT_CleaningStarted				,
	EVENT_CleaningComplete				,
	EVENT_CoatingCheckStarted			,
	EVENT_CoatingCheckComplete			,
	EVENT_CutingCheckStarted			,
	EVENT_CutingCheckComplete			,
	EVENT_BarcodeScanStarted,				//! 扫码枪扫描开始
	EVENT_BarcodeScanComplete,				//! 扫码枪扫描结束
	EVENT_TransCasste2CoatStarted		,
	EVENT_TransCasste2CoatComplete		,
	EVENT_TransCasste2RailNearStarted	,	//! 料盒到近轨道开始
    EVENT_TransCasste2RailNearComplete	,	//! 料盒到近轨道结束
	EVENT_TransCoat2WTStarted			,
	EVENT_TransCoat2WTComplete			,
	EVENT_TransWT2CleanStarted			,
	EVENT_TransWT2CleanComplete			,
	EVENT_TransClean2CassteStarted		,
	EVENT_TransClean2CassteComplete		,
	EVENT_TransClean2CupboardStarted	,
	EVENT_TransClean2CupboardComplete	,
	EVENT_TransCupboard2CassteStarted	,	//! 检查盒到料盒开始
	EVENT_TransCupboard2CassteComplete	,	//! 检查盒到料盒完成
	EVENT_TransFar2CoatStarted,				//! 远轨道到涂覆桶开始
	EVENT_TransFar2CoatComplete,			//! 远轨道到涂覆桶完成
	EVENT_TransWT2NearStarted,				//! 加工平台到近轨道开始
	EVENT_TransWT2NearComplete,				//! 加工平台到近轨道完成
	EVENT_TransCoat2NearStarted,		//! 涂覆桶到近轨道开始
	EVENT_TransCoat2NearComplete,		//! 涂覆桶到近轨道完成
	EVENT_TransCoat2FarStarted,			//! 涂覆桶到远轨道开始
	EVENT_TransCoat2FarComplete,		//! 涂覆桶到远轨道完成
	EVENT_TransClean2NearStarted,		//! 清洗桶到近轨道开始
	EVENT_TransClean2NearComplete,		//! 清洗桶到近轨道完成
	EVENT_TransCheckBox2NearStarted,	//! 检查盒到近轨道开始
	EVENT_TransCheckBox2NearComplete,	//! 检查盒到近轨道完成
	EVENT_TransFar2WTStarted,			//! 远轨道到加工平台开始
	EVENT_TransFar2WTComplete,			//! 远轨道到加工平台结束
	EVENT_TransFar2NearStarted,			//! 远轨道到近轨道开始
	EVENT_TransFar2NearComplete,		//! 远轨道到近轨道结束
	EVENT_TransNear2CassteStarted,		//! 近轨道到料盒开始
	EVENT_TransNear2CassteComplete,		//! 近轨道到料盒完成
	EVENT_TransNear2CleanStarted,		//! 近轨道到清洗桶开始
	EVENT_TransNear2CleanComplete,		//! 近轨道到清洗桶完成
	EVENT_TransNear2WTStarted,			//! 近轨道到加工平台开始
	EVENT_TransNear2WTComplete,			//! 近轨道到加工平台结束
	EVENT_TransNear2CheckBox2Started,	//! 近轨道到检查盒开始
	EVENT_TransNear2CheckBox2Complete,	//! 近轨道到检查盒结束
	EVENT_TransNear2FarStarted,		//! 近轨道到远轨道开始
	EVENT_TransNear2FarComplete,	//! 近轨道到远轨道结束
	EVENT_TransNear2CoatStarted,	//! 近轨道到涂覆开始
	EVENT_TransNear2CoatComplete,	//！近轨道到涂覆结束
};

//变量
enum _SVID
{
	SVID_RESERVED=10000,
	SVID_PPRootFolder=10001				,
	SVID_PPExeName						,
	SVID_SlotID=10020					,
	SVID_ScanWaferID					,
	SVID_TransWaferID					,
	SVID_CoatingWaferID					,
	SVID_CuttingWaferID					,
	SVID_CleaningWaferID				,
	SVID_CuttingCheckWaferID			,
	SVID_CoatingQualityCheckWaferID		,
	SVID_CoatingLiquidUsedVolume		,
	SVID_CoatingLiquidDetectedVolume	,
	SVID_CuttingSpeed					,
	SVID_CuttingPower					,
	SVID_LaserFreq						,
	SVID_LaserEpulseFreq				,
	SVID_LaserElectricCurrent			,
	SVID_LaserTemperature,
	SVID_LaserCheckPower				,
	SVID_LaserDetectedPower				,


};

//常量
enum _ECID
{
	ECID_REERVED=30000,

	ECID_QualityCheckMethod=30001,					//质量检测方式 0~2
	ECID_LaserPowerCheckMethod,						//功率检测方式 0~4
	ECID_LaserPowerCheckTimeInterval,
	ECID_LaserPowerCheckEvervyPCSInterval,			//每隔多少片进行一次
	ECID_LaserPowerCheckPowerAllowRange,			//允许的误差范围

	ECID_LocationDiameterAllowRange=30100,			//最大允许晶圆测量直径的误差

	ECID_BeforeLocationStableTime=30200,
	ECID_BeforeAlignStableTime,
	ECID_BeforeKerfStableTime,
	ECID_AfterLocationStableTime,
	ECID_AfterAlignStableTime,
	ECID_AfterKerfStableTime,
};
#endif//LOGIC_EAP_H