You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

46 lines
979 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace HBLConsole.Model
  8. {
  9. public class Siemens : TcpDeviceBase
  10. {
  11. public Siemens()
  12. {
  13. Init();
  14. }
  15. /// <summary>
  16. /// 插槽号
  17. /// </summary>
  18. public int Slot { get; set; } = 0;
  19. /// <summary>
  20. /// 机架号
  21. /// </summary>
  22. public int Rack { get; set; } = 0;
  23. /// <summary>
  24. /// PLC 类型
  25. /// </summary>
  26. public string PlcType { get; set; }
  27. public ObservableCollection<string> PlcTypes { get; set; } = new ObservableCollection<string>();
  28. private void Init()
  29. {
  30. PlcTypes.Clear();
  31. foreach (var item in Enum.GetNames(typeof(ESiemensPlcType)))
  32. {
  33. PlcTypes.Add(item.Substring(1));
  34. }
  35. }
  36. }
  37. }