pub struct NmeaFrame<'a> {
pub prefix: char,
pub talker: &'a str,
pub sentence_type: &'a str,
pub fields: Vec<&'a str>,
pub tag_block: Option<&'a str>,
}Expand description
A parsed NMEA 0183 frame with references into the original input.
The frame layer handles:
$(NMEA) and!(AIS) prefix detection- IEC 61162-450 tag block stripping
- XOR checksum validation
- Talker ID + sentence type extraction
- Proprietary sentence detection (
$P...) - Field splitting by
,
§Proprietary sentences
Per NMEA 0183, addresses starting with P are proprietary. For these,
talker is "" and sentence_type is the full address (e.g. "PASHR",
"PSKPDPT"). For standard sentences, talker is the 2-char talker ID
and sentence_type is the 3-char type code.
Fields§
§prefix: charSentence prefix: $ for NMEA, ! for AIS.
talker: &'a strTalker identifier (typically 2 letters, e.g. “GP”, “WI”, “AI”).
Empty ("") for proprietary sentences ($P...).
sentence_type: &'a strSentence type. For standard sentences: 3 characters (e.g. “RMC”, “MWD”). For proprietary sentences: the full address (e.g. “PASHR”, “PSKPDPT”).
fields: Vec<&'a str>Comma-separated payload fields (after talker+type, before checksum).
tag_block: Option<&'a str>IEC 61162-450 tag block content, if present.
Trait Implementations§
impl<'a> StructuralPartialEq for NmeaFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for NmeaFrame<'a>
impl<'a> RefUnwindSafe for NmeaFrame<'a>
impl<'a> Send for NmeaFrame<'a>
impl<'a> Sync for NmeaFrame<'a>
impl<'a> Unpin for NmeaFrame<'a>
impl<'a> UnsafeUnpin for NmeaFrame<'a>
impl<'a> UnwindSafe for NmeaFrame<'a>
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