From 4485ed26699d32cc43488227bc1c78e6a3ffce24 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 5 Jul 2023 19:28:43 +0200 Subject: [PATCH] this API is useful for funnels --- src/tm.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tm.rs b/src/tm.rs index 9d2966d..eb9889e 100644 --- a/src/tm.rs +++ b/src/tm.rs @@ -427,6 +427,14 @@ impl<'raw> PusTmZeroCopyWriter<'raw> { Some(Self { raw_tm }) } + pub fn service(&self) -> u8 { + self.raw_tm[7] + } + + pub fn subservice(&self) -> u8 { + self.raw_tm[8] + } + /// Set the sequence count. Returns false and does not update the value if the passed value /// exceeds [MAX_APID]. pub fn set_apid(&mut self, apid: u16) -> bool {