作者 钟来

修改bug

... ... @@ -31,6 +31,21 @@ public class DeviceDataConfig {
this.attribute_describe = attribute_describe;
}
public DeviceDataConfig(String attribute_name, PLCType device_type, PLCDataType plc_data_type,String sensor_numer,String attribute_describe,String alarmValue) {
this.attribute_name = attribute_name;
if(null != device_type)
{
this.device_type = device_type.name();
}
if(null != plc_data_type)
{
this.plc_data_type = plc_data_type.name();
}
this.sensor_numer = sensor_numer;
this.attribute_describe = attribute_describe;
this.alarmValue = alarmValue;
}
public DeviceDataConfig(Integer number, String attribute_name,PLCType device_type, PLCDataType plc_data_type,String sensor_numer,String attribute_describe,String alarmCode,String alarmValue) {
this.attribute_name = attribute_name;
if(null != device_type)
... ...
... ... @@ -40,15 +40,15 @@ public class DeviceProductProtocol {
{
// String attribute_name, PLCType device_type, PLCDataType plc_data_type,String sensor_numer,String attribute_describe
Map<String, DeviceDataConfig> deviceDataConfigReadMap = new HashMap<>();
deviceDataConfigReadMap.put("YC_QT_C001A",new DeviceDataConfig("YC_QT_C001A",PLCType.推水机,PLCDataType.控制器状态码,"01","远程启停按钮"));
deviceDataConfigReadMap.put("YC_QT_C001B",new DeviceDataConfig("YC_QT_C001B",PLCType.推水机,PLCDataType.控制器状态码,"02","远程启停按钮"));
deviceDataConfigReadMap.put("YC_QT_C001C",new DeviceDataConfig("YC_QT_C001C",PLCType.推水机,PLCDataType.控制器状态码,"03","远程启停按钮"));
deviceDataConfigReadMap.put("YC_QT_C001D",new DeviceDataConfig("YC_QT_C001D",PLCType.推水机,PLCDataType.控制器状态码,"04","远程启停按钮"));
deviceDataConfigReadMap.put("YC_QT_C002",new DeviceDataConfig("YC_QT_C002",PLCType.增氧机,PLCDataType.控制器状态码,"34","远程启停按钮"));
deviceDataConfigReadMap.put("YC_QT_P001A",new DeviceDataConfig("YC_QT_P001A",PLCType.排污,PLCDataType.控制器状态码,"21","远程启停按钮"));
deviceDataConfigReadMap.put("YC_QT_P001B",new DeviceDataConfig("YC_QT_P001B",PLCType.排污,PLCDataType.控制器状态码,"22","远程启停按钮"));
deviceDataConfigReadMap.put("YC_QT_P001C",new DeviceDataConfig("YC_QT_P001C",PLCType.排污,PLCDataType.控制器状态码,"23","远程启停按钮"));
deviceDataConfigReadMap.put("YC_QT_P001D",new DeviceDataConfig("YC_QT_P001D",PLCType.排污,PLCDataType.控制器状态码,"24","远程启停按钮"));
deviceDataConfigReadMap.put("YC_QT_C001A",new DeviceDataConfig("YC_QT_C001A",PLCType.推水机,PLCDataType.控制器状态码,"01","远程启停按钮","01"));
deviceDataConfigReadMap.put("YC_QT_C001B",new DeviceDataConfig("YC_QT_C001B",PLCType.推水机,PLCDataType.控制器状态码,"02","远程启停按钮","01"));
deviceDataConfigReadMap.put("YC_QT_C001C",new DeviceDataConfig("YC_QT_C001C",PLCType.推水机,PLCDataType.控制器状态码,"03","远程启停按钮","01"));
deviceDataConfigReadMap.put("YC_QT_C001D",new DeviceDataConfig("YC_QT_C001D",PLCType.推水机,PLCDataType.控制器状态码,"04","远程启停按钮","01"));
deviceDataConfigReadMap.put("YC_QT_C002",new DeviceDataConfig("YC_QT_C002",PLCType.增氧机,PLCDataType.控制器状态码,"34","远程启停按钮","01"));
deviceDataConfigReadMap.put("YC_QT_P001A",new DeviceDataConfig("YC_QT_P001A",PLCType.排污,PLCDataType.控制器状态码,"21","远程启停按钮","01"));
deviceDataConfigReadMap.put("YC_QT_P001B",new DeviceDataConfig("YC_QT_P001B",PLCType.排污,PLCDataType.控制器状态码,"22","远程启停按钮","01"));
deviceDataConfigReadMap.put("YC_QT_P001C",new DeviceDataConfig("YC_QT_P001C",PLCType.排污,PLCDataType.控制器状态码,"23","远程启停按钮","01"));
deviceDataConfigReadMap.put("YC_QT_P001D",new DeviceDataConfig("YC_QT_P001D",PLCType.排污,PLCDataType.控制器状态码,"24","远程启停按钮","01"));
return deviceDataConfigReadMap;
}
}
... ...