From 965541e42207daf6ca1ef8f134a9c48a2fa3c88f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 17 Aug 2023 20:41:45 +0200 Subject: [PATCH] getter function for datafield len --- src/cfdp/pdu/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cfdp/pdu/mod.rs b/src/cfdp/pdu/mod.rs index 6d93da9..d015d99 100644 --- a/src/cfdp/pdu/mod.rs +++ b/src/cfdp/pdu/mod.rs @@ -340,6 +340,10 @@ impl PduHeader { + self.pdu_conf.dest_entity_id.size() } + pub fn pdu_datafield_len(&self) -> usize { + self.pdu_datafield_len.into() + } + /// Returns the full length of the PDU when written to a raw buffer, which is the header length /// plus the PDU datafield length. pub fn pdu_len(&self) -> usize {