修改代码
This commit is contained in:
parent
ff4b635de4
commit
4b9db3351f
@ -37,4 +37,8 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Plugins\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -12,7 +12,7 @@ namespace JiShe.CollectBus.Core.Plugins
|
||||
{
|
||||
//TODO:电表: 376.1 645-07 modbus 水表: 118 645-97
|
||||
|
||||
const string protocolType = "TestProtocol";
|
||||
const string protocolType = "StandardProtocol";
|
||||
switch (protocolType)
|
||||
{
|
||||
//case "376":
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
using JiShe.CollectBus.Protocol.Contracts.Interfaces;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Models;
|
||||
using Microsoft.Extensions.Caching.Distributed;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.Contracts.Abstracts
|
||||
{
|
||||
@ -16,7 +17,7 @@ namespace JiShe.CollectBus.Protocol.Contracts.Abstracts
|
||||
|
||||
public abstract ProtocolInfo Get();
|
||||
|
||||
public abstract void Received();
|
||||
public abstract void Received(ReceivedDataEventArgs e);
|
||||
|
||||
public abstract void Send();
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using JiShe.CollectBus.Protocol.Contracts.Models;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.Contracts.Interfaces
|
||||
{
|
||||
@ -8,7 +9,7 @@ namespace JiShe.CollectBus.Protocol.Contracts.Interfaces
|
||||
|
||||
void Load();
|
||||
|
||||
void Received();
|
||||
void Received(ReceivedDataEventArgs e);
|
||||
|
||||
void Send();
|
||||
}
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
|
||||
<PackageReference Include="TouchSocket" Version="2.1.5" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -3,6 +3,7 @@ using JiShe.CollectBus.Protocol.Contracts.Attributes;
|
||||
using JiShe.CollectBus.Protocol.Contracts.DependencyInjection;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Models;
|
||||
using Microsoft.Extensions.Caching.Distributed;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol.Test
|
||||
{
|
||||
@ -14,7 +15,7 @@ namespace JiShe.CollectBus.Protocol.Test
|
||||
return new ProtocolInfo("Test", "376.1", "TCP", "376.1协议", "DTSU1980");
|
||||
}
|
||||
|
||||
public override void Received()
|
||||
public override void Received(ReceivedDataEventArgs e)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ using JiShe.CollectBus.Protocol.Contracts.Attributes;
|
||||
using JiShe.CollectBus.Protocol.Contracts.DependencyInjection;
|
||||
using JiShe.CollectBus.Protocol.Contracts.Models;
|
||||
using Microsoft.Extensions.Caching.Distributed;
|
||||
using TouchSocket.Sockets;
|
||||
|
||||
namespace JiShe.CollectBus.Protocol
|
||||
{
|
||||
@ -19,7 +20,7 @@ namespace JiShe.CollectBus.Protocol
|
||||
base.Load();
|
||||
}
|
||||
|
||||
public override void Received()
|
||||
public override void Received(ReceivedDataEventArgs e)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user