Bläddra i källkod

#IQRV #comment File字段信息上送

80374374 10 månader sedan
förälder
incheckning
12c153e053
2 ändrade filer med 11 tillägg och 7 borttagningar
  1. 1 0
      Module/include/DevFSMCommBase.hpp
  2. 10 7
      Module/mod_gpio/mod_gpio.cpp

+ 1 - 0
Module/include/DevFSMCommBase.hpp

@@ -935,6 +935,7 @@ public:
 	{
 		CSimpleStringA entityName(this->GetEntityBase()->GetEntityName());
 		std::map<std::string, std::string> rootInfo;
+		rootInfo["File"] = m_adapterInfo.strPureAdapterName.GetData();
 		rootInfo["Vendor"] = m_adapterInfo.strVendor.GetData();
 		rootInfo["Version"] = m_adapterInfo.strVersion.GetData();
 		rootInfo["Batch"] = m_adapterInfo.strBatch.GetData();

+ 10 - 7
Module/mod_gpio/mod_gpio.cpp

@@ -269,15 +269,18 @@ void CGpioEntity::ToLogRootINIInfo()
     CSimpleStringA entityName(GetEntityName());
 	if (!entityName.IsNullOrEmpty()) {
 		CSimpleStringA sectionName = CSimpleStringA::Format("Device.%s", entityName.GetData());
-		CSimpleStringA csVendor(true), csVersion(true), csBatch(true), csPort(true), csBaudrate(true);
-		spConfigRoot->ReadConfigValue(sectionName, "Vendor", csVendor);
-		spConfigRoot->ReadConfigValue(sectionName, "Version", csVersion);
-		spConfigRoot->ReadConfigValue(sectionName, "Batch", csBatch);
-		spConfigRoot->ReadConfigValue(sectionName, "Port", csPort);
-		spConfigRoot->ReadConfigValue(sectionName, "Baudrate", csBaudrate);
-
+		CSimpleStringA csVendor(true), csVersion(true), csBatch(true), csPort(true), csBaudrate(true), csFileName(true);
+		spConfigRoot->ReadConfigValue(sectionName, "File", csFileName);
+		if (!csFileName.IsNullOrEmpty()) {
+			spConfigRoot->ReadConfigValue(sectionName, "Vendor", csVendor);
+			spConfigRoot->ReadConfigValue(sectionName, "Version", csVersion);
+			spConfigRoot->ReadConfigValue(sectionName, "Batch", csBatch);
+			spConfigRoot->ReadConfigValue(sectionName, "Port", csPort);
+			spConfigRoot->ReadConfigValue(sectionName, "Baudrate", csBaudrate);
+		}
 		std::map<std::string, std::string> rootInfo;
 		CSimpleStringA csCheckData(true), csKeySN(true);
+		rootInfo["File"] = csFileName.GetData();
 		rootInfo["Vendor"] = csVendor.GetData();
 		rootInfo["Version"] = csVersion.GetData();
 		rootInfo["Batch"] = csBatch.GetData();