#include"TcPch.h"
#pragma hdrstop
#include"IoLP.h"
#include"DEVICE.h"
#include"debug.h"
IoLP::IoLP(const char* className,const char* name,const char* module):BaseDevice(className, name, module){
}
//AUTOIO_BEGIN
IoLP* _initLP1_0(){
	static IoLP staticLP1("IoLP","LP1",MODULE_NAME);
	IoLP::poLP1=&staticLP1;
	IoLP* dev=&staticLP1;
	strcpy(dev->id,"LP1");
	strcpy(dev->display,"LP1");
	strcpy(dev->schematicId,"LP1");
	strcpy(dev->unit,"");
	dev->diLeftClamp.create("diLeftClamp",&NDI->No1_Left_Extended_Detect1,"NDI.No1_Left_Extended_Detect1",TRUE);
	dev->diRightClamp.create("diRightClamp",&NDI->No1_Left_Extended_Detect2,"NDI.No1_Left_Extended_Detect2",TRUE);
	dev->diLeftRelease.create("diLeftRelease",&NDI->No1_Left_Back_Detect1,"NDI.No1_Left_Back_Detect1",TRUE);
	dev->diRightRelease.create("diRightRelease",&NDI->No1_Left_Back_Detect2,"NDI.No1_Left_Back_Detect2",TRUE);
	dev->diInPosition1.create("diInPosition1",&NDI->No1_Left_InPos_Detect1,"NDI.No1_Left_InPos_Detect1",TRUE);
	dev->diInPosition2.create("diInPosition2",&NDI->No1_Left_InPos_Detect2,"NDI.No1_Left_InPos_Detect2",TRUE);
	return dev;
}
IoLP* _initLP1_1(IoLP *dev){
	dev->diInPosition3.create("diInPosition3",&NDI->No1_Left_InPos_Detect3,"NDI.No1_Left_InPos_Detect3",TRUE);
	dev->diDetect.create("diDetect",&NDI->No1_Left_Productor_Detect,"NDI.No1_Left_Productor_Detect",TRUE);
	dev->doClamp.create("doClamp",&NDO->No1_left_Clamp_Val,"NDO.No1_left_Clamp_Val",FALSE);
	dev->doRelease.create("doRelease");
	dev->doPresence.create("doPresence",&NDO->Left_FOUP_Detect,"NDO.Left_FOUP_Detect",FALSE);
	dev->doPlacement.create("doPlacement",&NDO->Left_FOUP_InPos,"NDO.Left_FOUP_InPos",FALSE);
	dev->doLoad.create("doLoad",&NDO->Left_FOUP_Load,"NDO.Left_FOUP_Load",FALSE);
	dev->doUnload.create("doUnload",&NDO->Left_FOUP_Unload,"NDO.Left_FOUP_Unload",FALSE);
	dev->doManual.create("doManual",&NDO->Left_FOUP_Manual,"NDO.Left_FOUP_Manual",FALSE);
	strcpy(dev->scRootPath,"LoadPort");
	return dev;
}
IoLP* _initLP1_2(IoLP *dev){
	return dev;
}
IoLP* _initLP2_0(){
	static IoLP staticLP2("IoLP","LP2",MODULE_NAME);
	IoLP::poLP2=&staticLP2;
	IoLP* dev=&staticLP2;
	strcpy(dev->id,"LP2");
	strcpy(dev->display,"LP2");
	strcpy(dev->schematicId,"LP2");
	strcpy(dev->unit,"");
	dev->diLeftClamp.create("diLeftClamp",&NDI->No1_Right_Extended_Detect1,"NDI.No1_Right_Extended_Detect1",TRUE);
	dev->diRightClamp.create("diRightClamp",&NDI->No1_Right_Extended_Detect2,"NDI.No1_Right_Extended_Detect2",TRUE);
	dev->diLeftRelease.create("diLeftRelease",&NDI->No1_Right_Back_Detect1,"NDI.No1_Right_Back_Detect1",TRUE);
	dev->diRightRelease.create("diRightRelease",&NDI->No1_Right_Back_Detect2,"NDI.No1_Right_Back_Detect2",TRUE);
	dev->diInPosition1.create("diInPosition1",&NDI->No1_Right_InPos_Detect1,"NDI.No1_Right_InPos_Detect1",TRUE);
	dev->diInPosition2.create("diInPosition2",&NDI->No1_Right_InPos_Detect2,"NDI.No1_Right_InPos_Detect2",TRUE);
	return dev;
}
IoLP* _initLP2_1(IoLP *dev){
	dev->diInPosition3.create("diInPosition3",&NDI->No1_Right_InPos_Detect3,"NDI.No1_Right_InPos_Detect3",TRUE);
	dev->diDetect.create("diDetect",&NDI->No1_Right_Productor_Detect,"NDI.No1_Right_Productor_Detect",TRUE);
	dev->doClamp.create("doClamp",&NDO->No1_Right_Clamp_Val,"NDO.No1_Right_Clamp_Val",FALSE);
	dev->doRelease.create("doRelease");
	dev->doPresence.create("doPresence",&NDO->Right_FOUP_Detect,"NDO.Right_FOUP_Detect",FALSE);
	dev->doPlacement.create("doPlacement",&NDO->Right_FOUP_InPos,"NDO.Right_FOUP_InPos",FALSE);
	dev->doLoad.create("doLoad",&NDO->Right_FOUP_Load,"NDO.Right_FOUP_Load",FALSE);
	dev->doUnload.create("doUnload",&NDO->Right_FOUP_Unload,"NDO.Right_FOUP_Unload",FALSE);
	dev->doManual.create("doManual",&NDO->Right_FOUP_Manual,"NDO.Right_FOUP_Manual",FALSE);
	strcpy(dev->scRootPath,"LoadPort");
	return dev;
}
IoLP* _initLP2_2(IoLP *dev){
	return dev;
}
IoLP* _initLP3_0(){
	static IoLP staticLP3("IoLP","LP3",MODULE_NAME);
	IoLP::poLP3=&staticLP3;
	IoLP* dev=&staticLP3;
	strcpy(dev->id,"LP3");
	strcpy(dev->display,"LP3");
	strcpy(dev->schematicId,"LP3");
	strcpy(dev->unit,"");
	dev->diLeftClamp.create("diLeftClamp");
	dev->diRightClamp.create("diRightClamp");
	dev->diLeftRelease.create("diLeftRelease");
	dev->diRightRelease.create("diRightRelease");
	dev->diInPosition1.create("diInPosition1");
	dev->diInPosition2.create("diInPosition2");
	return dev;
}
IoLP* _initLP3_1(IoLP *dev){
	dev->diInPosition3.create("diInPosition3");
	dev->diDetect.create("diDetect");
	dev->doClamp.create("doClamp");
	dev->doRelease.create("doRelease");
	dev->doPresence.create("doPresence");
	dev->doPlacement.create("doPlacement");
	dev->doLoad.create("doLoad");
	dev->doUnload.create("doUnload");
	dev->doManual.create("doManual");
	strcpy(dev->scRootPath,"LoadPort");
	return dev;
}
IoLP* _initLP3_2(IoLP *dev){
	return dev;
}
IoLP* _initLP4_0(){
	static IoLP staticLP4("IoLP","LP4",MODULE_NAME);
	IoLP::poLP4=&staticLP4;
	IoLP* dev=&staticLP4;
	strcpy(dev->id,"LP4");
	strcpy(dev->display,"LP4");
	strcpy(dev->schematicId,"LP4");
	strcpy(dev->unit,"");
	dev->diLeftClamp.create("diLeftClamp");
	dev->diRightClamp.create("diRightClamp");
	dev->diLeftRelease.create("diLeftRelease");
	dev->diRightRelease.create("diRightRelease");
	dev->diInPosition1.create("diInPosition1");
	dev->diInPosition2.create("diInPosition2");
	return dev;
}
IoLP* _initLP4_1(IoLP *dev){
	dev->diInPosition3.create("diInPosition3");
	dev->diDetect.create("diDetect");
	dev->doClamp.create("doClamp");
	dev->doRelease.create("doRelease");
	dev->doPresence.create("doPresence");
	dev->doPlacement.create("doPlacement");
	dev->doLoad.create("doLoad");
	dev->doUnload.create("doUnload");
	dev->doManual.create("doManual");
	strcpy(dev->scRootPath,"LoadPort");
	return dev;
}
IoLP* _initLP4_2(IoLP *dev){
	return dev;
}
void initIoLP(){
	IoLP* dev;
	dev=_initLP1_0();
	_initLP1_1(dev);
	_initLP1_2(dev);
	dev=_initLP2_0();
	_initLP2_1(dev);
	_initLP2_2(dev);
	dev=_initLP3_0();
	_initLP3_1(dev);
	_initLP3_2(dev);
	dev=_initLP4_0();
	_initLP4_1(dev);
	_initLP4_2(dev);
}
IoLP* IoLP::poLP1=NULL;
IoLP* IoLP::poLP2=NULL;
IoLP* IoLP::poLP3=NULL;
IoLP* IoLP::poLP4=NULL;
//AUTOIO_END
