dev #65

Merged
wangzhongjie merged 71 commits from dev into main 2025-06-17 17:32:26 +08:00
Showing only changes of commit 30aee68389 - Show all commits

View File

@ -88,7 +88,11 @@ export default class UdpClientByCenter {
// time:dateFormat(new Date()),
// PLC:`${TAG} getUDPudp rebind success`,
// })
this.udp && this.udp.on('message', this.message_1Fn);
const terType = this.retClass.terType
//TODO 临时处理过滤掉中心udp
if(localIpPort != '8800' && terType == 2){
this.udp && this.udp.on('message', this.message_1Fn);
}
}).catch(err => {
//globalThis.closeHeartSocket=true
this.isWorking = false
@ -105,12 +109,17 @@ export default class UdpClientByCenter {
address: this.localIp, port: parseInt(this.localIpPort), family: 1
});
promise.then(() => {
const localIpPort = this.localIpPort
this.isWorking = true
// this.writeLog({
// time:dateFormat(new Date()),
// PLC:`${TAG} getUDPudp bind success`,
// })
this.udp && this.udp.on('message', this.message_1Fn);
const terType = this.retClass.terType
//TODO 临时处理过滤掉中心udp
if(localIpPort != '8800' && terType == 2){
this.udp && this.udp.on('message', this.message_1Fn);
}
}).catch(err => {
this.isWorking = false
console.info('surenjun err=>', JSON.stringify(err))