110,533
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;
using QC.QTMDotNetKernelInterface;
using ENV = QC.QTMDotNetKernelInterface.Environment;
namespace QSEQ_DOTNETTest
{
[QTMTestClass] //////// <- 这一行,没见过
public class QSEQ_DOTNETTests : ENV.QSPRTest, IDisposable
{
public QSEQ_DOTNETTests(ENV.QSPREnvironment qsprEnv)
: base(qsprEnv)
{
qsprEnv.DebugMessage.Write("Constructor", "SchedulerID=" + qsprEnv.SchedulerID);
}
// QSEQ core dll filename
const string qseqDLLName = "QSEQ_CORE_DLL.dll";
// QSEQ max string buffer size
const Int32 qseqMaxStringBufferSize = 1024;
[DllImport(qseqDLLName, SetLastError = true, CallingConvention = CallingConvention.Cdecl)]
static extern byte fnQSEQ_SetUUTID(
UInt32 _iDeviceGroupID,
string _sUUTID,
string _sUUTType);
}
}
#region 程序集 QTMDotNetKernelInterface.dll, v4.0.30319
// E:\tmp\QTMDotNetKernelInterface.dll
#endregion
using System;
namespace QC.QTMDotNetKernelInterface
{
[AttributeUsage(AttributeTargets.Class)]
public class QTMTestClass : Attribute
{
public QTMTestClass();
}
}
[QTMParameter(ArgumentName = "Technology", DefaultValue = "3", Description = "Technology being used in the sequence")]
[QTMParameter(ArgumentName = "Rx0Device", DefaultValue = "0", Description = "Device used for Primary Rx measurements")]
[QTMParameter(ArgumentName = "Rx0SignalPath", DefaultValue = "0", Description = "Signal Path used for Primary Rx measurements")]
[QTMParameter(ArgumentName = "Rx0AntennaPath", DefaultValue = "0", Description = "Antenna Path used for Primary Rx measurements")]
[QTMParameter(ArgumentName = "Rx1Device", DefaultValue = "0", Description = "Device used for Diversity Rx measurements")]
[QTMParameter(ArgumentName = "Rx1SignalPath", DefaultValue = "0", Description = "Signal Path used for Diversity Rx measurements")]
[QTMParameter(ArgumentName = "Rx1AntennaPath", DefaultValue = "0", Description = "Antenna Path used for Diversity Rx measurements")]
[QTMParameter(ArgumentName = "TxDevice", DefaultValue = "0", Description = "Device used for Tx routing")]
[QTMParameter(ArgumentName = "TxSignalPath", DefaultValue = "0", Description = "Signal Path used for Tx routing")]
[QTMParameter(ArgumentName = "TxAntennaPath", DefaultValue = "0", Description = "Antenna Path used for Tx routing")]
public bool SetRadioAllocation(
Technology Technology,
UInt16 Rx0Device,
UInt16 Rx0SignalPath,
UInt16 Rx0AntennaPath,
UInt16 Rx1Device,
UInt16 Rx1SignalPath,
UInt16 Rx1AntennaPath,
UInt16 TxDevice,
UInt16 TxSignalPath,
UInt16 TxAntennaPath
)
{
byte[] errMsg = new byte[qseqMaxStringBufferSize];
return (fnQSEQ_SetRadioAllocation( Technology,
Rx0Device,
Rx0SignalPath,
Rx0AntennaPath,
Rx1Device,
Rx1SignalPath,
Rx1AntennaPath,
TxDevice,
TxSignalPath,
TxAntennaPath,
errMsg,
qseqMaxStringBufferSize) == 0);
}