2024-11-13 17:50:52 +08:00

28 lines
899 B
C#

using JiShe.CollectBus.Common.Models;
using JiShe.CollectBus.Protocol.Contracts.Abstracts;
using JiShe.CollectBus.Protocol.Contracts.Attributes;
using JiShe.CollectBus.Protocol.Contracts.Models;
using Microsoft.Extensions.Logging;
namespace JiShe.CollectBus.Protocol.Demo
{
[ProtocolName("TestProtocol")]
public class TestProtocolPlugin : BaseProtocolPlugin
{
public TestProtocolPlugin(ILogger<BaseProtocolPlugin> logger) : base(logger)
{
}
public override async Task<ProtocolInfo> GetAsync()
{
var info = new ProtocolInfo("Test", "376.1", "TCP", "376.1协议", "DTS1980");
return await Task.FromResult(info);
}
public override Task AnalyzeAsync(MessageReceivedEvent messageReceivedEvent, Action<byte[]>? sendAction = null)
{
throw new NotImplementedException();
}
}
}