|
|
@@ -2873,7 +2873,7 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
|
|
|
CSimpleStringA& strAdapterFileName = ctx->Req.param3;
|
|
|
CAutoArray<CSimpleStringA> adapterInfo;
|
|
|
tmpResult = SplitAdapterFileName(strAdapterFileName, adapterInfo);
|
|
|
-
|
|
|
+ Dbg("%s, %s", strAdapterFileName.GetData(), SpStrError((ErrorCodeEnum)tmpResult));
|
|
|
if (tmpResult == 0) {
|
|
|
CSimpleStringA strDevice(adapterInfo[0]);
|
|
|
CSimpleStringA strDeviceSection("Device.");
|
|
|
@@ -2901,19 +2901,23 @@ void CHealthManagerEntity::DeployTerminal(SpReqAnsContext<HealthManagerService_D
|
|
|
tmpResult = inifile_write_int(strRootTmpFile, strDeviceSection, "Baudrate", baudrate);
|
|
|
}
|
|
|
} else { //更新到root.ini
|
|
|
- CSmartPointer<IConfigInfo> pConfig;
|
|
|
- GetFunction()->OpenConfig(Config_Root, pConfig);
|
|
|
+ CSmartPointer<IConfigInfo> pRootConfig;
|
|
|
+ GetFunction()->OpenConfig(Config_Root, pRootConfig);
|
|
|
|
|
|
- tmpResult = pConfig->WriteConfigValue(strDeviceSection, "Vendor", strVendor);
|
|
|
+ tmpResult = pRootConfig->WriteConfigValue(strDeviceSection, "Vendor", strVendor);
|
|
|
+ Dbg("%s,%s,%s,%s,%s", strDeviceSection.GetData(), strVendor.GetData(), strVersion.GetData(), strBatch.GetData(), SpStrError((ErrorCodeEnum)tmpResult));
|
|
|
if (tmpResult == 0) {
|
|
|
- pConfig->WriteConfigValue(strDeviceSection, "Version", strVersion);
|
|
|
- pConfig->WriteConfigValueInt(strDeviceSection, "Port", port);
|
|
|
- pConfig->WriteConfigValueInt(strDeviceSection, "Baudrate", baudrate);
|
|
|
+ pRootConfig->WriteConfigValue(strDeviceSection, "Version", strVersion);
|
|
|
+ pRootConfig->WriteConfigValue(strDeviceSection, "Batch", strBatch);
|
|
|
+ pRootConfig->WriteConfigValueInt(strDeviceSection, "Port", port);
|
|
|
+ pRootConfig->WriteConfigValueInt(strDeviceSection, "Baudrate", baudrate);
|
|
|
} else {
|
|
|
tmpMsg = CSimpleStringA::Format("写入ROOT配置文件失败:%s", SpStrError((ErrorCodeEnum)tmpResult));
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ tmpMsg = CSimpleStringA::Format("适配器文件名称不符合规范:%s", strAdapterFileName.GetData());
|
|
|
+ }
|
|
|
}
|
|
|
else if ((ctx->Req.options & 0x4)) { //启动实体
|
|
|
CSimpleStringA& strEntityName = ctx->Req.param3;
|