using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace XdCxRhDW.DataEmulation { public static class DataEmulationHelper { private const string dll = @"AddIns\SignalEmulation.dll"; #region cpp dll Interop [DllImport(dll, EntryPoint = "genSignalsWithDtDf", CallingConvention = CallingConvention.Cdecl)] private extern static void GenSignalsWithDtDfCore(string file1, string file2, long fsHz, int sigLenMs, double dt, double df, int snr2, int snr1); #endregion /// /// 时频差信号文件仿真 /// /// 输出文件1 /// 输出文件2 /// 采样率Hz /// 信号时长秒 /// 时差秒 /// 频差Hz /// 文件1信噪比 /// 文件2信噪比 public static void GenSignalsWithDtDf(string file1, string file2, long fsHz, int sigLenMs, double dt, double df, int snr1, int snr2) { GenSignalsWithDtDfCore(file1, file2, fsHz, sigLenMs, dt, df, snr2, snr1); } } }