28 lines
899 B
C#
Raw Normal View History

2024-11-13 17:50:52 +08:00
using JiShe.CollectBus.Common.Models;
using JiShe.CollectBus.Protocol.Contracts.Abstracts;
2024-10-08 14:41:41 +08:00
using JiShe.CollectBus.Protocol.Contracts.Attributes;
using JiShe.CollectBus.Protocol.Contracts.Models;
2024-10-29 16:28:14 +08:00
using Microsoft.Extensions.Logging;
2024-10-08 14:41:41 +08:00
2024-11-13 00:30:24 +08:00
namespace JiShe.CollectBus.Protocol.Demo
2024-10-08 14:41:41 +08:00
{
2024-10-08 15:06:08 +08:00
[ProtocolName("TestProtocol")]
2024-11-13 00:30:24 +08:00
public class TestProtocolPlugin : BaseProtocolPlugin
2024-10-08 14:41:41 +08:00
{
2024-10-29 16:28:14 +08:00
public TestProtocolPlugin(ILogger<BaseProtocolPlugin> logger) : base(logger)
{
}
2024-11-13 00:30:24 +08:00
public override async Task<ProtocolInfo> GetAsync()
2024-10-08 14:41:41 +08:00
{
2024-11-13 00:30:24 +08:00
var info = new ProtocolInfo("Test", "376.1", "TCP", "376.1协议", "DTS1980");
return await Task.FromResult(info);
2024-10-08 14:41:41 +08:00
}
2024-10-29 16:28:14 +08:00
public override Task AnalyzeAsync(MessageReceivedEvent messageReceivedEvent, Action<byte[]>? sendAction = null)
2024-10-08 14:41:41 +08:00
{
throw new NotImplementedException();
}
}
}