pub struct AprsPacket {
pub from: Callsign,
pub to: Callsign,
pub via: Vec<Digipeater>,
pub data: AprsData,
}Expand description
A fully decoded APRS packet.
Fields§
§from: CallsignThe source station (transmitter).
to: CallsignThe destination callsign (AX.25 destination / APRS path destination).
via: Vec<Digipeater>The digipeater path.
data: AprsDataThe parsed packet content, discriminated by Data Type Indicator.
Implementations§
Source§impl AprsPacket
impl AprsPacket
Sourcepub fn decode_textual(input: &[u8]) -> Result<Self, AprsError>
pub fn decode_textual(input: &[u8]) -> Result<Self, AprsError>
Decode a textual APRS packet (APRS-IS format).
Expected format: FROM>TO[,VIA...]:DATA
The input is &[u8] rather than &str because APRS information fields may
contain arbitrary bytes (e.g. MIC-E uses bytes 0x1C and 0x1D).
Sourcepub fn decode_ax25(input: &[u8]) -> Result<Self, AprsError>
pub fn decode_ax25(input: &[u8]) -> Result<Self, AprsError>
Decode a raw AX.25 UI frame.
Frame structure: Destination (7 bytes) + Source (7 bytes) + Repeaters (0–8 × 7 bytes)
- Control (0x03) + PID (0xF0) + Information field
Trait Implementations§
Source§impl Clone for AprsPacket
impl Clone for AprsPacket
Source§fn clone(&self) -> AprsPacket
fn clone(&self) -> AprsPacket
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AprsPacket
impl RefUnwindSafe for AprsPacket
impl Send for AprsPacket
impl Sync for AprsPacket
impl Unpin for AprsPacket
impl UnsafeUnpin for AprsPacket
impl UnwindSafe for AprsPacket
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