//

#ifndef LOGIC_COMPDEF
#define LOGIC_COMPDEF

#define UNDEFINED	-1

#ifdef __OLD_DEFINE_ID__
/*
enum E_Driver_Base_ID {
    RESEVED_BASE = 0,
    LOGIC_BASE = 44,
    DRIVER_BASE_RESREVE = 1000,
    MOTOR_DRIVER_BASE = 9,
    LIGHT_DRIVER_BASE = 4,
    CAM_DRIVER_BASE = 1,
    LASER_DRIVER_BASE = 37,
    POWERMETER_DRIVER_BASE = 39,
    BARCODE_DRIVER_BASE = 42,
    OTHERDRIVER_BASE = 44
};
enum E_CamDriver_ID {
    CAM2X = CAM_DRIVER_BASE,
    CAM6X,
    CAM_DRIVER = 3,
    CAMKerf = 97,				//97

    CAM_DRIVER_MAX = CAM_DRIVER_BASE + 999,
};
enum E_MotorDriver_ID {
    MOTORX = MOTOR_DRIVER_BASE,
    MOTORY,
    MOTORZ,
    MOTORW,

    MOTORG1_PCHANGE,        //! not use
    MOTORG2_POWER,          //功率调整
    MOTORG3_WIDEINDEX,      //!DOE整形
    MOTORG4_WIDE5050,       //!整形校准
    MOTORG5_NARROWINDEX,    //!整形校准
    MOTORG6_NARROW5050,     //! not use
    MOTORG7_MASK,           //!DOE整形

    MOTORA_CLAW,            //夹爪,左右移动
    MOTORB1_LOCK,            //规整
    MOTORC_CASS,            //料盒
    MOTORD_TRANS,           //中转轴，上下移动
    MOTORB2_RAIL,

    MOTORE_COAT_SPINDLE,        //涂敷相关的轴
    MOTORE1_COAT_CLEAN_ARM,
    MOTORE2_COAT_COAT_ARM,
    MOTORE3_COAT_BUMP,          //注射泵
    MOTORE4_COAT_CURTAIN,		//保护罩 not use

    MOTORF_CLEAN_SPINDLE,   //清洗主轴
    MOTORF1_CLEAN_ARM,      //洗洗摆臂
    MOTORF4_CLEAN_CURTAIN,  //清洗保护罩 not use

    IO_INPUT,
    IO_OUTPUT,
    IO_INPUT_ANALOG,
    IO_OUTPUT_ANALOG,

    MOTOR_DRIVER,

    MOTORF2_CLEAN_ARM2 = 99,	//99
    MOTORH1_UPDOWN,		//上料轴
    MOTORH2_TRANS,

    MOTORJ1_UPDOWN,		//下料轴
    MOTORJ2_TRANS,

    MOTOR_SHUTTER = 104,      //光闸

};
enum E_LigthDriver_ID {
    LIGHT_DIRECT2X = LIGHT_DRIVER_BASE,     //直光
    LIGHT_SIDE2X,		//斜光
    LIGHT_DIRECT6X,
    LIGHT_SIDE6X,

    LIGHT_DRIVER_DIRECT,       //直光

                               //以下是增加的驱动及卡

                               LIGHT_DIRECT4X = 94,		//94
                               LIGHT_SIDE4X,
                               LIGHT_DRIVER_SIDE,  //斜光 控制器

                               LIGHT_DRIVER_MAX = LIGHT_DRIVER_BASE + 999,
};
enum E_Logic_ID {
    LASERPATH_D_NARROW = 44,
    LASERPATH_D_WIDE,
    LASERPATH_DRIVER,

    M_WORKER = 47,
    M_WORKERDRIVER,

    GEM_CLIENT = 49,
    GEM_DRIVER,

    M_BLOB = 51,             //支持的算法参数
    M_FINDCIRCE,
    M_FINDEAGE,
    M_FINDLINEEAGE,
    M_FINDARCEAGE,
    M_MATCHGRAY,
    M_MATCHNCC,
    M_MATCHSHAPE,
    M_FINDLINE,
    M_KERFCHECK,

    WORKTABLE = 61,
    WORKTABLE_DRIVER,

    PRODUCT = 63,            //工件
    PRODUCT_DRIVER,

    WTOFFSET = 65,
    WTOFFSET_DRIVER,

    SIDE_A = 67,             //切割面
    SIDE_B,
    SIDE_C,
    SIDE_D,
    SIDE_DRIVER,

    CASSETTE = 72,
    CASSETTE_DRIVER,

    PROCESS_COAT = 74,       //控制流程
    PROCESS_CLEAN,

    PROCESS_LOCATE,
    PROCESS_LEVELING,
    PROCESS_CUT,
    PROCESS_KERFCHECK,

    PROCESS_POWERCALI_D_WIDE,
    PROCESS_POWERCALI_D_NARROW,
    PROCESS_LASERFOUCSCALI_D_WIDE,
    PROCESS_LASERFOUCSCALI_D_NARROW,

    PROCESS_SCAN,
    PROCESS_TRANS,

    SM_MAIN = 86,            //状态机
    SM_TRANS,
    SM_COAT,
    SM_CLEAN,
    SM_IO,
    SM_CAMGRAB2X,
    SM_CAMGRAB6X,
    SM_GEM,


    SM_CAMGRAB4X = 98,


    M_CALIBRATION_NCC = 105,	//定位的NCC算法

    COATVOLUME_SENSOR = 106, //胶容量检测传感器

    PROCESS_HALFKERF = 107,
    PROCESS_LASERKERF = 108,

    M_KERF_LASER = 109,		//激光位置位置检查	
    M_KERF_HALFCUT = 110,		//半切痕迹检查
    GEM_DRIVER_JNG = 111,		//金南瓜
    WTOFFSET_LASER = 112,			//激光位置补偿
    HGRIPPER_DRIVER = 113,
    SM_WTUnload,
    SM_WTLoad,
    SM_Schedular,
};*/
#else
enum E_Driver_Base_ID {
    RESEVED_BASE = 0,
    LOGIC_BASE = 44,
    DRIVER_BASE_RESREVE = 1000,
    CAM_DRIVER_BASE = 2000,
    LIGHT_DRIVER_BASE = 3000,
    MOTOR_DRIVER_BASE = 4000,
    LASER_DRIVER_BASE = 5000,
    POWERMETER_DRIVER_BASE = 6000,
    BARCODE_DRIVER_BASE = 7000,
    OTHERDRIVER_BASE = 8000
};
enum E_Logic_Base_ID {

};

