package org.nl.acs.device_driver.tianneng.guhuashi;

import org.nl.acs.device.device_driver.standard_inspect.ItemDto;
import org.nl.acs.device.domain.Device;
import org.nl.acs.device.enums.DeviceType;
import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination;
import org.springframework.stereotype.Service;

import java.util.LinkedList;
import java.util.List;

/**
 * 固化室驱动
 * 说明：该站点为固化室驱动
 */
@Service
public class GuhuashiSiteDefination implements OpcDeviceDriverDefination {
    @Override
    public String getDriverCode() {
        return "guhuashi_site";
    }

    @Override
    public String getDriverName() {
        return "固化室";
    }

    @Override
    public String getDriverDescription() {
        return "固化室";
    }

    @Override
    public DeviceDriver getDriverInstance(Device device) {
        return (new GuhuashiSiteDeviceDriver()).setDevice(device).setDriverDefination(this);

    }

    @Override
    public Class<? extends DeviceDriver> getDeviceDriverType() {
        return GuhuashiSiteDeviceDriver.class;
    }

    @Override
    public List<DeviceType> getFitDeviceTypes() {
        List<DeviceType> types = new LinkedList();
        types.add(DeviceType.conveyor);
        return types;
    }

    @Override
    public List<ItemDto> getReadableItemDtos() {
        return ItemProtocol.getReadableItemDtos();
    }

    @Override
    public List<ItemDto> getWriteableItemDtos() {
        return ItemProtocol.getWriteableItemDtos();
    }

}
