fakeUhf.js 599 Bytes
/**
 * 预期结果
 * @type {Object}
 */
export let ret = {
    code: 1
};
/**
 * 发起的指令名称
 * @type {String}
 */
export let orderName = 'openUhf';

export let setRet = function(val) {
    ret = val;
}

export let setOrderName = function(val) {
    orderName = val;
}

/**
 * @class FakeUHF 假的读写器的指令操作上
 * @extends {Base}
 * @member @see {@link Base}
 */
export default class FakeUhf {
    constructor() {}
    send(connector, order) {
        process.nextTick(function() {
            connector.done(orderName, ret);
        });
    }
}

export let uhf = FakeUhf;