namespace WIDESEAWCS_S7Simulator.Core.Persistence.Models
{
///
/// 实例数据模型(用于JSON序列化)
///
public class InstanceDataModel
{
///
/// 实例ID
///
public string Id { get; set; } = string.Empty;
///
/// 实例名称
///
public string Name { get; set; } = string.Empty;
///
/// PLC类型
///
public string PlcType { get; set; } = string.Empty;
///
/// 监听端口
///
public int Port { get; set; }
///
/// 激活密钥
///
public string ActivationKey { get; set; } = string.Empty;
///
/// 自动启动
///
public bool AutoStart { get; set; }
///
/// 内存区域配置
///
public MemoryRegionConfigModel MemoryConfig { get; set; } = new();
}
///
/// 内存区域配置模型
///
public class MemoryRegionConfigModel
{
public int MRegionSize { get; set; } = 1024;
public int DBBlockCount { get; set; } = 100;
public int DBBlockSize { get; set; } = 1024;
public int IRegionSize { get; set; } = 256;
public int QRegionSize { get; set; } = 256;
public int TRegionCount { get; set; } = 64;
public int CRegionCount { get; set; } = 64;
}
///
/// 内存数据模型
///
public class MemoryDataModel
{
///
/// 内存区域数据字典(区域类型 -> Base64编码的字节数组)
///
public Dictionary MemoryData { get; set; } = new();
}
}