35 lines
1.2 KiB
C#
Raw Permalink Normal View History

2024-12-19 16:07:07 +08:00
using System;
using System.Threading.Tasks;
using JiShe.CollectBus.Common.Models;
2025-03-14 14:28:04 +08:00
using JiShe.CollectBus.IotSystems.MessageReceiveds;
using JiShe.CollectBus.IotSystems.Protocols;
2024-12-19 16:07:07 +08:00
using JiShe.CollectBus.Protocol.Contracts.Models;
2025-04-24 17:48:20 +08:00
using JiShe.CollectBus.Protocol.Contracts.SendData;
2024-12-19 16:07:07 +08:00
using TouchSocket.Sockets;
namespace JiShe.CollectBus.Protocol.Contracts.Interfaces
{
public interface IProtocolPlugin
{
Task<ProtocolInfo> GetAsync();
Task LoadAsync();
2024-12-19 16:07:07 +08:00
Task<T> AnalyzeAsync<T>(ITcpSessionClient client, string messageReceived, Action<T>? sendAction = null) where T : class;
2024-12-19 16:07:07 +08:00
TB3761? Analysis3761(string messageReceived);
2024-12-19 16:07:07 +08:00
2025-04-23 17:49:13 +08:00
/// <summary>
2025-04-24 17:48:20 +08:00
/// 组装报文
2025-04-23 17:49:13 +08:00
/// </summary>
2025-04-24 17:48:20 +08:00
/// <typeparam name="T">是否需要转发的扩展协议入参对象</typeparam>
/// <param name="afnFnCode">映射读取执行方法的Code例如10_1表示10H_F1</param>
2025-04-23 17:49:13 +08:00
/// <returns></returns>
2025-04-24 23:39:39 +08:00
Task<ProtocolBuildResponse> BuildAsync(ProtocolBuildRequest request);
2025-04-23 17:49:13 +08:00
//Task LoginAsync(MessageReceivedLogin messageReceived);
//Task HeartbeatAsync(MessageReceivedHeartbeat messageReceived);
2024-12-19 16:07:07 +08:00
}
}