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 @@ 取消 - - - - - + + + + tips 提示 - + Speed mode 速度模式 - + Failed! 失败! - + Succeed! 成功! - + Sleep time 休眠时间 - + Vid and Pid Vid和Pid @@ -172,120 +171,121 @@ 检测到配置%1不一致,已重新配置,请再次检查 - + Consistent configuration 配置一致! - + device is lost 设备已丢失 - + Serial num is empty 序列号为空 - + sn is illegal 序列号不合法 - + The device is testing 该设备正在进行测试 - + set sn failed 设置序列号失败 - + Device name: %1 设备名: %1 - + Target Configration: Target Configration: 目标配置: - - - - + + + + Speep mode: %1PPM Speep mode: %1PPM 速度模式: %1PPM - + Pass Pass - - - + + + Set 设置 - - - - + + + + Sleep time: %1minute Sleep time: %1minute 休眠时间: %1分钟 - - - - + + + + Vid: %1 Pid: %2 Vid: %1 Pid: %2 Vid: %1 Pid: %2 - + Current Configration of device: 当前设备配置: - + Fail Fail - - - + + + Set serial number: %1 设置序列号: %1 - + + Detected that the current device's vid-pid and device object are not consistent. 检测到当前设备的vid-pid和设备对象不一致. - + + Please reboot device to update. 请重启设备刷新. - Do you want to restart now? - 是否立即重启设备? + 是否立即重启设备? Detected that the current device's vid-pid and device object are not consistent. Do you want to restart now? @@ -300,23 +300,23 @@ 测试结果:成功! - - + + Inconsistent configuration %1detected, please reconfigure, and check again 检测到配置 %1不一致,请重新配置后再次检查 - + Inconsistent configuration %1detected, please reboot and reconfigure, and check again 检测到配置 %1不一致,请重启后再次检查 - + Set configuration to device 将目标配置设置到设备 - + Test content: 测试内容: @@ -325,21 +325,21 @@ 成功,请检查配置 - - - - + + + + Sleep time: Not sleeping 休眠时间: 不休眠 - - + + Tester: %1, Test item: %2 测试员: %1, 测试项: %2 - + set sn succeed 设置序列号成功 @@ -1271,12 +1271,12 @@ 设备未连接 - + Device type: 设备类型: - + SerialNum: 序列号: @@ -1293,7 +1293,7 @@ 休眠时间: - + load last image which uploaded last time 加载上一次上传的图片 @@ -1302,14 +1302,14 @@ 设备已断开 - + tips 提示 - - - + + + destortion value: 畸变修正值: @@ -1322,68 +1322,68 @@ 取消 - + speed mode: 目标配置: 速度模式: - + sleep time: 休眠时间: - + ,but correct information is abnormal ,但是校正有异常 - + please verify the configuration of the device: 请验证设备配置: - + vid:%1 vid:%1 - + pid:%1 pid:%1 - + sleep time:%1minute 休眠时间:%1分钟 - + sleep time:%1 休眠时间:%1 - - + + Not sleeping 不休眠 - + speed mode:%1PPM 速度模式:%1PPM - + device model:%1 设备型号:%1 @@ -1398,46 +1398,65 @@ 设备序列号: %1, 测试项: %2, 测试结果: 通过! - - + + device history scan count: 设备历史扫描张数: - - - - + + + + Prompt 提示 - + + please verify the size of the device's cpu and disk: + 请验证设备内存和硬盘容量大小: + + + + Cpu size:%1 + + 内存大小:%1 + + + + + Disk size:%1 + + 硬盘总容量大小:%1 + + + + Tester: %1, Test item: %2, Test result: Failed! Reason: %3 测试员: %1, 测试项: %2, 测试结果: 不通过! 原因: %3 - + Tester: %1, Test item: %2, Test result: Pass! 测试员: %1, 测试项: %2, 测试结果: 通过! - + No paper 无纸 - + Device is sleeping 设备处于休眠模式 - + Counting mode 设备处于计数模式 - + Other error 其他错误 @@ -1446,39 +1465,39 @@ 设备序列号:%1 - + ID 序号 - + Test items 测试项 - + status 测试状态 - + not test 未测试 - - + + not pass 不通过 - + not support 不支持 - - + + pass 通过 @@ -1504,31 +1523,31 @@ Pid: - - + + device roller count: 设备滚轴张数: - - + + image pixel: 标准圆:宽 * 高: - + FirmwareNum: 固件号: - + device serial number:%1 设备序列号:%1 - + device firmware number:%1 device firmware number:%1 @@ -1536,17 +1555,17 @@ - + minute 分钟 - + VID: VID: - + PID: PID: @@ -1767,19 +1786,19 @@ QObject - + success: success 成功: - - + + failed: 失败: - + Not find test item 没有找到该测试项 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