fix everything for merge Field
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user