2025-04-25 13:42:08 +08:00

35 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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