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