1
0

fix everything for merge Field

This commit is contained in:
2023-06-07 13:42:14 +02:00
parent d88329a50b
commit 5878750109
7 changed files with 31 additions and 13 deletions

View File

@@ -15,6 +15,7 @@ public class FieldConnector implements DataPointListener {
private FieldConnector(){
initialize("LocalHost",1502, "src/main/resources/ModbusMap.csv");
DataPointListener.subscribeUpdate(this);
}
/**
@@ -44,10 +45,10 @@ public class FieldConnector implements DataPointListener {
String[] splitLine = line.split(";"); // split line between ";"
String label = splitLine[0]; // first split is the label of the register
boolean isOutput = splitLine[3].equals("N"); // third split declares if it is an output
boolean isOutput = splitLine[3].equals("Y"); // third split declares if it is an output
int address = new Integer((splitLine[4])); // fourth split is the address of the register
float range = new Float(splitLine[5]); // if it is a floatDatapoint, the fifth split is the range of the data
float offset = new Float(splitLine[6]); // if it is a floatDatapoint, the sixth split is the offset of the data
int range = new Integer(splitLine[5]); // if it is a floatDatapoint, the fifth split is the range of the data
int offset = new Integer(splitLine[6]); // if it is a floatDatapoint, the sixth split is the offset of the data
// create a float or a boolean register and put it in the map of registers