enum E_CamDriver_ID {
    CAM2X = CAM_DRIVER_BASE,
    CAM6X,
    CAMKerf,
    CAM_DRIVER,

    CAM_DRIVER_MAX = CAM_DRIVER_BASE + 999,
};

enum E_MotorDriver_ID {
    MOTORX = MOTOR_DRIVER_BASE,
    MOTORY,
    MOTORZ,
    MOTORW,


    MOTORG1_PCHANGE = MOTOR_DRIVER_BASE + 10,        //! not use
    MOTORG2_POWER,          //!功率调整
    MOTORG3_WIDEINDEX,      //!DOE整形
    MOTORG4_WIDE5050,       //!整形校准
    MOTORG5_NARROWINDEX,    //!整形校准
    MOTORG6_NARROW5050,     //!not use
    MOTORG7_MASK,           //!DOE整形
    MOTOR_SHUTTER,          //光闸

    MOTORA_CLAW = MOTOR_DRIVER_BASE + 30,            //夹爪,左右移动
    MOTORB1_LOCK,            //规整
    MOTORB2_RAIL,
    MOTORC_CASS,            //料盒
    MOTORD_TRANS,           //中转轴，上下移动
    

    MOTORE_COAT_SPINDLE = MOTOR_DRIVER_BASE + 40,        //涂敷相关的轴
    MOTORE1_COAT_CLEAN_ARM,
    MOTORE2_COAT_COAT_ARM,
    MOTORE3_COAT_BUMP,          //注射泵
    MOTORE4_COAT_CURTAIN,		//保护罩 not use

    MOTORF_CLEAN_SPINDLE = MOTOR_DRIVER_BASE + 50,   //清洗主轴
    MOTORF1_CLEAN_ARM,      //洗洗摆臂
    MOTORF2_CLEAN_ARM2,
    MOTORF4_CLEAN_CURTAIN,  //清洗保护罩 not use

    MOTORH1_UPDOWN = MOTOR_DRIVER_BASE + 60, 		//上料轴
    MOTORH2_TRANS,

    MOTORJ1_UPDOWN = MOTOR_DRIVER_BASE + 70,    	//下料轴
    MOTORJ2_TRANS,

    IO_INPUT = MOTOR_DRIVER_BASE + 80,
    IO_OUTPUT,
    IO_INPUT_ANALOG,
    IO_OUTPUT_ANALOG,

