change-取消扫码器部分日志

dev
liuwf 1 year ago
parent fb477f68d2
commit 24a339d6d2

@ -98,20 +98,20 @@ namespace Aucma.Core.Scanner
{
try
{
log.Info("获取扫码器设备列表,进入DeviceListAcq()方法");
// log.Info("获取扫码器设备列表,进入DeviceListAcq()方法");
System.GC.Collect();
m_stDeviceList.nDeviceNum = 0;
// 获取设备列表
int nRet = MvCodeReader.MV_CODEREADER_EnumDevices_NET(ref m_stDeviceList, MvCodeReader.MV_CODEREADER_GIGE_DEVICE);
if (0 != nRet)
{
log.Info("获取扫码器列表失败,扫码器错误码:" + nRet);
log.Error("获取扫码器列表失败,扫码器错误码:" + nRet);
return;
}
if (0 == m_stDeviceList.nDeviceNum)
{
log.Info("获取扫码器数量为0请检查扫码器连接:");
// log.Info("获取扫码器数量为0请检查扫码器连接:");
return;
}
@ -129,16 +129,16 @@ namespace Aucma.Core.Scanner
// 获取ip
string ip = ((stGigEDeviceInfo.nCurrentIp & 0xff000000) >> 24) + "." + ((stGigEDeviceInfo.nCurrentIp & 0x00ff0000) >> 16) + "." + ((stGigEDeviceInfo.nCurrentIp & 0x0000ff00) >> 8) + "." + (stGigEDeviceInfo.nCurrentIp & 0x000000ff);
// Console.WriteLine($"打印扫码设备信息,下标:{i}IP{ip}");
log.Info("扫码器设备[" + i + "],ip:" + ip);
// log.Info("扫码器设备[" + i + "],ip:" + ip);
// 创建第i个设备
stDevInfo = (MvCodeReader.MV_CODEREADER_DEVICE_INFO)Marshal.PtrToStructure(m_stDeviceList.pDeviceInfo[i], typeof(MvCodeReader.MV_CODEREADER_DEVICE_INFO));
nRet = m_cMyDevice.MV_CODEREADER_CreateHandle_NET(ref stDevInfo);//创建设备
if (MvCodeReader.MV_CODEREADER_OK != nRet)
{
log.Error("创建第" + i + "个扫码器设备失败,ip:" + ip);
// log.Error("创建第" + i + "个扫码器设备失败,ip:" + ip);
return;
}
log.Info("创建第" + i + "个扫码器设备成功,ip:" + ip);
// log.Info("创建第" + i + "个扫码器设备成功,ip:" + ip);
// 打开设备
nRet = m_cMyDevice.MV_CODEREADER_OpenDevice_NET();
if (MvCodeReader.MV_CODEREADER_OK != nRet)

Loading…
Cancel
Save