You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Autofac;
|
|
|
|
|
using HybirdFrameworkCore.Autofac;
|
|
|
|
|
using Service.Ups.UpsMsg;
|
|
|
|
|
//using HslCommunication;
|
|
|
|
|
|
|
|
|
|
namespace Service.Ups.Client;
|
|
|
|
|
|
|
|
|
|
public class UpsMgr
|
|
|
|
|
{
|
|
|
|
|
public static UpsClient UpsClient;
|
|
|
|
|
public static UpsInfoMsg UpsInfoMsg=new ();
|
|
|
|
|
public static UpsAlarm UpsAlarm=new ();
|
|
|
|
|
|
|
|
|
|
public static void Init()
|
|
|
|
|
{
|
|
|
|
|
if (UpsClient == null)
|
|
|
|
|
{
|
|
|
|
|
UpsClient = AppInfo.Container.Resolve<UpsClient>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
global::System.Threading.Tasks.Task.Run(() => UpsClient.Connect());
|
|
|
|
|
}
|
|
|
|
|
}
|