can-log-tools/reader/src/test/java/com/rusefi/can/reader/impl/TrcToMlqSandbox.java

33 lines
1.2 KiB
Java
Raw Normal View History

2022-06-21 23:05:04 -07:00
package com.rusefi.can.reader.impl;
import com.rusefi.can.CANPacket;
2022-11-12 09:29:20 -08:00
import com.rusefi.mlv.LoggingStrategy;
2022-06-21 23:05:04 -07:00
import com.rusefi.can.reader.dbc.DbcFile;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.util.List;
2022-08-16 22:01:48 -07:00
import static com.rusefi.can.reader.impl.ParseDBCTest.VAG_MOTOR_1;
2022-06-21 23:05:04 -07:00
public class TrcToMlqSandbox {
2022-06-22 00:19:09 -07:00
// private static final String fileName = "C:\\stuff\\rusefi_documentation\\OEM-Docs\\VAG\\2006-Passat-B6\\passat-b6-stock-ecu-ecu-ptcan-not-running-pedal-up-and-down.trc";
2022-06-26 09:54:11 -07:00
private static final String trcFileName = "C:\\stuff\\rusefi_documentation\\OEM-Docs\\VAG\\2006-Passat-B6\\passat-b6-stock-ecu-ecu-ptcan-parked-revving.trc";
2022-06-22 00:19:09 -07:00
2022-06-21 23:05:04 -07:00
public static void main(String[] args) throws IOException {
2022-09-12 23:01:23 -07:00
DbcFile dbc = new DbcFile(LoggingStrategy.LOG_ONLY_TRANSLATED_FIELDS);
2022-06-21 23:05:04 -07:00
{
BufferedReader reader = new BufferedReader(new StringReader(VAG_MOTOR_1));
dbc.read(reader);
}
2022-11-12 19:13:12 -08:00
List<CANPacket> packets = new PcanTrcReader1_1().readFile(trcFileName);
2022-06-21 23:05:04 -07:00
System.out.println(packets.size() + " packets");
2022-08-26 17:11:21 -07:00
LoggingStrategy.writeLog(dbc, packets, "gauges.mlg");
2022-06-21 23:05:04 -07:00
}
2022-06-26 09:54:11 -07:00
2022-06-21 23:05:04 -07:00
}