Struct Ax25Packet
pub struct Ax25Packet {
pub source: Ax25Address,
pub destination: Ax25Address,
pub digipeaters: Vec<Ax25Address>,
pub control: u8,
pub protocol: u8,
pub info: Vec<u8>,
}Expand description
A parsed AX.25 UI (Unnumbered Information) frame.
APRS uses UI frames exclusively. The control field is 0x03 and
the protocol ID is 0xF0 (no layer 3) for standard APRS packets.
To inspect the AX.25 v2.2 Command/Response bits encoded in the C
bits of the source and destination SSID bytes, use
Self::command_response (re-derived on demand from the wire bytes
preserved by the parser).
Fields§
§source: Ax25AddressSource station address.
destination: Ax25AddressDestination address (often an APRS “tocall” like APxxxx).
digipeaters: Vec<Ax25Address>Digipeater path (0-8 via addresses).
control: u8Control field (0x03 for UI frames).
protocol: u8Protocol identifier (0xF0 = no layer 3, standard for APRS).
info: Vec<u8>Information field (the APRS payload).
Implementations§
§impl Ax25Packet
impl Ax25Packet
pub const fn control_typed(&self) -> Ax25Control
pub const fn control_typed(&self) -> Ax25Control
Decode the raw Self::control byte into a typed [Ax25Control]
value.
pub const fn pid(&self) -> Ax25Pid
pub const fn pid(&self) -> Ax25Pid
Decode the raw Self::protocol byte into a typed [Ax25Pid]
value.
pub const fn command_response(&self) -> CommandResponse
pub const fn command_response(&self) -> CommandResponse
AX.25 v2.2 Command/Response classification of this frame, derived from the C-bits captured at parse time on the source and destination addresses (per AX.25 v2.2 §4.3.1.2).
dest C-bit = 1, source C-bit = 0→ Command (APRS frames)dest C-bit = 0, source C-bit = 1→ Response- both equal → Legacy (AX.25 v2.0 or unknown)
Trait Implementations§
§impl Clone for Ax25Packet
impl Clone for Ax25Packet
§fn clone(&self) -> Ax25Packet
fn clone(&self) -> Ax25Packet
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more