tcp send修改
This commit is contained in:
parent
922f1bc413
commit
f4815003b0
@ -27,13 +27,13 @@ export async function getTCP(flag=false) {
|
||||
// await globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
|
||||
console.log('ttttttt00')
|
||||
|
||||
clearInterval(globalThis.intervalSendmsg)
|
||||
globalThis.intervalSendmsg=setInterval(()=>{
|
||||
console.log('getCloseTcp',globalThis.carInfo.carNo)
|
||||
if(!globalThis.getCloseTcp){
|
||||
globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
|
||||
}
|
||||
},1000/3)
|
||||
// clearInterval(globalThis.intervalSendmsg)
|
||||
// globalThis.intervalSendmsg=setInterval(()=>{
|
||||
// console.log('getCloseTcp',globalThis.carInfo.carNo)
|
||||
// if(!globalThis.getCloseTcp){
|
||||
// globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
|
||||
// }
|
||||
// },1000/3)
|
||||
globalThis.TcpClient.onError((val) => {
|
||||
setTimeout(() => {
|
||||
getTCP()
|
||||
@ -62,13 +62,13 @@ export async function getTCP(flag=false) {
|
||||
await globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
|
||||
console.log('ttttttt12')
|
||||
|
||||
clearInterval(globalThis.intervalSendmsg)
|
||||
globalThis.intervalSendmsg=setInterval(()=>{
|
||||
// console.log('getCloseTcp',globalThis.getCloseTcp)
|
||||
if(!globalThis.getCloseTcp){
|
||||
globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
|
||||
}
|
||||
},1000/3)
|
||||
// clearInterval(globalThis.intervalSendmsg)
|
||||
// globalThis.intervalSendmsg=setInterval(()=>{
|
||||
// // console.log('getCloseTcp',globalThis.getCloseTcp)
|
||||
// if(!globalThis.getCloseTcp){
|
||||
// globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
|
||||
// }
|
||||
// },1000/3)
|
||||
globalThis.TcpClient.onError((val) => {
|
||||
setTimeout(() => {
|
||||
getTCP()
|
||||
|
||||
@ -337,6 +337,9 @@ export default class UdpClientByCenter {
|
||||
// PLC: JSON.stringify(newArr.toString()),
|
||||
// })
|
||||
if(strachArr[83]!='4'){
|
||||
if(!globalThis.getCloseTcp){
|
||||
globalThis.TcpClient.sendMsg(globalThis.carInfo.carNo) //1002
|
||||
}
|
||||
console.log('差分状态异常',strachArr[83],strachArr[92])
|
||||
this.writeLog({
|
||||
time:dateFormat(new Date()),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user