62 lines
988 B
C#
62 lines
988 B
C#
|
|
using Fleck;
|
|||
|
|
using PlcTool.Siemens;
|
|||
|
|
using SqlSugar;
|
|||
|
|
using System.Diagnostics.CodeAnalysis;
|
|||
|
|
using WcsMain.Business.CommonAction;
|
|||
|
|
using WcsMain.Tcp.Client;
|
|||
|
|
|
|||
|
|
namespace WcsMain.Common;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 公用工具类
|
|||
|
|
/// </summary>
|
|||
|
|
public class CommonTool
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
#region 数据库连接
|
|||
|
|
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 数据库连接
|
|||
|
|
/// </summary>
|
|||
|
|
[NotNull]
|
|||
|
|
public static ISqlSugarClient? DbServe { get; set; }
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region PLC 连接
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// PLC连接
|
|||
|
|
/// </summary>
|
|||
|
|
public static SiemensS7? Siemens { get; set; }
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
#region PLC 的 TCP 连接
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// TCP 连接的PLC通讯
|
|||
|
|
/// </summary>
|
|||
|
|
[NotNull]
|
|||
|
|
public static PlcTcpClient? PlcTcpClient { get; set; }
|
|||
|
|
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
#region WMS 接口
|
|||
|
|
|
|||
|
|
// 请查看 Plugins 文件夹 WmsWebApiPost
|
|||
|
|
|
|||
|
|
#endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
public static WebSocketServer? Websocket;
|
|||
|
|
|
|||
|
|
public static readonly LedUsing LedUsing = new(256, 96, 1);
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|