metadata PDU done

This commit is contained in:
2023-05-29 23:38:07 +02:00
parent bf4e841499
commit 3166a280bc
5 changed files with 269 additions and 45 deletions

View File

@ -206,7 +206,9 @@ impl CommonPduConfig {
pub const FIXED_HEADER_LEN: usize = 4;
/// Abstraction for the PDU header common to all CFDP PDUs
/// Abstraction for the PDU header common to all CFDP PDUs.
///
/// For detailed information, refer to chapter 5.1 of the CFDP standard.
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct PduHeader {
@ -329,6 +331,7 @@ impl PduHeader {
buf[self.pdu_len() - 2..self.pdu_len()].try_into().unwrap(),
)));
}
return Ok(self.pdu_len() - 2);
}
Ok(self.pdu_len())
}