package com.phlx.wool.rfid;


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

public class ModuleManager {

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

    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();
    }


}
