package org.nl.acs.device_driver.basedriver.standard_scanner;

import org.nl.acs.device.domain.Device;
import org.nl.acs.device_driver.DeviceDriver;
import org.nl.acs.device_driver.DeviceDriverDefination;
import org.nl.acs.device.enums.DeviceType;
import org.springframework.stereotype.Service;

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

/**
 * 扫码器
 */
@Service
public class StandardScannerDefination implements DeviceDriverDefination {
    @Override
    public String getDriverCode() {
        return "standard_scanner";
    }

    @Override
    public String getDriverName() {
        return "标准版-扫码器";
    }

    @Override
    public String getDriverDescription() {
        return "标准版-扫码器";
    }

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

    }

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

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