Explorar o código

为PSG-HR增加串口列表
取消发生器模型中Prepareacq的纯虚函数!

lwk hai 20 horas
pai
achega
b642889c73

+ 1 - 1
Generator/CCOS.Dev.Generator.Mould/CCOS.Dev.Generator.Mould.hpp

@@ -111,7 +111,7 @@ namespace CCOS::Dev::Detail::Generator
 
 	protected:
 		//É豸·½·¨
-		virtual RET_STATUS PrepareAcquisition() = 0;
+		virtual RET_STATUS PrepareAcquisition() { return RET_STATUS::RET_SUCCEED; };
 		virtual RET_STATUS Reset() = 0;
 		virtual RET_STATUS SetWS(const std::string value) = 0;
 		virtual RET_STATUS SetGenSynState(int value) = 0;

+ 1 - 1
Generator/ECOM/CCOS.Dev.Generator.Demo/CCOS.Dev.Generator.Demo.cpp

@@ -365,7 +365,7 @@ RET_STATUS nsGEN::DemoDevice::SetExpDisable()
 	FDEBUG("Enter SetExpDisable");
 	return RET_STATUS::RET_SUCCEED;
 }
-RET_STATUS CCOS::Dev::Detail::Generator::DemoDevice::PrepareAcquisition()
+RET_STATUS nsGEN::DemoDevice::PrepareAcquisition()
 {
 	m_DoseUnit.m_GenState->Update(nsGEN::AttrKey::GENERATOR_STATUS_STANDBY);
 	FireNotify(AttrKey::GENSTATE, m_DoseUnit.m_GenState->JSGet());

+ 5 - 5
Generator/PSG/CCOS.Dev.Generator.PSG_HR/CCOS.Dev.Generator.PSG_HR.cpp

@@ -2423,15 +2423,15 @@ nsGEN::PSGHRDriver::~PSGHRDriver()
 
 void nsGEN::PSGHRDriver::Prepare()
 {
-	// ��ʼ����־ϵͳ
+	// 初始化日志系统
 	std::string strLogPath = GetProcessDirectory() + R"(/Conf/log_config.xml)";
 	std::string LogHost = "DevPSGHR";
 	std::string moduleName = "DevPSGHR";
 	bool ret = initLogModule(
-		LogHost,       // ��������������־·���е�{host}ռλ����
-		moduleName,        // Ψһģ����
-		strLogPath,  // ��������
-		true           // �Ƿ����������̨����ѡ��
+		LogHost,       // 主机名(用于日志路径中的{host}占位符)
+		moduleName,        // 唯一模块名
+		strLogPath,  // 配置文件路径
+		true           // 是否输出到控制台(可选)
 	);
 	if (!ret) {
 		std::cerr << "Log init failed!" << std::endl;

+ 1 - 1
Generator/PSG/CCOS.Dev.Generator.PSG_HR/CCOS.Dev.Generator.PSG_HR.h

@@ -288,7 +288,7 @@ namespace CCOS::Dev::Detail::Generator
 		const std::chrono::seconds RETRY_INTERVAL{ 5 };
 
 		// 串口相关(固定支持的端口,可从配置扩展)
-		std::vector<std::string> m_serialPorts{ "/dev/ttyUSB0", "/dev/ttyUSB1", "/dev/ttyUSB3", "/dev/ttyUSB4" };
+		std::vector<std::string> m_serialPorts{ "/dev/ttyUSB0", "/dev/ttyUSB1", "/dev/ttyUSB2", "/dev/ttyUSB3", "/dev/ttyUSB4" };
 		int m_currentSerialPortIndex{ 0 };  // 当前尝试的串口端口索引
 		ConnectionType m_currentConnType{ ConnectionType::Serial };