| | |
| | | |
| | | |
| | | // 异常数据生成回调类 |
| | | typealias NewPolluteClueCallback = (ex: List<PollutedClue>) -> Unit |
| | | typealias NewPolluteClueCallback = (ex: PollutedClue) -> Unit |
| | | /** |
| | | * 不同风速下,数据突变异常基类 |
| | | * @date 2025/5/29 |
| | |
| | | } |
| | | |
| | | override fun newResult(tag: ExceptionTag, factor: FactorFilter.SelectedFactor): PollutedClue { |
| | | return PollutedClue(tag, factor, getExceptionType(), config, windLevelCondition) |
| | | return PollutedClue() |
| | | } |
| | | |
| | | // override fun newResult( |
| | | override fun newResult(exceptions: List<Pair<FactorFilter.SelectedFactor, ExceptionTag>>): PollutedClue { |
| | | return if (exceptions.isEmpty()) |
| | | PollutedClue() |
| | | else |
| | | PollutedClue(exceptions, getExceptionType(), config, windLevelCondition) |
| | | } |
| | | |
| | | // override fun newResult( |
| | | // start: BaseRealTimeData, |
| | | // end: BaseRealTimeData?, |
| | | // factor: FactorFilter.SelectedFactor, |
| | |
| | | |
| | | override fun mergeExceptionResult() { |
| | | super.mergeExceptionResult() |
| | | latestExceptionResult |
| | | latestCombinedResult |
| | | callback?.let { func -> |
| | | latestExceptionResult.forEach { |
| | | func.invoke(listOf(it as PollutedClue)) |
| | | result.forEach { |
| | | func.invoke(it) |
| | | } |
| | | latestCombinedResult.forEach { |
| | | func.invoke(it as List<PollutedClue>) |
| | | } |
| | | // latestExceptions.forEach { |
| | | // func.invoke(listOf(it as PollutedClue)) |
| | | // } |
| | | // latestCombinedExc.forEach { |
| | | // func.invoke(it as List<PollutedClue>) |
| | | // } |
| | | } |
| | | } |
| | | } |