AnalogDataItem.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Runtime.Serialization;
  6. namespace Aitex.Core.UI.ControlDataContext
  7. {
  8. [DataContract]
  9. [Serializable]
  10. public class AnalogDeviceDataItem
  11. {
  12. /// <summary>
  13. /// 设备的唯一名称,UI与RT交互的ID
  14. /// </summary>
  15. [DataMember]
  16. public string DeviceName { get; set; }
  17. /// <summary>
  18. /// 显示在界面上的名称
  19. /// </summary>
  20. [DataMember]
  21. public string DisplayName { get; set; }
  22. /// <summary>
  23. /// IO 表中定义的物理编号,物理追溯使用 比如: M122
  24. /// </summary>
  25. [DataMember]
  26. public string DeviceId { get; set; }
  27. [DataMember]
  28. public string Unit { get; set; }
  29. [DataMember]
  30. public string Description { get; set; }
  31. /// <summary>
  32. /// 量程
  33. /// </summary>
  34. [DataMember]
  35. public double Scale { get; set; }
  36. /// <summary>
  37. /// 设定值
  38. /// </summary>
  39. [DataMember]
  40. public double SetPoint { get; set; }
  41. /// <summary>
  42. /// 实际反馈值
  43. /// </summary>
  44. [DataMember]
  45. public double FeedBack { get; set; }
  46. /// <summary>
  47. /// 默认值
  48. /// </summary>
  49. [DataMember]
  50. public double DefaultValue { get; set; }
  51. /// <summary>
  52. /// 是否有报警
  53. /// </summary>
  54. [DataMember]
  55. public bool IsWarning { get; set; }
  56. /// <summary>
  57. /// alarm或是erro时显示的信息
  58. /// </summary>
  59. [DataMember]
  60. public string ErroMessage { get; set; }
  61. /// <summary>
  62. /// MFC,PC
  63. /// </summary>
  64. [DataMember]
  65. public string Type { get; set; }
  66. private double _factor = 1.0;
  67. [DataMember]
  68. public double Factor { get { return _factor; } set { _factor = value; } }
  69. public AnalogDeviceDataItem()
  70. {
  71. DisplayName = "未定义设备";
  72. }
  73. }
  74. public class AnalogDeviceOperation
  75. {
  76. public const string Ramp = "Ramp";
  77. }
  78. }