using WIDESEAWCS_S7Simulator.Core.Entities;
namespace WIDESEAWCS_S7Simulator.Core.Interfaces
{
///
/// S7服务器实例接口
/// 管理单个S7 PLC仿真实例的生命周期
///
public interface IS7ServerInstance : IDisposable
{
///
/// 实例配置
///
InstanceConfig Config { get; }
///
/// 实例状态
///
InstanceState State { get; }
///
/// 内存存储
///
IMemoryStore MemoryStore { get; }
///
/// 启动S7服务器
///
/// 启动是否成功
bool Start();
///
/// 停止S7服务器
///
void Stop();
///
/// 重启S7服务器
///
/// 重启是否成功
bool Restart();
///
/// 获取实例状态快照
///
/// 状态快照
InstanceState GetState();
///
/// 清空所有内存
///
void ClearMemory();
///
/// 导出内存数据
///
/// 内存数据
Dictionary ExportMemory();
///
/// 导入内存数据
///
/// 内存数据
void ImportMemory(Dictionary data);
}
}