progress
This commit is contained in:
parent
bedd325ff7
commit
567751b5a3
|
@ -68,7 +68,7 @@ public class UsagesReader {
|
|||
}
|
||||
|
||||
private int handleYaml(Map<String, Object> data, EntryHandler _handler) throws IOException {
|
||||
JavaSensorsConsumer javaSensorsConsumer = new JavaSensorsConsumer(0);
|
||||
JavaSensorsConsumer javaSensorsConsumer = new JavaSensorsConsumer();
|
||||
|
||||
EntryHandler handler = new EntryHandler() {
|
||||
|
||||
|
|
|
@ -10,10 +10,6 @@ public class JavaSensorsConsumer implements ConfigurationConsumer {
|
|||
|
||||
private final StringBuilder sb = new StringBuilder();
|
||||
|
||||
public JavaSensorsConsumer(int sensorTsPosition) {
|
||||
this.sensorTsPosition = sensorTsPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startFile() {
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import java.io.*;
|
|||
public class OutputsSectionConsumer implements ConfigurationConsumer {
|
||||
private final String tsOutputsSectionFileName;
|
||||
private final TsOutput tsOutput;
|
||||
public int sensorTsPosition;
|
||||
|
||||
public OutputsSectionConsumer(String tsOutputsSectionFileName) {
|
||||
this.tsOutputsSectionFileName = tsOutputsSectionFileName;
|
||||
|
@ -24,7 +25,7 @@ public class OutputsSectionConsumer implements ConfigurationConsumer {
|
|||
public void handleEndStruct(ReaderState readerState, ConfigStructure structure) throws IOException {
|
||||
System.out.println("handleEndStruct");
|
||||
|
||||
tsOutput.run(readerState, structure, 0);
|
||||
sensorTsPosition = tsOutput.run(readerState, structure, sensorTsPosition);
|
||||
|
||||
if (readerState.stack.isEmpty()) {
|
||||
if (tsOutputsSectionFileName != null) {
|
||||
|
|
|
@ -28,7 +28,7 @@ public class JavaSensorsConsumerTest {
|
|||
"\tuint8_t vehicleSpeedKph\n" +
|
||||
"\tint8_t autoscale internalMcuTemperature;mcu;\"deg C\",1, 0, 0, 0, 0\n" +
|
||||
"end_struct\n";
|
||||
JavaSensorsConsumer javaSensorsConsumer = new JavaSensorsConsumer(0);
|
||||
JavaSensorsConsumer javaSensorsConsumer = new JavaSensorsConsumer();
|
||||
state.readBufferedReader(outputChannels, javaSensorsConsumer);
|
||||
|
||||
assertEquals("RPMValue(\"hello\", SensorCategory.SENSOR_INPUTS, FieldType.INT16, 4, 1.0, 0.0, 8000.0, \"RPM\"),\n" +
|
||||
|
|
Loading…
Reference in New Issue