27 lines
861 B
C#
27 lines
861 B
C#
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();
|
|
}
|
|
}
|
|
}
|