first commit

This commit is contained in:
lihansani
2026-07-13 13:39:10 +08:00
commit 5bbf1f5c78
391 changed files with 169766 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
package com.cbsd.client.check;
import com.cbsd.client.check.ICheckInterface;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 检查脚本示例, 实现 ICheckInterface 接口
*/
public class CheckTemplate implements ICheckInterface {
/**
* 检查
*
* @param originalCommand 原始指令数据
* @param preTreatmentCommand 预处理指令数据,若无预处理,则为原始指令数据
* @param repeatCount 重复次数
* @param hitCount 命中次数
* @param latestHitTime 最后命中时间
* @param dataMap 数据集合key为协议字段属性名labelvalue为物理值
* @return 日志信息列表
*/
@Override
public List<String> check(String originalCommand, String preTreatmentCommand, int repeatCount, int hitCount, String latestHitTime, Map<String, String> dataMap) {
List<String> list = new ArrayList<>();
String temperatureStr = dataMap.get("temperature");
if (temperatureStr != null && !temperatureStr.isEmpty()) {
double temperature = Double.parseDouble(temperatureStr);
list.add("检查温度:" + temperature + "");
}
return list;
}
/**
* 描述
*
* @return 描述内容
*/
@Override
public String comment() {
return "打印检查日志";
}
}