    MOTOR_DRIVER = MOTOR_DRIVER_BASE + 100,    
};
enum E_LigthDriver_ID {
    LIGHT_DIRECT2X = LIGHT_DRIVER_BASE,     //同轴光光
    LIGHT_DIRECT6X,

    LIGHT_DRIVER_DIRECT,       //直光

    LIGHT_SIDE2X= LIGHT_DRIVER_BASE+10,		//斜光
    LIGHT_SIDE6X,
    LIGHT_DRIVER_SIDE,  //斜光 控制器

    LIGHT_DRIVER_MAX = LIGHT_DRIVER_BASE + 999,
};


enum E_Logic_ID {
    LASERPATH_D_NARROW = OTHERDRIVER_BASE,
    LASERPATH_D_WIDE,
    LASERPATH_DRIVER,

    M_WORKER,
    M_WORKERDRIVER,

    GEM_CLIENT,
    GEM_DRIVER,
    GEM_DRIVER_JNG,		//金南瓜

    LASERPATH_S_NARROW,
    LASERPATH_L_NARROW,

    M_BLOB= OTHERDRIVER_BASE+100,             //支持的算法参数
    M_FINDCIRCE,
    M_FINDEAGE,
    M_FINDLINEEAGE,
    M_FINDARCEAGE,
    M_MATCHGRAY,
    M_MATCHNCC,
    M_MATCHSHAPE,
    M_FINDLINE,
    M_KERFCHECK,
    M_CALIBRATION_NCC,	    //定位的NCC算法
    M_KERF_LASER,	//激光位置位置检查	
    M_KERF_HALFCUT,		//半切痕迹检查

    WORKTABLE= OTHERDRIVER_BASE+200,
    WORKTABLE_DRIVER,

    PRODUCT,            //工件
    PRODUCT_DRIVER,

    WTOFFSET,
    WTOFFSET_LASER,			//激光位置补偿
    WTOFFSET_DRIVER,

    COATVOLUME_SENSOR,  //胶容量检测传感器
    HGRIPPER_DRIVER,    //卡抓

    DistanceSensor_Driver,
    DistanceSensor,

    JigDriver,

    SIDE_A= OTHERDRIVER_BASE+300,             //切割面
    SIDE_B,
    SIDE_C,
    SIDE_D,
    SIDE_DRIVER,

    CASSETTE,
    CASSETTE_DRIVER,

    PROCESS_COAT = OTHERDRIVER_BASE + 400,       //控制流程
    PROCESS_CLEAN,

    PROCESS_LOCATE,
    PROCESS_LEVELING,
    PROCESS_CUT,
    PROCESS_KERFCHECK,
    PROCESS_HALFKERF,
    PROCESS_LASERKERF, //S_Narrow支持

    PROCESS_POWERCALI_D_WIDE,
    PROCESS_POWERCALI_D_NARROW,
    PROCESS_LASERFOUCSCALI_D_WIDE,
    PROCESS_LASERFOUCSCALI_D_NARROW,

    PROCESS_SCAN,
    PROCESS_TRANS,

    PROCESS_POWERCALI_S_NARROW,
    PROCESS_LASERFOUCSCALI_S_NARROW,

    PROCESS_UTILS,
    PROCESS_LASERKERF_D_WIDE,

    PROCESS_POWERCALI_L_NARROW,       //!线光斑
    PROCESS_LASERFOUCSCALI_L_NARROW,  //!线光斑

    SM_MAIN = OTHERDRIVER_BASE + 900,            //状态机
    SM_TRANS,
    SM_COAT,
    SM_CLEAN,
    SM_IO,
    SM_CAMGRAB2X,
    SM_CAMGRAB6X,
    SM_WTUnload,
    SM_WTLoad,
    SM_Schedular,
    SM_GEM,
    SM_CAMGRAB4X,
};
#endif

enum E_LaserDriver_ID {

    LASER = LASER_DRIVER_BASE,
    LASER_DRIVER,
};

enum E_PowerMeterDriver_ID {
    POWERMETERHEAD = POWERMETER_DRIVER_BASE,
    POWERMETERHEAD_REALTIME,
    POWERMETERDRIVER,
};

enum E_BarCodeDriver_ID {
    BARCODE = BARCODE_DRIVER_BASE,                //扫码枪
    BARCODE_DRIVER,
};


