|
@@ -1,7 +1,9 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
+using System.ComponentModel;
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
using System.Linq;
|
|
|
+using System.Runtime.Serialization;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows.Markup;
|
|
@@ -11,8 +13,7 @@ namespace XdCxRhDw.Dto
|
|
|
/// <summary>
|
|
|
/// CPU参估参数
|
|
|
/// </summary>
|
|
|
- [CustomValidation(typeof(CpuCgDto), "Validate")]
|
|
|
- public class CpuCgDto : IValidatableObject
|
|
|
+ public class CpuCgDto
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 上传后返回的文件名
|
|
@@ -29,39 +30,36 @@ namespace XdCxRhDw.Dto
|
|
|
/// </summary>
|
|
|
[Range(2, 4)]
|
|
|
public int smpStart { get; set; }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 样点数(0表示文件末尾)
|
|
|
/// </summary>
|
|
|
public int smpCount { get; set; }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 采样率(Hz)
|
|
|
/// </summary>
|
|
|
public double samplingRate { get; set; }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 时差中心(us)
|
|
|
/// </summary>
|
|
|
public double dtCenter { get; set; }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 时差范围(us)
|
|
|
/// </summary>
|
|
|
public double dtRange { get; set; }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 频差范围(单位Hz,默认16384)
|
|
|
/// </summary>
|
|
|
public double dfRange { get; set; } = 16384;
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 信噪比门限dB
|
|
|
/// </summary>
|
|
|
public double snrThreshold { get; set; }
|
|
|
|
|
|
- public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
|
|
- {
|
|
|
- var results = new List<ValidationResult>();
|
|
|
- if (this.smpStart <= 0)
|
|
|
- {
|
|
|
- results.Add(new ValidationResult("smpStart must be larger than 2"));
|
|
|
- }
|
|
|
- return results;
|
|
|
- }
|
|
|
}
|
|
|
}
|