package com.example.bpa.service;

import com.example.bpa.Model.IRun;
import com.example.bpa.Model.IThread;
import com.example.bpa.Model.IWriteCallBack;
import com.example.bpa.Model.ResultA;
import com.example.bpa.config.DataBus;
import com.example.bpa.db.QueryDB;
import com.example.bpa.db.mode.BPA_GOODS;
import com.example.bpa.db.mode.BPA_SILOS;
import com.example.bpa.db.mode.BPA_SUGAR;
import com.example.bpa.helper.MessageLog;
import com.example.bpa.helper.ModbusTcpServer;
import com.example.bpa.helper.ThreadManager;
import com.example.bpa.view.mode.AlertLogEnum;
import com.example.bpa.view.mode.ResGoodsRecipe;
import com.example.bpa.view.mode.UserLogEnum;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;

/**
 * 设备服务
 * 设备预警、上报设备告警、上报设备状态
 */
public class DeviceServer {

    //region 私有单例
    private static volatile DeviceServer _instance;

    public static DeviceServer Get() {
        if (_instance == null)
            _instance = new DeviceServer();
        return _instance;
    }

    private DeviceServer() {
    }
    //endregion

    //region

    /**
     * 初始化
     */
    public void Init()
    {
//        ThreadManager.Get().StartLong("设备服务", true, new IThread() {
//            @Override
//            public void Run() throws InterruptedException {
//                MessageLog.ShowInfo("我是设备服务！");
//                Thread.sleep(2000);
//            }
//            @Override
//            public void RunComplete() throws InterruptedException {
//            }
//        });
    }
    //endregion
}
