wanshenmean
2026-03-24 ab2076893b8df3c14f1a126d47e9eee132a38f4b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using WIDESEAWCS_S7Simulator.Core.Interfaces;
using WIDESEAWCS_S7Simulator.Core.Protocol;
 
namespace WIDESEAWCS_S7Simulator.Application.Protocol;
 
/// <summary>
/// 设备协议处理器接口。
/// 每个设备使用一个独立实现类,便于后续单设备扩展。
/// </summary>
public interface IDeviceProtocolHandler
{
    /// <summary>
    /// 协议名称(唯一)。
    /// 由配置中的 ProtocolName 绑定到具体处理器。
    /// </summary>
    string ProtocolName { get; }
 
    /// <summary>
    /// 执行设备协议处理逻辑。
    /// </summary>
    bool Process(IMemoryStore memoryStore, ProtocolTemplate template, ProtocolRuntimeState runtimeState);
}