From f62fb3eeeae7a3b56ad878fc783fe4a9c05a5fc3 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 14 Jun 2020 13:14:53 -0400 Subject: [PATCH] MLQ code duplication & docs --- .../rusefi/sensor_logs/mlq_file_format.txt | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/java_console/ui/src/main/java/com/rusefi/sensor_logs/mlq_file_format.txt b/java_console/ui/src/main/java/com/rusefi/sensor_logs/mlq_file_format.txt index e69de29bb2..d4033266ff 100644 --- a/java_console/ui/src/main/java/com/rusefi/sensor_logs/mlq_file_format.txt +++ b/java_console/ui/src/main/java/com/rusefi/sensor_logs/mlq_file_format.txt @@ -0,0 +1,45 @@ +Reverse engineers by AndreiKA + +See also + +** all numbers are big-engian ** + +File format: + Header + Fields + Text (1st+2nd lines of the text log) + Records + +Header format: + 0000h = magic (6 bytes) = "MLVLG\0" { 4dh 4ch 56h 4ch 47h 00h } + 0006h = version (2 bytes) = 0x0001 + 0008h = unix_timestamp (4 bytes) + 000ch = offset_to_text (2 bytes) + 000eh = reserved? (zeroes) (2 bytes) + 0010h = offset_to_data (2 bytes) + 0012h = (record_size - 5)? (2 bytes) + 0014h = num_fields (2 bytes) + 0016h... = fields_array_start + +Field format: + * the offset is (0016h) + { + 0000h = type_and_size (1 byte) 0=U08, 1=S08, 2=U16, 3=S16, 4=U32, 5=S32, 6=U64?, 7=F32 + 0001h = name (34 bytes) + 0023h = units (11 bytes) + 002Eh = scale (4 bytes) = float + 0032h = zeroes (4 bytes) + 0036h = precision (1 byte) 1="%.1f", 2="%.2f",... + } fields[num_fields] + +Text format: + * the offset is (offset_to_text) + * the size is (offset_to_data-offset_to_text) + +Data format: + * the offset is (offset_to_data) + { + 0000h = "counter-ish" (4 bytes) + 0004h = packed fields data (see type_and_size) + ..... = crc (1 byte) + } records[]