AnalogDataItem.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. /// <summary>
  70. /// 格式化显示
  71. /// </summary>
  72. [DataMember]
  73. public string FormatString { get; set; }
  74. public AnalogDeviceDataItem()
  75. {
  76. DisplayName = "未定义设备";
  77. FormatString = "F1";
  78. }
  79. }
  80. public class AnalogDeviceOperation
  81. {
  82. public const string Ramp = "Ramp";
  83. }
  84. }