pub struct PayloadHeader {
pub if_type: InterfaceType,
pub if_num: u8,
pub flags: u8,
pub len: u16,
pub offset: u16,
pub checksum: u16,
pub seq_num: u16,
pub throttle_cmd: u8,
pub pkt_type: PacketType,
}
Expand description
Adapted from esp-hosted-mcu/common/esp_hosted_header.h
This is at the start of the message, and is followed by the RPC header.
See ESP-hosted-MCU readme, section 7.1.
Fields§
§if_type: InterfaceType
Interface type. Serial, AP etc.
if_num: u8
Interface number. 0 may be a good default?
flags: u8
§len: u16
Payload length. The size, in bytes, of everything in the frame following this header
offset: u16
Offset. Always = 12 (This header’s size). Indicates the byte index the payload starts.
checksum: u16
Checksum, calculated over the entire frame.
seq_num: u16
Sequence number for tracking packets (Useful in debugging)
throttle_cmd: u8
Flow control
pkt_type: PacketType
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PayloadHeader
impl RefUnwindSafe for PayloadHeader
impl Send for PayloadHeader
impl Sync for PayloadHeader
impl Unpin for PayloadHeader
impl UnwindSafe for PayloadHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more