From 821af8301009019a0f0e81a3ea2a0ae7952b5025 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 28 一月 2026 11:43:30 +0800
Subject: [PATCH] 更新
---
项目代码/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs"
index 26232e4..978fed6 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs"
@@ -1,10 +1,14 @@
锘縰sing HslCommunication.WebSocket;
+using RYB_PTL_API;
using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_DTO;
+using WIDESEAWCS_DTO.TaskInfo;
namespace WIDESEAWCS_Server.HostedService
{
public static class WebSocketSetup
{
+ private static bool _eventSubscribed = false;
public static void AddWebSocketSetup(this IServiceCollection services)
{
if (services == null) throw new ArgumentNullException(nameof(services));
@@ -25,5 +29,50 @@
});
}
}
+ /// <summary>
+ ///// 璁㈤槄PTL浜嬩欢
+ ///// </summary>
+ //public static void SubscribeEvent(this IServiceCollection services)
+ //{
+ // if (!_eventSubscribed)
+ // {
+ // RYB_PTL.UserResultAvailable += new RYB_PTL.UserResultAvailableEventHandler(RYB_PTL_UserResultAvailable);
+ // _eventSubscribed = true;
+ // }
+ //}
+ ///// <summary>
+ ///// PTL鍥炶皟浜嬩欢澶勭悊锛堝彧澶勭悊鎵嬫媿浜嬩欢锛�
+ ///// </summary>
+ //public static void RYB_PTL_UserResultAvailable(RYB_PTL.RtnValueStruct rs)
+ //{
+ // try
+ // {
+ // if (rs.KeyCode == null)
+ // {
+ // return;
+ // }
+ // // 鏋勫缓鍥炶皟鏁版嵁
+ // var pTLCallBackDTO = new PTLCallBackDTO
+ // {
+ // sIp = rs.Ip,
+ // sTagID = rs.Tagid,
+ // sValue = rs.Number,
+ // sKeyCode = rs.KeyCode,
+ // sLocator = rs.Locator
+ // };
+
+ // // 鏍规嵁涓氬姟闇�瑕佹瀯寤轰换鍔′俊鎭�
+ // var taskBackLight = new TaskBackLight()
+ // {
+ // TagNo = "B1",
+ // TagCode = pTLCallBackDTO.sLocator,
+ // };
+ // }
+ // catch (Exception ex)
+ // {
+ // // 璁板綍鏃ュ織鎴栧鐞嗗紓甯�
+ // Console.WriteLine($"澶勭悊PTL鎵嬫媿鍥炶皟鏃跺嚭閿�: {ex.Message}");
+ // }
+ //}
}
}
--
Gitblit v1.9.3