feat: 评判udp添加日志
This commit is contained in:
parent
3481502c58
commit
f5c701dcda
@ -94,7 +94,7 @@ export const getMessageHeartbeat = async (msg) => {
|
||||
//考试员号
|
||||
ascksyhArr.map(ksyh => string2Bytes(ksyh, 8)[0]),
|
||||
//科目类型(0:未考试 1:科目二 2:科目三) + 考试开始时间
|
||||
string2Bytes(`${0}${'00:00:00'}`, 4 * 8),
|
||||
string2Bytes(`${0}${'00:00:000'}`, 4 * 8),
|
||||
// 消息序号
|
||||
string2Bytes(serialIndex, 2 * 8),
|
||||
translateSignals,
|
||||
|
||||
@ -1219,7 +1219,12 @@ export default class Judge {
|
||||
return
|
||||
}
|
||||
const {zfxd,yfxd,shtd,ygd,jgd,skd,dh1,dh2,lhq,jsc,ssc,fsc,lb,mkg,aqd,ygq,cs,fdjzs,dw} = sensor
|
||||
const {jd,wd, hxj, fyj, hbg,sd} = gps
|
||||
const {jd,wd, hxj, fyj, hbg,sd} = gps;
|
||||
|
||||
//过滤错误数据
|
||||
if(jd == 0){
|
||||
return
|
||||
}
|
||||
const translateProject = getTranslateProject();
|
||||
const sbxh = getSbxh(xmdm, xmxh)
|
||||
const {carzt,dcjl,qjjl,dxjl,bxjl} = performInfo || {};
|
||||
@ -1298,9 +1303,8 @@ export default class Judge {
|
||||
tempArr = tempArr.concat(itemArr)
|
||||
})
|
||||
this.serialIndex += 1;
|
||||
fileLog.setFourAndOneLogData(`${startHourTime},${translateJd},${translateWd}`);
|
||||
fileLog.setFourAndOneLogData(`${lsh},${ksyh},${examType}${globalThis.startHourTime || startHourTime},`);
|
||||
fileLog.setFourAndOneLogDataBytes(tempArr.toString());
|
||||
|
||||
return Array2Byte(tempArr)
|
||||
}
|
||||
//获取场地序号
|
||||
@ -1587,7 +1591,7 @@ export default class Judge {
|
||||
const bytes = await this.getMessageHeartbeat();
|
||||
bytes && globalThis.judgeUdp.send(bytes)
|
||||
|
||||
}, 20)
|
||||
}, 200)
|
||||
|
||||
globalThis.judgeTimer = judgeTimer;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user