progress
This commit is contained in:
parent
cb0cecde07
commit
dee2cc0a68
|
@ -44,7 +44,6 @@
|
||||||
! all the sub-structures are going to be nested within the primary structure, that's
|
! all the sub-structures are going to be nested within the primary structure, that's
|
||||||
! needed to get a proper TunerStudio file
|
! needed to get a proper TunerStudio file
|
||||||
|
|
||||||
|
|
||||||
struct persistent_config_s
|
struct persistent_config_s
|
||||||
|
|
||||||
struct_no_prefix engine_configuration_s
|
struct_no_prefix engine_configuration_s
|
||||||
|
|
Binary file not shown.
|
@ -25,7 +25,7 @@ public class ConfigStructure {
|
||||||
public final List<ConfigField> cFields = new ArrayList<>();
|
public final List<ConfigField> cFields = new ArrayList<>();
|
||||||
public final List<ConfigField> tsFields = new ArrayList<>();
|
public final List<ConfigField> tsFields = new ArrayList<>();
|
||||||
|
|
||||||
public int totalSize;
|
private int totalSize;
|
||||||
|
|
||||||
public final BitState readingBitState = new BitState();
|
public final BitState readingBitState = new BitState();
|
||||||
|
|
||||||
|
@ -97,4 +97,8 @@ public class ConfigStructure {
|
||||||
}
|
}
|
||||||
readingBitState.reset();
|
readingBitState.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getTotalSize() {
|
||||||
|
return totalSize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class TypesHelper {
|
||||||
if (type == null)
|
if (type == null)
|
||||||
return 0;
|
return 0;
|
||||||
if (state != null && state.structures.containsKey(type))
|
if (state != null && state.structures.containsKey(type))
|
||||||
return state.structures.get(type).totalSize;
|
return state.structures.get(type).getTotalSize();
|
||||||
if (state != null && state.tsCustomSize.containsKey(type))
|
if (state != null && state.tsCustomSize.containsKey(type))
|
||||||
return state.tsCustomSize.get(type);
|
return state.tsCustomSize.get(type);
|
||||||
Integer primitiveSize = getPrimitiveSize(type);
|
Integer primitiveSize = getPrimitiveSize(type);
|
||||||
|
|
|
@ -210,6 +210,7 @@ public class TSProjectConsumer implements ConfigurationConsumer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleEndStruct(ConfigStructure structure) throws IOException {
|
public void handleEndStruct(ConfigStructure structure) throws IOException {
|
||||||
|
VariableRegistry.INSTANCE.register(structure.name + "_size", structure.getTotalSize());
|
||||||
if (state.stack.isEmpty()) {
|
if (state.stack.isEmpty()) {
|
||||||
totalTsSize = writeTunerStudio(structure, "", tsWriter, 0);
|
totalTsSize = writeTunerStudio(structure, "", tsWriter, 0);
|
||||||
tsWriter.write("; total TS size = " + totalTsSize + EOL);
|
tsWriter.write("; total TS size = " + totalTsSize + EOL);
|
||||||
|
|
Loading…
Reference in New Issue