Browse Source

#IQRV #comment [DeviceControl] 更改参数名称

gifur 4 years ago
parent
commit
3168a7b36c

+ 2 - 2
Module/mod_DeviceControl/DeviceControl.xml

@@ -147,7 +147,7 @@
       </req>
       <res>
         <param name="result" type="int" />
-        <param name="message" type="string" />
+        <param name="additionalMsg" type="string" />
       </res>
     </twoway>
     <twoway name="DeployTerminal" overlap="true">
@@ -165,7 +165,7 @@
       </req>
       <res>
         <param name="result" type="int" />
-        <param name="message" type="string" />
+        <param name="additionalMsg" type="string" />
         <param name="nextStep" type="int" />
         <param name="param1" type="uint"/>
         <param name="param2" type="string" />

+ 4 - 4
Module/mod_DeviceControl/DeviceControl_def_g.h

@@ -280,11 +280,11 @@ struct DeviceControlService_TestConnectivity_Req
 struct DeviceControlService_TestConnectivity_Ans
 {
 	int result;
-	CSimpleStringA message;
+	CSimpleStringA additionalMsg;
 
 	void Serialize(SpBuffer &Buf)
 	{
-		auto & buf = Buf & result & message;
+		auto & buf = Buf & result & additionalMsg;
 	}
 
 };
@@ -312,7 +312,7 @@ struct DeviceControlService_DeployTerminal_Req
 struct DeviceControlService_DeployTerminal_Ans
 {
 	int result;
-	CSimpleStringA message;
+	CSimpleStringA additionalMsg;
 	int nextStep;
 	unsigned int param1;
 	CSimpleStringA param2;
@@ -321,7 +321,7 @@ struct DeviceControlService_DeployTerminal_Ans
 
 	void Serialize(SpBuffer &Buf)
 	{
-		auto & buf = Buf & result & message & nextStep & param1 & param2 & array1 & array2;
+		auto & buf = Buf & result & additionalMsg & nextStep & param1 & param2 & array1 & array2;
 	}
 
 };

+ 14 - 14
Module/mod_DeviceControl/mod_DeviceControl.cpp

@@ -159,10 +159,10 @@ void CDeviceControlEntity::TestConnectivity(SpReqAnsContext<DeviceControlService
             const int res = Ping(std::string(ctx->Req.ip));
             if (res == 0) {
                 ctx->Ans.result = 0;
-                ctx->Ans.message.Clear();
+                ctx->Ans.additionalMsg.Clear();
             } else {
                 ctx->Ans.result = -1;
-                ctx->Ans.message = CSimpleStringA::Format("Ping %s failed: %d", ctx->Req.ip.GetData(), res);
+                ctx->Ans.additionalMsg = CSimpleStringA::Format("Ping %s failed: %d", ctx->Req.ip.GetData(), res);
             }
             result = Error_Succeed;
         }
@@ -197,7 +197,7 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
         const CSimpleStringA& serverIP = ctx->Req.param3;
         Dbg("server ip: %s, terminal no: %s, vendor: %s", serverIP.GetData(), (LPCTSTR)terminalNo, (LPCTSTR)vendorType);
 
-        /** 1050 是固定的服务端实体端口 [Gifur@20211013]*/
+        /** 1050 鏄�浐瀹氱殑鏈嶅姟绔�疄浣撶�鍙� [Gifur@20211013]*/
         pCnn->ConnectServer(serverIP.GetData(), 1050);
         Dbg("Connect finished!");
         if (pCnn->IsConnectionOK()) {
@@ -258,7 +258,7 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
                                 char ebuff[256];
                                 regerror(ret, &reg, ebuff, 256);
                                 Dbg("regex failed: %s", ebuff);
-                                tmpMsg = CSimpleStringA::Format("内部错误:REGEX %s", ebuff);
+                                tmpMsg = CSimpleStringA::Format("鍐呴儴閿欒�锛歊EGEX %s", ebuff);
                                 break;
                             } 
                             Dbg("pattern: %s", pattern.GetData());
@@ -291,7 +291,7 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
                                 pConfig->WriteConfigValueInt("TerminalDeploy", "CurrState", DEPLOYSTATE_NOTINIT);
 
                             } else {
-                                tmpMsg = "找不到匹配的备选文件,请确认安装包完整性并尝试重新安装";
+                                tmpMsg = "鎵句笉鍒板尮閰嶇殑澶囬€夋枃浠讹紝璇风‘璁ゅ畨瑁呭寘瀹屾暣鎬у苟灏濊瘯閲嶆柊瀹夎�";
                                 tmpResult = 1;
                             }
                         }
@@ -302,7 +302,7 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
                 ctx->Ans.param2 = serverIP;
 
                 ctx->Ans.result = tmpResult;
