Skip to main content

Module frame_header

Module frame_header 

Source
Expand description

Binary frame header prepended to every raw pixel buffer on the Zenoh image key.

§Layout (16 bytes, all fields little-endian)

OffsetSizeFieldValue / Notes
02magic0x4746 LE ([0x46, 0x47])
21version1
31formatpixel format discriminant (see table)
44widthimage width in pixels, u32 LE
84heightimage height in pixels, u32 LE
124seqmonotonically increasing frame counter

Structs§

FrameHeader
16-byte binary frame header prepended to every image payload.

Enums§

FrameHeaderError
Errors returned by FrameHeader::decode.

Constants§

FRAME_MAGIC
Magic bytes identifying a GenICam frame header. Little-endian encoding of 0x4746 -> bytes [0x46, 0x47].
HEADER_SIZE
Fixed size of the binary frame header in bytes.
SUPPORTED_VERSION
The only supported header version. Bumped when the layout changes.

Functions§

pixel_format_to_u8
Map a PixelFormat variant to its stable 1-byte discriminant code.
u8_to_pixel_format
Map a 1-byte discriminant code back to the corresponding PixelFormat.