|
|
@@ -14,7 +14,7 @@ namespace CheckServer
|
|
|
|
|
|
public static class CheckHelper
|
|
|
{
|
|
|
- public static async Task<IEnumerable<DmcResult>> DmcCheckAsync(string fileName, double fsHz, DmcType dmcType, double? bandKHz = null)
|
|
|
+ public static async Task<IEnumerable<DmcResult>> DmcCheckAsync(string fileName, double fsHz, EnumSigCheckTypeDto dmcType, double? bandKHz = null)
|
|
|
{
|
|
|
if (bandKHz == null || bandKHz.Value <= 0) bandKHz = 25;
|
|
|
string dmcCmd = "all";
|
|
|
@@ -23,17 +23,17 @@ namespace CheckServer
|
|
|
string pArguments = string.Empty;
|
|
|
switch (dmcType)
|
|
|
{
|
|
|
- case DmcType.DAMA:
|
|
|
+ case EnumSigCheckTypeDto.DAMA:
|
|
|
dmcCmd = "dm";
|
|
|
if (fsHz != 96000)
|
|
|
throw new Exception("DAMA只支持96K采样率");
|
|
|
pArguments = $"{dmcCmd} \"{fileName}\" -c true";//-c包含ccow
|
|
|
break;
|
|
|
- case DmcType.IBS:
|
|
|
+ case EnumSigCheckTypeDto.IBS:
|
|
|
dmcCmd = "nd";
|
|
|
pArguments = $"{dmcCmd} \"{fileName}\" -w {bandKHz}";// -f {fs}" -c --dmfirst";
|
|
|
break;
|
|
|
- case DmcType.Ky5758:
|
|
|
+ case EnumSigCheckTypeDto.Ky5758:
|
|
|
pFileName = Path.Combine(dmp.StartInfo.WorkingDirectory, "AddIns\\enc.exe");
|
|
|
//enc.exe enc-test.dat 0.096 5 0全部文件
|
|
|
pArguments = $"{fileName} {fsHz * 1e-6} {5} {0}";
|
|
|
@@ -61,7 +61,7 @@ namespace CheckServer
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- private static IEnumerable<DmcResult> ConvertDmcResult(DmcType type, string res, double tm)
|
|
|
+ private static IEnumerable<DmcResult> ConvertDmcResult(EnumSigCheckTypeDto type, string res, double tm)
|
|
|
{
|
|
|
var lines = res.Split(Environment.NewLine.ToArray(), StringSplitOptions.RemoveEmptyEntries);
|
|
|
foreach (var line in lines)
|
|
|
@@ -74,10 +74,6 @@ namespace CheckServer
|
|
|
if (items.Length >= 3)
|
|
|
userName = items[2];
|
|
|
var item = new DmcResult(start, length, userName, (int)tm);
|
|
|
- if (type == DmcType.DAMA)
|
|
|
- item.ModType = "BPSK";
|
|
|
- else
|
|
|
- item.ModType = string.Empty;
|
|
|
item.DmcType = type.GetEnumDisplayName();
|
|
|
yield return item;
|
|
|
}
|