package org.nl.acs.device_driver.basedriver.agv.xg_agv;

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;

/**
 * magic3.0
 */
@Service
public class XgagvDefination implements OpcDeviceDriverDefination {
    @Override
    public String getDriverCode() {
        return "xg_agv";
    }

    @Override
    public String getDriverName() {
        return "仙工AGV";
    }

    @Override
    public String getDriverDescription() {
        return "仙工AGV";
    }

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

    }

    @Override
    public Class<? extends DeviceDriver> getDeviceDriverType() {
        return XgagvDeviceDriver.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();
    }
}
