EPDConfig.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. using System.Runtime.Serialization;
  2. namespace JetVirgoPM.PMs.RecipeExecutors
  3. {
  4. [DataContract]
  5. public enum AlgorithmType
  6. {
  7. [EnumMember]
  8. ALG_NONE, //非endpoint
  9. //level trigger, invaild time
  10. [EnumMember]
  11. ALG_FALL_VALUE, //"FallValue" ValidationTime,Threshold <
  12. [EnumMember]
  13. ALG_RISE_VALUE, //"RiseValue" ValidationTime,Threshold >
  14. [EnumMember]
  15. ALG_FALL_PERCENT, //"FallPecent" ValidationTime,Threshold, TimeWindow <
  16. [EnumMember]
  17. ALG_RISE_PERCENT, //"RisePecent" ValidationTime,Threshold, TimeWindow >
  18. [EnumMember]
  19. ALG_MIN_FALL_PERCENT, //"MinFallPecent" ValidationTime,Threshold, TimeWindow, BandTime
  20. [EnumMember]
  21. ALG_MAX_FALL_PERCENT, //"MaxFallPecent" ValidationTime,Threshold, TimeWindow, BandTime
  22. [EnumMember]
  23. ALG_MIN_RISE_PERCENT, //"MinRisePecent" ValidationTime,Threshold, TimeWindow, BandTime
  24. [EnumMember]
  25. ALG_MAX_RISE_PERCENT, //"MaxRisePecent" ValidationTime,Threshold, TimeWindow, BandTime
  26. //Edge Trigger
  27. [EnumMember]
  28. ALG_GRADIENT, //"Gradient" Threshold, TimeWindow
  29. [EnumMember]
  30. ALG_RANGE_IN, //"RangeIn" Threshold, TimeWindow
  31. [EnumMember]
  32. ALG_PEAK, //Peak Threshold, TimeWindow, ValidationTime
  33. [EnumMember]
  34. ALG_VALLEY, //Vallery Threshold, TimeWindow, ValidationTime
  35. [EnumMember]
  36. ALG_RISE_FALL, //"RiseFall" Threshold, ValidationTime,ValidationValue,
  37. [EnumMember]
  38. ALG_FALL_RISE, //"FallRise" Threshold, ValidationTime,ValidationValue,
  39. }
  40. [DataContract]
  41. public class EPDColumn
  42. {
  43. [DataMember]
  44. public bool bNormalization { get; set; }
  45. [DataMember]
  46. public bool bControl { get; set; }
  47. [DataMember]
  48. public bool bPostponePercent { get; set; }
  49. [DataMember]
  50. public bool bEvtTrigger { get; set; }
  51. [DataMember]
  52. public bool bCriteriaPercent { get; set; }
  53. [DataMember]
  54. public int nCCDExposureTime { get; set; }
  55. [DataMember]
  56. public int nPreFilterTime { get; set; }
  57. [DataMember]
  58. public int nPostFilterTime { get; set; }
  59. [DataMember]
  60. public AlgorithmType algorithmType { get; set; }
  61. [DataMember]
  62. public double nCriteria { get; set; }
  63. [DataMember]
  64. public int nDelayTime { get; set; }
  65. [DataMember]
  66. public int nValidationTime { get; set; }
  67. [DataMember]
  68. public int nTimeWindow { get; set; }
  69. [DataMember]
  70. public int nMinimalTime { get; set; } // Version 2
  71. [DataMember]
  72. public int nPostponeTime { get; set; } // Version 2
  73. [DataMember]
  74. public int nValidationValue { get; set; } // Used for rise / fall algorithm
  75. [DataMember]
  76. public int nRefractionIndex { get; set; }// Only for IEP, always zero
  77. [DataMember]
  78. public float fEtchAmount { get; set; } // Only for IEP, always zero
  79. [DataMember]
  80. public ushort[] nWaveLength { get; set; }
  81. [DataMember]
  82. public ushort[] nBinning { get; set; }
  83. [DataMember]
  84. public string cPSMode { get; set; } // Version 7
  85. [DataMember]
  86. public string cFunc { get; set; }
  87. public EPDColumn()
  88. {
  89. nWaveLength = new ushort[8];
  90. nBinning = new ushort[8];
  91. }
  92. }
  93. [DataContract]
  94. public class EPDConfig
  95. {
  96. [DataMember]
  97. public int nParameterCount { get; set; }
  98. [DataMember]
  99. public EPDColumn[] Columns;
  100. public bool FaultIfNoEPDTrigger { get; set; }
  101. [DataMember]
  102. public string cLogic { get; set; } // logic for multiple endpoints, resevered for future to support logic 'OR' Version 3
  103. public EPDConfig()
  104. {
  105. Columns = new EPDColumn[3];
  106. for (int i = 0; i < Columns.Length; i++)
  107. Columns[i] = new EPDColumn();
  108. }
  109. }
  110. }