DeviceConfiguration.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. using Newtonsoft.Json;
  2. using NPOI.SS.Formula;
  3. using Prism.Mvvm;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Collections.ObjectModel;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace TeamAAS_VP.Models
  11. {
  12. /// <summary>
  13. /// 设备参数
  14. /// </summary>
  15. public class DeviceConfiguration : BindableBase
  16. {
  17. private ObservableCollection<CameraInfo> _Cameras = new ObservableCollection<CameraInfo>();
  18. /// <summary>
  19. /// 相机参数
  20. /// </summary>
  21. public ObservableCollection<CameraInfo> Cameras
  22. {
  23. get { return _Cameras; }
  24. set { SetProperty(ref _Cameras, value); }
  25. }
  26. private ObservableCollection<RobotInfo> _Robots = new ObservableCollection<RobotInfo>();
  27. /// <summary>
  28. /// 机器人参数
  29. /// </summary>
  30. public ObservableCollection<RobotInfo> Robots
  31. {
  32. get { return _Robots; }
  33. set { SetProperty(ref _Robots,value); }
  34. }
  35. private ObservableCollection<FeederInfo> _Feeders = new ObservableCollection<FeederInfo>();
  36. /// <summary>
  37. /// Feeder参数
  38. /// </summary>
  39. public ObservableCollection<FeederInfo> Feeders
  40. {
  41. get { return _Feeders; }
  42. set { SetProperty(ref _Feeders, value); }
  43. }
  44. private ObservableCollection<PlcInfo> _Plcs = new ObservableCollection<PlcInfo>();
  45. public ObservableCollection<PlcInfo> Plcs
  46. {
  47. get { return _Plcs; }
  48. set { SetProperty(ref _Plcs, value); }
  49. }
  50. private BgTcpIP _BgCommunicate = new BgTcpIP();
  51. /// <summary>
  52. /// 后台TCP/ip通讯,作为服务器
  53. /// </summary>
  54. public BgTcpIP BgCommunicate
  55. {
  56. get { return _BgCommunicate; }
  57. set { SetProperty(ref _BgCommunicate, value); }
  58. }
  59. private BgModbusTcp _BgModbusCommunicate = new BgModbusTcp();
  60. /// <summary>
  61. /// 后台Modbus TCp通讯,作为从站
  62. /// </summary>
  63. public BgModbusTcp BgModbusCommunicate
  64. {
  65. get { return _BgModbusCommunicate; }
  66. set { SetProperty(ref _BgModbusCommunicate, value); }
  67. }
  68. private BgEthernetIP _BgEthernetIPCommunicate = new BgEthernetIP();
  69. /// <summary>
  70. /// EthernetIP
  71. /// </summary>
  72. public BgEthernetIP BgEthernetIPCommunicate
  73. {
  74. get { return _BgEthernetIPCommunicate; }
  75. set { SetProperty(ref _BgEthernetIPCommunicate, value); }
  76. }
  77. private BgSfisConfig _BgSfisCommunicate = new BgSfisConfig();
  78. /// <summary>
  79. /// SFIS 过站/上传
  80. /// </summary>
  81. public BgSfisConfig BgSfisCommunicate
  82. {
  83. get { return _BgSfisCommunicate; }
  84. set { SetProperty(ref _BgSfisCommunicate, value); }
  85. }
  86. private ObservableCollection<CalibrationInfo> _Calibrations=new ObservableCollection<CalibrationInfo>();
  87. /// <summary>
  88. /// 校准集合
  89. /// </summary>
  90. public ObservableCollection<CalibrationInfo> Calibrations
  91. {
  92. get { return _Calibrations; }
  93. set { SetProperty(ref _Calibrations, value); }
  94. }
  95. public DeviceConfiguration Clone()
  96. {
  97. return JsonConvert.DeserializeObject<DeviceConfiguration>(JsonConvert.SerializeObject(this));
  98. }
  99. }
  100. }