/*
enum _COMP_ID {
RESERVE = 0,

CAM2X,
CAM6X,
CAM_DRIVER = 3,

LIGHT_DIRECT2X = 4,     //直光
LIGHT_SIDE2X,		//斜光
LIGHT_DIRECT6X,
LIGHT_SIDE6X,
LIGHT_DRIVER,

MOTORX = 9,
MOTORY,
MOTORZ,
MOTORW,

MOTORG1_PCHANGE,        //! not user
MOTORG2_POWER,          //功率调整
MOTORG3_WIDEINDEX,      //!DOE整形
MOTORG4_WIDE5050,       //!整形校准
MOTORG5_NARROWINDEX,    //!整形校准
MOTORG6_NARROW5050,     //! not use
MOTORG7_MASK,           //!DOE整形

MOTORA_CLAW,            //夹爪,左右移动
MOTORB_LOCK,            //规整
MOTORC_CASS,            //料盒
MOTORD_TRANS,           //中转轴，上下移动

MOTORE_COAT_SPINDLE,        //涂敷相关的轴
MOTORE1_COAT_CLEAN_ARM,
MOTORE2_COAT_COAT_ARM,
MOTORE3_COAT_BUMP,          //注射泵
MOTORE4_COAT_CURTAIN,		//保护罩

MOTORF_CLEAN_SPINDLE,   //清洗主轴
MOTORF1_CLEAN_ARM,      //洗洗摆臂
MOTORF2_CLEAN_CURTAIN,  //清洗保护罩


IO_INPUT = 32,
IO_OUTPUT,
IO_INPUT_ANALOG,
IO_OUTPUT_ANALOG,

MOTOR_DRIVER,

LASER = 37,
LASER_DRIVER,

POWERMETERHEAD = 39,
POWERMETERHEAD_REALTIME,
POWERMETERDRIVER,

BARCODE = 42,                //扫码枪
BARCODE_DRIVER,

LASERPATH_D_NARROW = 44,
LASERPATH_D_WIDE,
LASERPATH_DRIVER,

M_WORKER = 47,
M_WORKERDRIVER,

GEM_CLIENT = 49,
GEM_DRIVER,

M_BLOB = 51,             //支持的算法参数
M_FINDCIRCE,
M_FINDEAGE,
M_FINDLINEEAGE,
M_FINDARCEAGE,
M_MATCHGRAY,
M_MATCHNCC,
M_MATCHSHAPE,
M_FINDLINE,
M_KERFCHECK,

WORKTABLE = 61,
WORKTABLE_DRIVER,

PRODUCT = 63,            //工件
PRODUCT_DRIVER,

WTOFFSET = 65,
WTOFFSET_DRIVER,

SIDE_A = 67,             //切割面
SIDE_B,
SIDE_C,
SIDE_D,
SIDE_DRIVER,

CASSETTE = 72,
CASSETTE_DRIVER,

PROCESS_COAT = 74,       //控制流程
PROCESS_CLEAN,

PROCESS_LOCATE,
PROCESS_LEVELING,
PROCESS_CUT,
PROCESS_KERFCHECK,

PROCESS_POWERCALI_D_WIDE,
PROCESS_POWERCALI_D_NARROW,
PROCESS_LASERFOUCSCALI_D_WIDE,
PROCESS_LASERFOUCSCALI_D_NARROW,

PROCESS_SCAN,
PROCESS_TRANS,

SM_MAIN = 86,            //状态机
SM_TRANS,
SM_COAT,
SM_CLEAN,
SM_IO,
SM_CAMGRAB2X,
SM_CAMGRAB6X,
SM_GEM,

//以下是增加的驱动及卡
LIGHT_DIRECT4X = 94,		//94
LIGHT_SIDE4X,
LIGHT_DRIVER_SIDE,

CAMKerf = 97,				//97
SM_CAMGRAB4X,

MOTORF3_CLEAN_ARM2 = 99,	//99
MOTORH1_UPDOWN,		//上料轴
MOTORH2_TRANS,

MOTORJ1_UPDOWN,		//下料轴
MOTORJ2_TRANS,

MOTOR_SHUTTER = 104,      //光闸
M_CALIBRATION_NCC,	//定位的NCC算法

COATVOLUME_SENSOR = 106, //胶容量检测传感器

PROCESS_HALFKERF = 107,
PROCESS_LASERKERF = 108,

M_KERF_LASER = 109,		//激光位置位置检查
M_KERF_HALFCUT = 110,		//半切痕迹检查
GEM_DRIVER_JNG = 111,		//金南瓜
WTOFFSET_LASER = 112,			//激光位置补偿
HGRIPPER_DRIVER = 113,
SM_WTUnload,
SM_WTLoad,
SM_Schedular,
};
*/
#endif // LOGIC_COMPDEF

