MLQ code duplication & docs

This commit is contained in:
rusefi 2020-06-14 13:14:53 -04:00
parent ff1312f75e
commit f62fb3eeea
1 changed files with 45 additions and 0 deletions

View File

@ -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[]