New file |
| | |
| | | using Furion.InstantMessaging; |
| | | using Microsoft.AspNetCore.SignalR; |
| | | |
| | | namespace WCS.Application; |
| | | |
| | | /// <summary> |
| | | /// PLC集线器 |
| | | /// </summary> |
| | | [MapHub("/hubs/Plc")] |
| | | public class PlcHub : Hub<IPlcHub> |
| | | { |
| | | private readonly IHubContext<PlcHub, IPlcHub> _plcHubContext; |
| | | |
| | | public PlcHub(IHubContext<PlcHub, IPlcHub> plcHubContext) |
| | | { |
| | | _plcHubContext = plcHubContext; |
| | | } |
| | | /// <summary> |
| | | /// 下发PLC连接状态 |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <returns></returns> |
| | | //public async Task PublicPlcConn(WcsPlc context) |
| | | //{ |
| | | // await _plcHubContext.Clients.All.PublicPlcConn(context); |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 下发工位状态 |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <returns></returns> |
| | | //public async Task PublicStationStatus(List<WcsDevice> context) |
| | | //{ |
| | | // await _plcHubContext.Clients.All.PublicStationStatus(context); |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 下发报警信息 |
| | | /// </summary> |
| | | /// <param name="context"></param> |
| | | /// <returns></returns> |
| | | //public async Task PublicAlarm(WcsAlarmInfoOutput context) |
| | | //{ |
| | | // await _plcHubContext.Clients.All.PublicAlarm(context); |
| | | //} |
| | | } |