35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
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.Contracts.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);
|
||
}
|
||
}
|