Merge pull request 'improve backwards compatibility' (#163) from improve-backwards-compat into main

Reviewed-on: #163
This commit was merged in pull request #163.
This commit is contained in:
2025-09-24 19:54:11 +02:00

View File

@@ -242,6 +242,9 @@ impl From<u16> for PacketId {
}
}
#[deprecated(since = "0.16.0", note = "use PacketSequenceControl instead")]
pub type PacketSequenceCtrl = PacketSequenceControl;
/// Abstraction for the CCSDS Packet Sequence Control (PSC) field which is the
/// third and the fourth byte in the CCSDS primary header.
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
@@ -309,6 +312,12 @@ pub trait CcsdsPacket {
usize::from(self.data_len()) + CCSDS_HEADER_LEN + 1
}
#[deprecated(since = "0.16.0", note = "use packet_len instead")]
#[inline]
fn total_len(&self) -> usize {
self.packet_len()
}
/// Retrieve 13 bit Packet Identification field. Can usually be retrieved with a bitwise AND
/// of the first 2 bytes with 0x1FFF.
#[inline]