| | |
| | | import com.flightfeather.uav.model.epw.EPWDataPrep |
| | | import com.flightfeather.uav.domain.repository.AirDataRep |
| | | import com.flightfeather.uav.domain.repository.SceneInfoRep |
| | | import com.flightfeather.uav.domain.repository.SourceTraceRep |
| | | import com.flightfeather.uav.socket.bean.AirDataPackage |
| | | import com.flightfeather.uav.socket.decoder.AirDataDecoder |
| | | import com.flightfeather.uav.socket.decoder.DataPackageDecoder |
| | |
| | | class UnderwayProcessor( |
| | | private val airDataRep: AirDataRep, |
| | | private val sceneInfoRep: SceneInfoRep, |
| | | private val sourceTraceRep: SourceTraceRep |
| | | ) : BaseProcessor() { |
| | | |
| | | companion object { |
| | |
| | | saveToDataBase(packageData)?.takeIf { it.isNotEmpty() }?.get(0)?.let { |
| | | // 每台设备有各自单独的异常数据处理器 |
| | | if (!sourceTraceMap.containsKey(it.deviceCode)) { |
| | | sourceTraceMap[it.deviceCode] = SourceTraceController(sceneInfoRep) |
| | | sourceTraceMap[it.deviceCode] = SourceTraceController(sceneInfoRep, sourceTraceRep) |
| | | } |
| | | // 将走航数据传入异常处理器 |
| | | sourceTraceMap[it.deviceCode]?.addOneData(it) |