Expand description
Fixed-width values read straight out of a memory map.
A column is a run of values width bytes wide, stride bytes apart, starting
start bytes into one of the reader’s sources; count values side by side make one
Array cell. Rows of records (each field a column with the record size as its stride)
and one file per column (stride equal to width) are both that shape, so one strided
decoder serves the format specs and NumPy arrays, and decode is public for other
readers of packed values (audio samples, CAN signals). The sources are kept, so a
viewer of the raw bytes can read them too.
The frame is decoded over a row index (crate::row_index): a query decodes only
the columns and rows it reaches, and runs on the streaming engine. A window of an
untouched view is read through FixedRecords::window, which starts the columns
further in and builds no index.
Structs§
- Column
Layout - One column: where its values are and how to read them.
- Fixed
Records - Columns of fixed-width values over one or more sources,
rowslong.
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
rowsvalues ofcolumnfrombytes: one cell a row, an Array ofcolumn.countvalues each when it holds more than one. Asking for more rows thanbytesholds is an error. - decode_
at - The values of
columnfrombytesfor records that start atrecords, in that order: each record’s cell iscolumn.startbytes into it, andstrideis not used. For records that are not evenly spaced, such as the messages of a log, found by an index. A cell past the end ofbytesis an error. - decode_
rows - The values of
columnfrombytesfor the rowsindexnames, in that order. A missing row, or onebytesdoes 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
logicalsays (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
texttrims 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.