diff --git a/app/HGProductionTool/ProductionTool_zh_CN.qm b/app/HGProductionTool/ProductionTool_zh_CN.qm
index 97e7183..1526d69 100644
Binary files a/app/HGProductionTool/ProductionTool_zh_CN.qm and b/app/HGProductionTool/ProductionTool_zh_CN.qm differ
diff --git a/app/HGProductionTool/ProductionTool_zh_CN.ts b/app/HGProductionTool/ProductionTool_zh_CN.ts
index 91a953d..034d9ca 100644
--- a/app/HGProductionTool/ProductionTool_zh_CN.ts
+++ b/app/HGProductionTool/ProductionTool_zh_CN.ts
@@ -130,36 +130,35 @@
取消
-
-
-
-
-
+
+
+
+
提示
-
+
速度模式
-
+
失败!
-
+
成功!
-
+
休眠时间
-
+
Vid和Pid
@@ -172,120 +171,121 @@
检测到配置%1不一致,已重新配置,请再次检查
-
+
配置一致!
-
+
设备已丢失
-
+
序列号为空
-
+
序列号不合法
-
+
该设备正在进行测试
-
+
设置序列号失败
-
+
设备名: %1
-
+
Target Configration:
目标配置:
-
-
-
-
+
+
+
+
Speep mode: %1PPM
速度模式: %1PPM
-
+
Pass
-
-
-
+
+
+
设置
-
-
-
-
+
+
+
+
Sleep time: %1minute
休眠时间: %1分钟
-
-
-
-
+
+
+
+
Vid: %1 Pid: %2
Vid: %1 Pid: %2
-
+
当前设备配置:
-
+
Fail
-
-
-
+
+
+
设置序列号: %1
-
+
+
检测到当前设备的vid-pid和设备对象不一致.
-
+
+
请重启设备刷新.
-
- 是否立即重启设备?
+ 是否立即重启设备?
@@ -300,23 +300,23 @@
测试结果:成功!
-
-
+
+
检测到配置 %1不一致,请重新配置后再次检查
-
+
检测到配置 %1不一致,请重启后再次检查
-
+
将目标配置设置到设备
-
+
测试内容:
@@ -325,21 +325,21 @@
成功,请检查配置
-
-
-
-
+
+
+
+
休眠时间: 不休眠
-
-
+
+
测试员: %1, 测试项: %2
-
+
设置序列号成功
@@ -1271,12 +1271,12 @@
设备未连接
-
+
设备类型:
-
+
序列号:
@@ -1293,7 +1293,7 @@
休眠时间:
-
+
加载上一次上传的图片
@@ -1302,14 +1302,14 @@
设备已断开
-
+
提示
-
-
-
+
+
+
畸变修正值:
@@ -1322,68 +1322,68 @@
取消
-
+
目标配置: 速度模式:
-
+
休眠时间:
-
+
,但是校正有异常
-
+
请验证设备配置:
-
+
vid:%1
-
+
pid:%1
-
+
休眠时间:%1分钟
-
+
休眠时间:%1
-
-
+
+
不休眠
-
+
速度模式:%1PPM
-
+
设备型号:%1
@@ -1398,46 +1398,65 @@
设备序列号: %1, 测试项: %2, 测试结果: 通过!
-
-
+
+
设备历史扫描张数:
-
-
-
-
+
+
+
+
提示
-
+
+
+ 请验证设备内存和硬盘容量大小:
+
+
+
+
+ 内存大小:%1
+
+
+
+
+
+ 硬盘总容量大小:%1
+
+
+
+
测试员: %1, 测试项: %2, 测试结果: 不通过! 原因: %3
-
+
测试员: %1, 测试项: %2, 测试结果: 通过!
-
+
无纸
-
+
设备处于休眠模式
-
+
设备处于计数模式
-
+
其他错误
@@ -1446,39 +1465,39 @@
设备序列号:%1
-
+
序号
-
+
测试项
-
+
测试状态
-
+
未测试
-
-
+
+
不通过
-
+
不支持
-
-
+
+
通过
@@ -1504,31 +1523,31 @@
Pid:
-
-
+
+
设备滚轴张数:
-
-
+
+
标准圆:宽 * 高:
-
+
固件号:
-
+
设备序列号:%1
-
+
device firmware number:%1
@@ -1536,17 +1555,17 @@
-
+
分钟
-
+
VID:
-
+
PID:
@@ -1767,19 +1786,19 @@
QObject
-
+
success
成功:
-
-
+
+
失败:
-
+
没有找到该测试项
diff --git a/app/HGProductionTool/form_maininterface.cpp b/app/HGProductionTool/form_maininterface.cpp
index a25aae0..a7894ce 100644
--- a/app/HGProductionTool/form_maininterface.cpp
+++ b/app/HGProductionTool/form_maininterface.cpp
@@ -59,6 +59,7 @@ Form_mainInterface::Form_mainInterface(class MainWindow *mainwnd, Dialog_logIn::
connect(this, SIGNAL(testCorrectInfo(QString)), this, SLOT(on_testCorrectInfo(QString)), Qt::QueuedConnection);
connect(this, SIGNAL(testGetDevCfgInfo(int,int,int,int,QString,QString,QString)), this, SLOT(on_testGetDevCfgInfo(int,int,int,int,QString,QString,QString)), Qt::QueuedConnection);
connect(this, SIGNAL(testOpenCacheFile(QString)), this, SLOT(on_testOpenCacheFile(QString)), Qt::QueuedConnection);
+ connect(this, SIGNAL(testGetDevCpuDisk(QString,QString)), this, SLOT(on_testGetDevCpuDisk(QString,QString)), Qt::QueuedConnection);
if (m_handle)
{
@@ -276,6 +277,14 @@ void Form_mainInterface::on_testGetDevCfgInfo(int vid, int pid, int sleepTime, i
m_textTips->setViewContent(str);
}
+void Form_mainInterface::on_testGetDevCpuDisk(QString cpu, QString disk)
+{
+ QString str = (tr("please verify the size of the device's cpu and disk:") + "\n\t");
+ str.append(tr("Cpu size:%1\n\t").arg(cpu));
+ str.append(tr("Disk size:%1\n\t").arg(disk));
+ m_textTips->setViewContent(str);
+}
+
void Form_mainInterface::on_testOpenCacheFile(QString name)
{
if (name == HGPDTTOOLDB_NAME_IMAGE_GRAY_QUALITY && m_curDpi == 600)
diff --git a/app/HGProductionTool/form_maininterface.h b/app/HGProductionTool/form_maininterface.h
index d5f8947..acf9d62 100644
--- a/app/HGProductionTool/form_maininterface.h
+++ b/app/HGProductionTool/form_maininterface.h
@@ -41,6 +41,7 @@ signals:
void testDistortion(SANE_DISTORTION_VAL data);
void testCorrectInfo(QString info);
void testGetDevCfgInfo(int vid, int pid, int sleepTime, int speedMode, QString devSn, QString devFw, QString devModel);
+ void testGetDevCpuDisk(QString cpu, QString disk);
void testOpenCacheFile(QString name);
private slots:
@@ -49,6 +50,7 @@ private slots:
void on_testDistortion(SANE_DISTORTION_VAL data);
void on_testCorrectInfo(QString info);
void on_testGetDevCfgInfo(int vid, int pid, int sleepTime, int speedMode, QString devSn, QString devFw, QString devModel);
+ void on_testGetDevCpuDisk(QString cpu, QString disk);
void on_testOpenCacheFile(QString name);
void on_viewerDblClick();
diff --git a/app/HGProductionTool/hgscanner.cpp b/app/HGProductionTool/hgscanner.cpp
index 5e9f63e..ba94e53 100644
--- a/app/HGProductionTool/hgscanner.cpp
+++ b/app/HGProductionTool/hgscanner.cpp
@@ -17,6 +17,8 @@ hgscanner::hgscanner(Form_mainInterface *form, Form_BurnMode *burnMode, Dialog_I
, m_devSn("")
, m_devFw("")
, m_devModel("")
+ , m_cpu("")
+ , m_disk("")
{
cb_ = nullptr;
}
@@ -71,6 +73,15 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
m_devModel = QString::fromStdWString((const wchar_t*)data);
}
+ if(ev == TEST_EVEB_GET_DEVICE_DEVS_CPU)
+ {
+ m_cpu = QString::fromStdWString((const wchar_t*)data);
+ }
+ else if (ev == TEST_EVEB_GET_DEVICE_DEVS_DISK)
+ {
+ m_disk = QString::fromStdWString((const wchar_t*)data);
+ }
+
if (ev == TEST_EVENT_TIPS)
{
@@ -124,6 +135,14 @@ void hgscanner::test_callback(const wchar_t* name, test_event ev, void* data, si
}
}
+ if (wcscmp(name, HGPDTTOOLDB_NAME_GET_DEVICE_CPU_DISK) == 0)
+ {
+ if (m_interface != nullptr)
+ {
+ emit m_interface->testGetDevCpuDisk(m_cpu, m_disk);
+ }
+ }
+
if (data != nullptr)
{
if (flag)
diff --git a/app/HGProductionTool/hgscanner.h b/app/HGProductionTool/hgscanner.h
index f719055..0d51cee 100644
--- a/app/HGProductionTool/hgscanner.h
+++ b/app/HGProductionTool/hgscanner.h
@@ -47,5 +47,7 @@ private:
QString m_devSn;
QString m_devFw;
QString m_devModel;
+ QString m_cpu;
+ QString m_disk;
};
diff --git a/app/HGProductionTool/ui_helper.h b/app/HGProductionTool/ui_helper.h
index 229f343..a893a86 100644
--- a/app/HGProductionTool/ui_helper.h
+++ b/app/HGProductionTool/ui_helper.h
@@ -99,7 +99,9 @@ public:
TEST_EVEB_GET_DEVICE_CONFIG_SLEEPTIME, //get sleeptime;data is (int*) ;flag is (bool)result,true - get pass
TEST_EVEB_GET_DEVICE_CONFIG_SN, //get sn ;data is (wchar*) ;flag is (bool)result,true - get pass
TEST_EVEB_GET_DEVICE_CONFIG_FW, //get fw ;data is (wchar*) ;flag is (bool)result,true - get pass
- TEST_EVEB_GET_DEVICE_CONFIG_DEVS_MODEL, //get devs_model ;data is (wchar*) ;flag is (bool)result,true - get pass
+ TEST_EVEB_GET_DEVICE_CONFIG_DEVS_MODEL, //get devs_model ;data is (wchar*) ;flag is (bool)result,true - get pass
+ TEST_EVEB_GET_DEVICE_DEVS_CPU, //get dev cpu
+ TEST_EVEB_GET_DEVICE_DEVS_DISK, //get dev disk
};
virtual void test_callback(const wchar_t* name/*test name*/, test_event ev, void* data, size_t flag)=0 ;
diff --git a/code/base/test_base.cpp b/code/base/test_base.cpp
index 305edf9..59ad260 100644
--- a/code/base/test_base.cpp
+++ b/code/base/test_base.cpp
@@ -45,7 +45,8 @@ static struct Test_Map
{HGPDTTOOLDB_NAME_PAPER_SEPARATION_STRENGTH ,HGPDTTOOLDB_TITLE_PAPER_SEPARATION_STRENGTH},
{HGPDTTOOLDB_NAME_CONFIGURE_SPEED_MODE ,HGPDTTOOLDB_TITLE_CONFIGURE_SPEED_MODE},
{HGPDTTOOLDB_NAME_DORMANCY ,HGPDTTOOLDB_TITLE_DORMANCY},
- {HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG ,HGPDTTOOLDB_TITLE_GET_DEVICE_CONFIG}
+ {HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG ,HGPDTTOOLDB_TITLE_GET_DEVICE_CONFIG},
+ {HGPDTTOOLDB_NAME_GET_DEVICE_CPU_DISK ,HGPDTTOOLDB_TITLE_GET_DEVICE_CPU_DISK}
};
static std::string StringToUtf(std::string strValue)
@@ -583,6 +584,7 @@ public:
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_RGB_300DPI] = &test::test_pressuer_test_rgb_300dpi;
test_map_[HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI] = &test::test_pressuer_test_gray_300dpi;
test_map_[HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG] = &test::test_get_device_config;
+ test_map_[HGPDTTOOLDB_NAME_GET_DEVICE_CPU_DISK] = &test::test_get_device_cpu_disk;
}
int set_test(const wchar_t* name,const wchar_t* oper)
{
@@ -1448,6 +1450,47 @@ public:
helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)(L"配置获取完成"), true);
return ret;
}
+ /*获取设备内存和硬盘容量大小*/
+ int test_get_device_cpu_disk(void* data)
+ {
+ std::string cpu;
+ unsigned len = 0;
+ std::wstring wstr;
+ size_t l = 0;
+ int ret = helper_->io_control(IO_CTRL_CODE_GET_DEVS_CPU, &cpu[0], &len);
+ ret = str_to_wchar(cpu.c_str(), (wchar_t*)wstr.c_str(), &l);
+ if (ret == ERROR_INSUFFICIENT_BUFFER)
+ {
+ wstr.resize(l);
+ ret = str_to_wchar(cpu.c_str(), (wchar_t*)wstr.c_str(), &l);
+ }
+ if (wstr.empty())
+ {
+ helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_CPU, (void*)L",获取失败,设备不支持", false);
+ return ret;
+ }
+ helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_CPU, (void*)wstr.c_str(), true);
+
+ std::string disk;
+ unsigned len2 = 0;
+ ret = helper_->io_control(IO_CTRL_CODE_GET_DEVS_DISK, &disk[0], &len2);
+ ret = str_to_wchar(disk.c_str(), (wchar_t*)wstr.c_str(), &l);
+ if (ret == ERROR_INSUFFICIENT_BUFFER)
+ {
+ wstr.resize(l);
+ ret = str_to_wchar(disk.c_str(), (wchar_t*)wstr.c_str(), &l);
+ }
+ if (wstr.empty())
+ {
+ helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_DISK, (void*)L",获取失败,设备不支持", false);
+ return ret;
+ }
+ helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVEB_GET_DEVICE_DEVS_DISK, (void*)wstr.c_str(), true);
+
+ helper_->test_callback(set_test_name_.c_str(), ui_helper::TEST_EVENT_RESULT, (void*)(L"获取完成"), true);
+
+ return ret;
+ }
/*设置设备型号*/
int test_set_devs_model(void* data)
{
diff --git a/code/base/test_base.h b/code/base/test_base.h
index d5ebac3..f8955cd 100644
--- a/code/base/test_base.h
+++ b/code/base/test_base.h
@@ -86,6 +86,8 @@
#define HGPDTTOOLDB_TITLE_PRESSUER_TEST_GRAY_300DPI L"压力测试灰色_300dpi"
/*获取设备配置*/
#define HGPDTTOOLDB_TITLE_GET_DEVICE_CONFIG L"获取设备配置"
+/*获取设备内存和硬盘容量大小*/
+#define HGPDTTOOLDB_TITLE_GET_DEVICE_CPU_DISK L"获取设备内存和硬盘容量大小"
//////////////////////////////////////NAME//////////////////////////////////////
#define WRITE_CFG_NAME L"write-cfg"
/* 设置json序列号 */
@@ -178,6 +180,8 @@
#define HGPDTTOOLDB_NAME_PRESSUER_TEST_GRAY_300DPI L"PRESSUER_TEST_GRAY_300DPI"
/*获取设备配置*/
#define HGPDTTOOLDB_NAME_GET_DEVICE_CONFIG L"GET_DEVICE_CONFIG"
+/*获取设备内存和硬盘容量大小*/
+#define HGPDTTOOLDB_NAME_GET_DEVICE_CPU_DISK L"GET_DEVICE_CPU_DISK"
#define TEST_DLL
#ifdef TEST_DLL