package com.phlx.anchorcollect.rfid;


import com.phlx.anchorcollect.App;
import com.uhf.structures.Rfid_Value;

public class ModuleManager {

    public static int openCom() {
        //手持机
//        return App.getInstance().getLinkage().open_serial("/dev/ttyMT2");

        //pad
        return App.getInstance().getLinkage().open_serial("/dev/ttyMT1");
    }

    public static void destroyLibSO() {
        App.getInstance().getLinkage().deinitRFID();
        App.getInstance().getLinkage().close_serial();
        powerOff();
    }

    public static int powerOn() {

        DeviceControl DevCtrl = new DeviceControl();
        DevCtrl.PowerOnDevice();
        Rfid_Value rf = new Rfid_Value();
        App.getInstance().getLinkage().getVersion(rf);
        return rf.value;
    }

    public static void powerOff() {
        DeviceControl DevCtrl = new DeviceControl();
        DevCtrl.PowerOffDevice();
    }


}
