better name into counters

This commit is contained in:
rusefillc 2024-02-15 21:21:27 -05:00
parent fb6e2c13f8
commit 626b92fd24
3 changed files with 6 additions and 5 deletions

View File

@ -105,8 +105,8 @@ public class ByteRateOfChangeReports {
PerSidDump.handle(reportDestinationFolder, simpleFileName, logFileContent);
// at the moment we overwrite counter detection report after we process each file
CounterScanner.scanForCounters(reportDestinationFolder, logFileContent);
ChecksumScanner.scanForChecksums(reportDestinationFolder, logFileContent);
CounterScanner.scanForCounters(reportDestinationFolder, simpleFileName, logFileContent);
ChecksumScanner.scanForChecksums(reportDestinationFolder, simpleFileName, logFileContent);
CanToMegaLogViewer.createMegaLogViewer(reportDestinationFolder, logFileContent, simpleFileName);

View File

@ -13,7 +13,7 @@ public class ChecksumScanner {
public static final String CHECKSUM_YAML = "checksum.yaml";
public static void scanForChecksums(String reportDestinationFolder, List<CANPacket> packets) throws IOException {
public static void scanForChecksums(String reportDestinationFolder, String simpleFileName, List<CANPacket> packets) throws IOException {
Map<Integer, AtomicBoolean> isChecksumMap = new HashMap<>();
J1850_SAE_crc8_Calculator c = new J1850_SAE_crc8_Calculator();
@ -43,6 +43,7 @@ public class ChecksumScanner {
}
withChecksum.sort(Comparator.naturalOrder());
Yaml yaml = new Yaml();
// simpleFileName + "_" +
String yamlCountersReportFileName = reportDestinationFolder + File.separator + CHECKSUM_YAML;
System.out.println(new Date() + " Writing report to " + yamlCountersReportFileName);
yaml.dump(withChecksum, new FileWriter(yamlCountersReportFileName));

View File

@ -10,9 +10,9 @@ public class CounterScanner {
public static final String COUNTERS_YAML = "counters.yaml";
public static void scanForCounters(String reportDestinationFolder, List<CANPacket> packets) throws IOException {
public static void scanForCounters(String reportDestinationFolder, String simpleFileName, List<CANPacket> packets) throws IOException {
String outputFileName = reportDestinationFolder + File.separator + "counter_report.txt";
String outputFileName = reportDestinationFolder + File.separator + simpleFileName + "_counter_report.txt";
PrintWriter pw = new PrintWriter(new FileOutputStream(outputFileName));
Map<BitStateKey, BitState> bitStates = new TreeMap<>();