getter function for datafield len

This commit is contained in:
Robin Müller 2023-08-17 20:41:45 +02:00
parent fc7bee342c
commit 965541e422
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -340,6 +340,10 @@ impl PduHeader {
+ self.pdu_conf.dest_entity_id.size() + 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 /// Returns the full length of the PDU when written to a raw buffer, which is the header length
/// plus the PDU datafield length. /// plus the PDU datafield length.
pub fn pdu_len(&self) -> usize { pub fn pdu_len(&self) -> usize {