using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DW5S.DTO { /// /// 多个时隙的CPU参估参数模型 /// public class CpuCgMultiDto { /// /// 上传后返回的文件名 /// public string file1 { get; set; } /// /// 上传后返回的文件名 /// public string file2 { get; set; } /// /// 样点位置 /// public List smpPositions { get; set; } = new List(); /// /// 采样率(Hz) /// [Range(0, 100e6)] public double samplingRate { get; set; } /// /// 信号带宽(Hz) /// [Range(0, 100e6)] public double BandHz { get; set; } = 0; /// /// 时差中心(us) /// public double dtCenter { get; set; } /// /// 时差范围(us) /// [Range(0, 100000d)] public double dtRange { get; set; } /// /// 频差范围(单位Hz,默认16384) /// public double dfRange { get; set; } = 16384; /// /// 信噪比门限dB /// [Range(10d, 50d)] public double snrThreshold { get; set; } /// /// 模型参数自定义验证(复杂的验证逻辑在这里面写) /// /// /// public IEnumerable Validate(ValidationContext validationContext) { //if (this.Age<18) // yield return new ValidationResult("你太年轻了", new[] { nameof(this.Age) }); yield return null; } } /// /// 时隙样点信息 /// public class SmpPosition { /// /// /// public SmpPosition() { } /// /// /// /// /// public SmpPosition(long smpStart, long smpCount) { this.smpStart = smpStart; this.smpCount = smpCount; } /// /// 54专用,避免样点转时间出现毫秒级误差 /// [Obsolete] public float TimeSeconds { get; set; } /// /// 开始样点 /// [Range(0,long.MaxValue)] public long smpStart { get; set; } /// /// 样点数 /// [Range(0,long.MaxValue)] public long smpCount { get; set; } } }