tcp carno上传
This commit is contained in:
		
							parent
							
								
									91491432d8
								
							
						
					
					
						commit
						3fade2df24
					
				| @ -19,7 +19,7 @@ export async function getTCP() { | ||||
|         setTimeout(async () => { | ||||
|           await globalThis.TcpClient.rebindTcp(result.tcplocalIp, result.tcplocalIpPort, result.tcpOppositeIp, result.tcpOppositePort) | ||||
|           await globalThis.TcpClient.connectTcp() | ||||
|           await globalThis.TcpClient.sendMsg('1002') //1002
 | ||||
|           await globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
 | ||||
|           globalThis.TcpClient.onError((val) => { | ||||
|             setTimeout(() => { | ||||
|               getTCP() | ||||
| @ -27,7 +27,7 @@ export async function getTCP() { | ||||
|           }) | ||||
|           await globalThis.TcpClient.onMessage((val) => { | ||||
|             setTimeout(() => { | ||||
|               globalThis.TcpClient.sendMsg('1002') //1002
 | ||||
|               globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
 | ||||
|               if (val) { | ||||
|                 // const msg=val.substring(5,val.length-1)
 | ||||
|                 console.log('socketTag[PLC.UdpClient] status:', globalThis.udpClient.getStatus()) | ||||
| @ -45,7 +45,7 @@ export async function getTCP() { | ||||
|       globalThis.TcpClient = tcpClient | ||||
|       await globalThis.TcpClient.bindTcp() | ||||
|       await globalThis.TcpClient.connectTcp() | ||||
|       await globalThis.TcpClient.sendMsg('1002') //1002
 | ||||
|       await globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
 | ||||
|       globalThis.TcpClient.onError((val) => { | ||||
|         setTimeout(() => { | ||||
|           getTCP() | ||||
| @ -54,7 +54,7 @@ export async function getTCP() { | ||||
|       await globalThis.TcpClient.onMessage((val) => { | ||||
|         hilog.info(0x0000, 'testTag', "valvalval2" + JSON.stringify(val)); | ||||
|         setTimeout(() => { | ||||
|           globalThis.TcpClient.sendMsg('1002') //1002
 | ||||
|           globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
 | ||||
|           if (val && globalThis.udpClient?.sendMsg) { | ||||
|             globalThis.udpClient?.sendMsg(val) | ||||
|           } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user