MotionDeviceConfig.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using TeamAAS.Global.Devices;
  5. namespace TeamAAS.Motion.Models
  6. {
  7. /// <summary>单台运动/IO 设备的配置(持久化为 Config\MotionDevices.json)。</summary>
  8. [Serializable]
  9. public class MotionDeviceConfig
  10. {
  11. /// <summary>设备名称(唯一,状态栏/绑定树显示用)。</summary>
  12. [DisplayName("设备名称")]
  13. [Description("设备唯一名称")]
  14. public string Name { get; set; } = "运动卡1";
  15. /// <summary>设备适配器唯一标识(如 "Simulated(仿真)", "Leadshine", "Googol")决定实例化哪个品牌适配器</summary>
  16. [DisplayName("设备类型")]
  17. [Description("填写适配器注册的唯一字符串键值")]
  18. public string AdapterKey { get; set; } = "Simulated"; // 默认仿真
  19. /// <summary>板卡号/设备号(品牌适配器解释,如卡号 0)。</summary>
  20. [DisplayName("板卡号")]
  21. [Description("品牌适配器的板卡/设备索引")]
  22. public int BoardIndex { get; set; } = 0;
  23. /// <summary>轴数量(IO 卡忽略)。</summary>
  24. [DisplayName("轴数量")]
  25. [Description("运动卡轴数量")]
  26. public int AxisCount { get; set; } = 4;
  27. /// <summary>输入点数(IO 卡用)。</summary>
  28. [DisplayName("输入点数")]
  29. [Description("IO 卡输入点数量")]
  30. public int InputCount { get; set; } = 16;
  31. /// <summary>输出点数(IO 卡用)。</summary>
  32. [DisplayName("输出点数")]
  33. [Description("IO 卡输出点数量")]
  34. public int OutputCount { get; set; } = 16;
  35. /// <summary>连接参数(IP/串口等,品牌适配器解释;EtherCAT 模块填 ENI/IP)。</summary>
  36. [DisplayName("连接参数")]
  37. [Description("IP / 串口 / EtherCAT 配置等,由品牌适配器解释")]
  38. public string ConnectionString { get; set; } = "";
  39. }
  40. }