过程数据文件写入更改
This commit is contained in:
		
							parent
							
								
									f57a04521c
								
							
						
					
					
						commit
						5ae19b4f71
					
				| @ -564,7 +564,6 @@ export class BaseJudge { | ||||
|   //   } | ||||
|   //   return true | ||||
|   // } | ||||
| 
 | ||||
|   async judgeStart(callBack: Function, judgeUI: JudgePage, that: JudgeBusiness, beginExamInfo: JudgeBeginObj, initInfo: JudgeInitObj) { | ||||
|     const name = judgeUI.name | ||||
|     const kssycs = judgeUI.kssycs | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| import { | ||||
|   DrvexamType, | ||||
|   OnAllTasksCompletedCallback, | ||||
|   OnBatchProgressUpdateCallback, | ||||
|   ProcessDataEnumType, | ||||
| @ -91,13 +92,14 @@ export class ProcessDataTaskPool { | ||||
|       try { | ||||
|         console.log(QueueTag, `开始处理任务: ${JSON.stringify(taskData)}`); | ||||
| 
 | ||||
|         let drvexam: DrvexamType = JSON.parse(JSON.stringify(taskData.drvexam)) | ||||
|         drvexam.zp = "" | ||||
| 
 | ||||
|         const obj: WuxiExamType = { | ||||
|           xtlb: taskData.xtlb, | ||||
|           jkxlh: taskData.jkxlh, | ||||
|           jkid: taskData.jkid, | ||||
|           drvexam: { | ||||
|             zp: "", | ||||
|           }, | ||||
|           drvexam: drvexam, | ||||
|         }; | ||||
|         dConsole.writeProcessData(ProcessDataEnumType.WuxiExam, JSON.stringify(obj)); | ||||
| 
 | ||||
|  | ||||
| @ -94,9 +94,7 @@ class CenterUDPBusiness { | ||||
|       this.lsh = otherMessage.lsh || '0000000000000' | ||||
|       this.carInfo = carInfo | ||||
|       // TODO | ||||
|       // this.udp.create(config.udplocalIp!, '8800', carInfo.udpAddress!, carInfo.messagePort!) | ||||
|       this.udp.create(config.udplocalIp!, '8800', "112.80.35.83", "11056") | ||||
| 
 | ||||
|       this.udp.setDealMethod(this.dealMsg) | ||||
|     } catch (e) { | ||||
|       console.error(UDPTag, "初始化中心 udp失败") | ||||
|  | ||||
| @ -10,6 +10,7 @@ import { | ||||
| } from '../model'; | ||||
| import { CenterUDPBusinessInstance } from '../utils/business/CenterUdpBusiness'; | ||||
| import { DifferentialSignal } from '../utils/business/DifferentialSignal'; | ||||
| import { JudgeUdpBusinessInstance } from '../utils/business/JudgeUdpBusiness'; | ||||
| import { ObtainUdpBusinessInstance } from '../utils/business/ObtainUdpBusiness'; | ||||
| import { SerialPortService } from '../utils/business/SerialPortService'; | ||||
| 
 | ||||
|  | ||||
| @ -91,37 +91,9 @@ async function InitExam(dirName: string) { | ||||
| 
 | ||||
| // 写过程数据 | ||||
| async function WriteProcessData(type: ProcessDataEnumType, data: string) { | ||||
|   let result: LogWorkerMessage = JSON.parse(data) | ||||
|   if (type === ProcessDataEnumType.WuxiExam) { | ||||
|     //   改变数据为无锡所需要的数据 | ||||
|     const plcData = data.split(','); | ||||
|     const time = dayTs().format("YYYY-MM-DD HH:mm:ss") | ||||
|     const lineData = [ | ||||
|     /*帧头*/time, | ||||
|       /*卫星时间*/time, | ||||
|       /*经度*/ plcData[95], | ||||
|       /*纬度*/ plcData[95], | ||||
|       /*高度*/ plcData[86], | ||||
|       /*方位角*/ 0, | ||||
|       /*俯仰角*/ plcData[91], | ||||
|       /*速度角*/'', | ||||
|       /*速度*/  plcData[97], | ||||
|       /*横滚*/'', | ||||
|       /*卫星定位状态*/'', | ||||
|       /*卫星定向状态*/'', | ||||
|       /*前天线可用星数*/'', | ||||
|       /*后天线可用星数*/'', | ||||
|       /*东向位置坐标*/'', | ||||
|       /*北向位置坐标*/'', | ||||
|       /*天向位置坐标*/'', | ||||
|       /*东向速度*/'', | ||||
|       /*北向速度*/'', | ||||
|       /*评判信号1*/[plcData[14], plcData[19], plcData[5], '', plcData[2], plcData[3], plcData[7], plcData[8], | ||||
|         plcData[13], plcData[12], plcData[17], '', plcData[4], plcData[11], plcData[20], plcData[9], 0].join(','), | ||||
|       /*评判信号2*/['', plcData[28], '', '', plcData[10], '', '', '', '', '', '', '', '', '', '', '', '', ''].join(','), | ||||
|       /*发动机转速*/ plcData[25], | ||||
|       /*结束符*/ time, | ||||
|     ]; | ||||
|     writeQueue.push({ type, data: JSON.stringify(lineData) }); | ||||
|     writeQueue.push({ type, data: result.data }); | ||||
|   } else { | ||||
|     writeQueue.push({ type, data }); | ||||
|   } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user