package com.hh.lib_idcard;


import com.hh.lib_er301_readcard.Er301IDCardScan;
import com.hh.lib_idcard_base.BaseIDCardScan;
import com.hh.lib_tb_readcard.TbIDCardScan;
import com.hh.nfc_readcard.NfcIDCardScan;
import com.hh.xzx_readcard.XzxIDCardScan;
import com.hhlib_dx_multi_readcard.DxMultiIDCardScan;

/**
 * @Description:
 * @author: Xia WeiHao
 * @date: 2024/7/1
 */
public class IDCardScanFactory {



    /**
     * NFC(1, "NFC在线阅读器"),
     * TB(2, "天波阅读器"),
     * DX(3, "东信阅读器"),
     * XZX(4, "新中新阅读器"),
     * DK(5, "德卡阅读器"),
     * JL(6, "精伦阅读器"),
     * HS(7, "华视阅读器"),
     * ZAWL(8, "中安未来离线护照机阅读器模块"),
     * ER301(10, ER301),
     */
    public static BaseIDCardScan createIDCardScan(int  idCardReaderBrand) {
        IDCardScanType type = IDCardScanType.fromValue(idCardReaderBrand);
        switch (type) {
            case NFC:
                return NfcIDCardScan.getInstance(null);
            case TB:
                return TbIDCardScan.getInstance(null);
            case XZX:
                return XzxIDCardScan.getInstance(null);
            case ER301:
                return Er301IDCardScan.getInstance(null);
            case DX:
                return DxMultiIDCardScan.getInstance(null);

            default:
                return null;
        }
    }

}
