From a8b64f2feff496d2c848c86da9277e3c1bb97443 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 4 Nov 2025 15:39:37 +0100 Subject: [PATCH] add direct APID getter --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 7bdbfb0..b1c318d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -675,6 +675,12 @@ impl SpacePacketHeader { self.packet_id.packet_type = packet_type; } + /// Application Process ID (APID) field. + #[inline] + pub fn apid(&self) -> u11 { + self.packet_id.apid + } + /// Create a struct from a raw slice where the fields have network endianness (big). /// This function also returns the remaining part of the passed slice starting past the read /// CCSDS header.