-                ctx->Ans.message = tmpMsg;
+                ctx->Ans.additionalMsg = tmpMsg;
             }
             
         } else {
@@ -331,7 +331,7 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
         auto pCenterSettingClient = new CenterSettingService_ClientBase(this);
         ec = pCenterSettingClient->Connect();
         if (ec != Error_Succeed) {
-            tmpMsg = CSimpleStringA::Format("连接集中配置模块失败: %s", SpStrError(ec));
+            tmpMsg = CSimpleStringA::Format("杩炴帴闆嗕腑閰嶇疆妯″潡澶辫触: %s", SpStrError(ec));
             pCenterSettingClient->SafeDelete();
             Dbg("connect to centersetting failed: %s", SpStrError(ec));
             tmpResult = ec;
@@ -340,11 +340,11 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
             req.strAddr = serverIP;
             req.nPort = nPort;
             CenterSettingService_Download_Ans ans = {};
-            /**TODO(Gifur@10/14/2021): 未知行内还是行外的情况 */
+            /**TODO(Gifur@10/14/2021): 鏈�煡琛屽唴杩樻槸琛屽�鐨勬儏鍐� */
             Dbg("to download...");
             ec = pCenterSettingClient->Download(req, ans, 10000);
             if (ec != Error_Succeed) {
-                tmpMsg = CSimpleStringA::Format("集中配置模块调用失败: %s", SpStrError(ec));
+                tmpMsg = CSimpleStringA::Format("闆嗕腑閰嶇疆妯″潡璋冪敤澶辫触: %s", SpStrError(ec));
                 tmpResult = ec;
                 Dbg("to download failed: %s", SpStrError(ec));
             } else {
@@ -357,7 +357,7 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
         ctx->Ans.param2 = serverIP;
 
         ctx->Ans.result = tmpResult;
-        ctx->Ans.message = tmpMsg;
+        ctx->Ans.additionalMsg = tmpMsg;
     }
         break;
     case DeployStep_AccessAuthorize:
@@ -378,7 +378,7 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
         auto pClient = new InitializerService_ClientBase(this);
         ec = pClient->Connect();
         if (ec != Error_Succeed) {
-            tmpMsg = CSimpleStringA::Format("连接初始化模块失败: %s", SpStrError(ec));
+            tmpMsg = CSimpleStringA::Format("杩炴帴鍒濆�鍖栨ā鍧楀け璐�: %s", SpStrError(ec));
             pClient->SafeDelete();
             Dbg("connect to initializer module failed: %s", SpStrError(ec));
             tmpResult = ec;
@@ -393,14 +393,14 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
             Dbg("to initializer...");
             ec = pClient->InitializeNew(req, ans, 30000);
             if (ec != Error_Succeed) {
-                tmpMsg = CSimpleStringA::Format("初始化调用失败: %s", SpStrError(ec));
+                tmpMsg = CSimpleStringA::Format("鍒濆�鍖栬皟鐢ㄥけ璐�: %s", SpStrError(ec));
                 tmpResult = ec;
                 Dbg("to initialize failed: %s", SpStrError(ec));
             } else {
 
                 const int errUserCode = (int)(ans.Errcode);
                 if (errUserCode != 0) {
-                    tmpMsg = CSimpleStringA::Format("初始化失败:[%d] %s", errUserCode, ans.ErrMsg.GetData());
+                    tmpMsg = CSimpleStringA::Format("鍒濆�鍖栧け璐ワ細[%d] %s", errUserCode, ans.ErrMsg.GetData());
                     tmpResult = errUserCode;
                     Dbg("initialize failed: %s", (LPCTSTR)tmpMsg);
                 } else {
@@ -415,7 +415,7 @@ void CDeviceControlEntity::DeployTerminal(SpReqAnsContext<DeviceControlService_D
         ctx->Ans.param2 = serverIP;
 
         ctx->Ans.result = tmpResult;
-        ctx->Ans.message = tmpMsg;
+        ctx->Ans.additionalMsg = tmpMsg;
     }
         break;
     case DeployStep_MediaConfig:

+ 4 - 4
addin/res/ManagerDesktop/js/guide.js

@@ -53,8 +53,8 @@ function IPConnectableTest(ip)
                 console.log(ip + ' 可正常连通');
                 showSuccTips('可正常连通');
             } else {
-                console.log(result.message);
-                showErrTips(result.message);
+                console.log(result.additionalMsg);
+                showErrTips(result.additionalMsg);
             }
         } else {
             let tips = ip + ' 测试连接失败:' + ErrorCodeStringfy(ret.errorCode);
@@ -93,7 +93,7 @@ function DeployTerminalWithIPAndPort(server_ip, port, access_flag)
             if(result.result == 0) {
                 utilStartAlertDialog("操作成功");
             } else {
-                utilStartAlertDialog("操作失败:[" + result.result + "] " + result.message);
+                utilStartAlertDialog("操作失败:[" + result.result + "] " + result.additionalMsg);
             }
         } else {
             RVC.DeviceControlEntityCtrl.commErrorCallback(ret);
@@ -124,7 +124,7 @@ function InitTemrinalAbout(server_ip, new_terminalno, vendorName)
             if(result.result == 0) {
                 utilStartAlertDialog("操作成功");
             } else {
-                utilStartAlertDialog("操作失败:[" + result.result + "] " + result.message);
+                utilStartAlertDialog("操作失败:[" + result.result + "] " + result.additionalMsg);
             }
         } else {
             RVC.DeviceControlEntityCtrl.commErrorCallback(ret);