Skip to main content

Module fixed_records

Module fixed_records 

Source
Expand description

Fixed-width values read straight out of a memory map. A column is values width bytes wide, stride apart, from start into a source; count side by side make an Array cell. Records (stride = record size) and one file per column (stride = width) share one strided decoder for format specs and NumPy; decode is public for other packed readers (audio, CAN). Sources are kept for raw-byte viewers. Frames decode over a row index (crate::formats::row_index) on the streaming engine; an untouched view’s window reads via FixedRecords::window without an index.

Structs§

ColumnLayout
One column: where its values are and how to read them.
FixedRecords
Columns of fixed-width values over one or more sources, rows long.

Enums§

Bytes
The bytes a column reads.
Logical
What a value means beyond how it is stored.
Null
A stored value that means “no value”.
Physical
How a value’s bytes are stored.

Functions§

decode
The first rows values of column from bytes: one cell a row, an Array of column.count values each when it holds more than one. Asking for more rows than bytes holds is an error.
decode_at
The values of column from bytes for records starting at records, in order (column.start into each; stride unused): for unevenly spaced records like log messages found by an index. A cell past the end is an error.
decode_rows
The values of column from bytes for the rows index names, in that order. A missing row, or one bytes does not hold, is an error.
hex
Bytes as space-separated hex pairs.
integers
Integers as their column means them: plain at its width, or as its logical says (a datetime, a duration, a factor and offset, an enum’s labels). Public for readers that find their integers some other way, such as bit fields of CAN signals.
latin1
Text from a fixed-width ISO 8859-1 field, padding trimmed as text trims it.
read_signed
An integer of bytes.len() bytes, two’s complement.
read_unsigned
An integer of bytes.len() bytes, unsigned.
text
Text from a fixed-width field: UTF-8 where it is, padding trimmed from the right.
utf16
Text from a fixed-width UTF-16 field, NUL and space units trimmed from the right. An odd last byte and unpaired surrogates read as the replacement character.
utf32
Text from a fixed-width UTF-32 field, NUL characters trimmed from the right as NumPy trims them. A unit that is no character, and an odd last few bytes, read as the replacement character.