XU XUv0.13.1
中文

#embedded/chips/esp32/wifi_rx_layout

import: #embedded/chips/esp32/wifi_rx_layout

counts: 1 functions, 0 methods, 1 types, 0 constants, 0 method sets

Decode one completed, owned ESP32 Wi-Fi RX DMA snapshot. The caller must already have checked descriptor ownership/completion, capacity, RX buffer identity and sentinels. This helper performs no MMIO and allocates no packet storage. It models the measured DMA profile that strips the four-byte FCS.

struct Layout

XuAPI
pub struct Layout {
    pub valid bool // bounded layout and selected hardware status == 0
    pub bounded bool // selected frame and zero word padding fit exactly
    pub status int // selected hardware state; -1 if no safe selection exists
    pub frame_offset int
    pub frame_length int // excludes the hardware-stripped FCS
    pub csi_length int // effective aligned CSI bytes; zero after bug case 2
    pub bug_case int // -1: no CSI; 0/1/2: native selection; 3: rejected bug
}

Purpose

Decode one completed, owned ESP32 Wi-Fi RX DMA snapshot. The caller must already have checked descriptor ownership/completion, capacity, RX buffer identity and sentinels. This helper performs no MMIO and allocates no packet storage. It models the measured DMA profile that strips the four-byte FCS.

Public fields

valid bool // bounded layout and selected hardware status == 0
field (bool // bounded layout and selected hardware status == 0)
bounded bool // selected frame and zero word padding fit exactly
field (bool // selected frame and zero word padding fit exactly)
status int // selected hardware state; -1 if no safe selection exists
field (int // selected hardware state; -1 if no safe selection exists)
frame_offset int
field (int)
frame_length int // excludes the hardware-stripped FCS
field (int // excludes the hardware-stripped FCS)
csi_length int // effective aligned CSI bytes; zero after bug case 2
field (int // effective aligned CSI bytes; zero after bug case 2)
bug_case int // -1: no CSI; 0/1/2: native selection; 3: rejected bug
field (int // -1: no CSI; 0/1/2: native selection; 3: rejected bug)

parse_owned_packet

XuAPI
pub fn parse_owned_packet(raw &string) Layout

Purpose

Parse as owned packet.

Parameters

raw &string
raw (read-only borrow; caller keeps the original; type &string)

Returns

Layout — a value of this type