@luoxiao123/bankcard-reader-start
Version:
15 lines (14 loc) • 784 B
TypeScript
/// <reference types="node" />
import { Device } from './model';
export declare function connectDevice(device: Device): boolean;
export declare function disconnectDevice(device: Device): boolean;
/** 检查端口是否已打开 */
export declare function isDevicePortOpen(device: Device): boolean;
export declare function findDeviceList(deviceOpts: Device['deviceOpts'], apib: Device['apib']): Device[];
export declare function findDevice(deviceOpts: Device['deviceOpts'], apib: Device['apib']): Device;
/** 读取银行卡 磁条卡 */
export declare function readMC(device: Device): string;
/** 读取银行卡 支持 接触、非接触 IC卡 */
export declare function readIC(device: Device): string;
/** 转换Buffer */
export declare function parseBuffer(buf: Buffer): string;