#include"TcPch.h"
#pragma hdrstop
#include"IoShutter.h"
#include"DEVICE.h"
#include"debug.h"
#include"SC.h"
IoShutter::IoShutter(const char* className,const char* name,const char* module):BaseDevice(className, name, module){
}
void IoShutter::initialize()
{
	char scName[MAX_NAME_LEN];
	char* ptrValue;
	sprintf(scName, "Boat.AutoShutter.MotionTimeout");
	ptrValue = (char*)SC->getStringValue(scName);
	if (ptrValue != NULL && ptrValue[0] != '\0') {
		scMotionTimeout = atol(ptrValue);
	}
}
//AUTOIO_BEGIN
IoShutter* _initShutter_0(){
	static IoShutter staticShutter("IoShutter","Shutter",MODULE_NAME);
	IoShutter::poShutter=&staticShutter;
	IoShutter* dev=&staticShutter;
	strcpy(dev->id,"Shutter");
	strcpy(dev->display,"Shutter");
	strcpy(dev->schematicId,"Shutter");
	strcpy(dev->unit,"");
	dev->diOpen.create("diOpen",&NDI->Furnace_shutter_open,"NDI.Furnace_shutter_open",TRUE);
	dev->diClose.create("diClose",&NDI->Furnace_shutter_close,"NDI.Furnace_shutter_close",TRUE);
	dev->doOpen.create("doOpen",&NDO->Furnace_shutter_open,"NDO.Furnace_shutter_open",FALSE);
	dev->doClose.create("doClose",&NDO->Furnace_shutter_close,"NDO.Furnace_shutter_close",FALSE);
	strcpy(dev->scRootPath,"");
	return dev;
}
void initIoShutter(){
	IoShutter* dev;
	dev=_initShutter_0();
}
IoShutter* IoShutter::poShutter=NULL;
//AUTOIO_END
