libaprs-engine 1.1.0

Protocol-first APRS engine core primitives
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
#![cfg(feature = "serde")]

use libaprs_engine::{parse_packet, serde_support::PacketDiagnostic};

#[test]
fn serde_diagnostic_preserves_non_utf8_bytes() {
    let packet = parse_packet(b"N0CALL>APRS:>\xff").expect("packet should parse");
    let diagnostic = PacketDiagnostic::from_packet(&packet);

    assert_eq!(diagnostic.raw, b"N0CALL>APRS:>\xff");
    assert_eq!(diagnostic.semantic, "status");
}