| | |
| | | using System.Collections.Generic; |
| | | |
| | | namespace WIDESEAWCS_S7Simulator.Core.Persistence.Models |
| | | { |
| | | /// <summary> |
| | | /// 实例数据模型(用于JSON序列化) |
| | | /// 瀹炰緥鏁版嵁妯″瀷锛堢敤浜嶫SON搴忓垪鍖栵級 |
| | | /// </summary> |
| | | public class InstanceDataModel |
| | | { |
| | | /// <summary> |
| | | /// 实例ID |
| | | /// 瀹炰緥ID |
| | | /// </summary> |
| | | public string Id { get; set; } = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 实例名称 |
| | | /// 瀹炰緥鍚嶇О |
| | | /// </summary> |
| | | public string Name { get; set; } = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// PLC类型 |
| | | /// PLC绫诲瀷 |
| | | /// </summary> |
| | | public string PlcType { get; set; } = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 监听端口 |
| | | /// 鐩戝惉绔彛 |
| | | /// </summary> |
| | | public int Port { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 激活密钥 |
| | | /// 婵€娲诲瘑閽? |
| | | /// </summary> |
| | | public string ActivationKey { get; set; } = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 自动启动 |
| | | /// 鑷姩鍚姩 |
| | | /// </summary> |
| | | public bool AutoStart { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 内存区域配置 |
| | | /// 协议模板ID |
| | | /// </summary> |
| | | public string ProtocolTemplateId { get; set; } = string.Empty; |
| | | |
| | | /// <summary> |
| | | /// 鍐呭瓨鍖哄煙閰嶇疆 |
| | | /// </summary> |
| | | public MemoryRegionConfigModel MemoryConfig { get; set; } = new(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 内存区域配置模型 |
| | | /// 鍐呭瓨鍖哄煙閰嶇疆妯″瀷 |
| | | /// </summary> |
| | | public class MemoryRegionConfigModel |
| | | { |
| | | public int MRegionSize { get; set; } = 1024; |
| | | public int DBBlockCount { get; set; } = 100; |
| | | public List<int> DBBlockNumbers { get; set; } = new(); |
| | | public int DBBlockSize { get; set; } = 1024; |
| | | public int IRegionSize { get; set; } = 256; |
| | | public int QRegionSize { get; set; } = 256; |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 内存数据模型 |
| | | /// 鍐呭瓨鏁版嵁妯″瀷 |
| | | /// </summary> |
| | | public class MemoryDataModel |
| | | { |
| | | /// <summary> |
| | | /// 内存区域数据字典(区域类型 -> Base64编码的字节数组) |
| | | /// 鍐呭瓨鍖哄煙鏁版嵁瀛楀吀锛堝尯鍩熺被鍨?-> Base64缂栫爜鐨勫瓧鑺傛暟缁勶級 |
| | | /// </summary> |
| | | public Dictionary<string, string> MemoryData { get; set; } = new(); |
| | | } |
| | | } |
| | | |
| | | |