48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
#region 程序集 KeysightDMM3458A.Interop, Version=1.0.8622.37453, Culture=neutral, PublicKeyToken=null
|
|
// C:\Users\testrong\Desktop\EXT_CAL\SW1.2_55_calibration_RZ_0810\selfCalibration\Testrong.User.Program\Debug\KeysightDMM3458A.Interop.dll
|
|
// Decompiled with ICSharpCode.Decompiler 7.1.0.6543
|
|
#endregion
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
using ExternalCalibration;
|
|
using ExternalCalibration.Bussines;
|
|
using Testrong.Core.Communicate.Tftp;
|
|
|
|
namespace Testrong.User.Program
|
|
{
|
|
public enum ReadType
|
|
{
|
|
InitValue
|
|
}
|
|
public class ReadTftp
|
|
{
|
|
|
|
public bool DownloadFile(string ip, string downloadpath, ReadType fileType)
|
|
{
|
|
string text = "";
|
|
if (fileType == ReadType.InitValue)
|
|
{
|
|
text = "InitValue";
|
|
}
|
|
TftpClientChannel val = new TftpClientChannel(ip);
|
|
val.Download(text, downloadpath, (TftpTransferMode)0, default(CancellationToken));
|
|
return true;
|
|
}
|
|
|
|
public string GetDnaNumber(List<byte> data)
|
|
{
|
|
if (data == null || data.Count == 0)
|
|
{
|
|
return "";
|
|
}
|
|
|
|
data.Reverse();
|
|
return BitConverter.ToUInt64(data.ToArray(), 0).ToString();
|
|
}
|
|
}
|
|
}
|