AdCard.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. using DevExpress.Xpo;
  2. using Ips.Library.Basic;
  3. using Ips.Library.Basic.IO;
  4. using Ips.Library.Entity;
  5. using System;
  6. namespace Ips.Sps.Adcs
  7. {
  8. public class AdCard : XPObject
  9. {
  10. public AdCard() : base()
  11. {
  12. }
  13. public AdCard(Session session) : base(session)
  14. {
  15. }
  16. public override void AfterConstruction()
  17. {
  18. base.AfterConstruction();
  19. CardType = AdCardType.QFCarder;
  20. TriggerMode = AdTriggerMode.In;
  21. ClockerType = AdClockType.In;
  22. ClockFreq = 100;
  23. DdcFreq = 70;
  24. Mutil = 1;
  25. StorePath = DriveUtil.GetMaxDrivePath("data");
  26. IsInverse = false;
  27. Enable = true;
  28. }
  29. private string _name;
  30. [Size(255)]
  31. [DisplayName("采集卡名称")]
  32. public string Name
  33. {
  34. get => _name;
  35. set => SetPropertyValue(nameof(Name), ref _name, value);
  36. }
  37. private string _code;
  38. [Size(255)]
  39. [DisplayName("采集卡编码")]
  40. public string Code
  41. {
  42. get => _code;
  43. set => SetPropertyValue(nameof(Code), ref _code, value);
  44. }
  45. private AdCardType _cardType;
  46. [DisplayName("设备类型")]
  47. [MemberDesignTimeVisibility(false)]
  48. public AdCardType CardType
  49. {
  50. get => _cardType;
  51. set => SetPropertyValue(nameof(CardType), ref _cardType, value);
  52. }
  53. private AdTriggerMode _triggerMode;
  54. [DisplayName("触发模式")]
  55. public AdTriggerMode TriggerMode
  56. {
  57. get => _triggerMode;
  58. set => SetPropertyValue(nameof(TriggerMode), ref _triggerMode, value);
  59. }
  60. private AdClockType _clockType;
  61. [DisplayName("时钟类型")]
  62. public AdClockType ClockerType
  63. {
  64. get => _clockType;
  65. set => SetPropertyValue(nameof(ClockerType), ref _clockType, value);
  66. }
  67. private double _clockFreq;
  68. [DisplayName("时钟频率(MHz)")]
  69. public double ClockFreq
  70. {
  71. get => _clockFreq;
  72. set => SetPropertyValue(nameof(ClockFreq), ref _clockFreq, value);
  73. }
  74. private double _ddcFreq;
  75. [DisplayName("DDC频率(MHz)")]
  76. public double DdcFreq
  77. {
  78. get => _ddcFreq;
  79. set => SetPropertyValue(nameof(DdcFreq), ref _ddcFreq, value);
  80. }
  81. private bool _isInverse;
  82. [DisplayName("反谱")]
  83. public bool IsInverse
  84. {
  85. get => _isInverse;
  86. set => SetPropertyValue(nameof(IsInverse), ref _isInverse, value);
  87. }
  88. [DisplayName("是否反谱"), NonPersistent]
  89. public string IsInverseText
  90. {
  91. get => IsInverse ? "是" : "否";
  92. }
  93. private int _mutil;
  94. [DisplayName("抽取倍数")]
  95. public int Mutil
  96. {
  97. get => _mutil;
  98. set => SetPropertyValue(nameof(Mutil), ref _mutil, value);
  99. }
  100. private string _storePath;
  101. [DisplayName("存储路径")]
  102. [Size(200)]
  103. public string StorePath
  104. {
  105. get => _storePath;
  106. set => SetPropertyValue(nameof(StorePath), ref _storePath, value);
  107. }
  108. private bool _enable;
  109. [DisplayName("启用")]
  110. public bool Enable
  111. {
  112. get => _enable;
  113. set => SetPropertyValue(nameof(Enable), ref _enable, value);
  114. }
  115. private bool _isDefault;
  116. [DisplayName("默认采集")]
  117. public bool IsDefault
  118. {
  119. get => _isDefault;
  120. set => SetPropertyValue(nameof(IsDefault), ref _isDefault, value);
  121. }
  122. [DisplayName("采集通道"), Association, Aggregated]
  123. public XPCollection<AdChannel> Channels
  124. {
  125. get => GetCollection<AdChannel>(nameof(Channels));
  126. }
  127. }
  128. }