added some more deprecation warnings
This commit is contained in:
parent
46eab35290
commit
3c8f9f9f07
@ -265,10 +265,6 @@ pub mod legacy_tc {
|
||||
}
|
||||
|
||||
impl<'raw_data> PusTc<'raw_data> {
|
||||
#[deprecated(
|
||||
since = "0.7.0",
|
||||
note = "Use specialized PusTcCreator or PusTcReader classes instead"
|
||||
)]
|
||||
/// Generates a new struct instance.
|
||||
///
|
||||
/// # Arguments
|
||||
@ -281,6 +277,10 @@ pub mod legacy_tc {
|
||||
/// * `set_ccsds_len` - Can be used to automatically update the CCSDS space packet data length
|
||||
/// field. If this is not set to true, [PusTc::update_ccsds_data_len] can be called to set
|
||||
/// the correct value to this field manually
|
||||
#[deprecated(
|
||||
since = "0.7.0",
|
||||
note = "Use specialized PusTcCreator or PusTcReader classes instead"
|
||||
)]
|
||||
pub fn new(
|
||||
sp_header: &mut SpHeader,
|
||||
sec_header: PusTcSecondaryHeader,
|
||||
@ -303,12 +303,12 @@ pub mod legacy_tc {
|
||||
pus_tc
|
||||
}
|
||||
|
||||
/// Simplified version of the [PusTc::new] function which allows to only specify service and
|
||||
/// subservice instead of the full PUS TC secondary header.
|
||||
#[deprecated(
|
||||
since = "0.7.0",
|
||||
note = "Use specialized PusTcCreator or PusTcReader classes instead"
|
||||
)]
|
||||
/// Simplified version of the [PusTc::new] function which allows to only specify service and
|
||||
/// subservice instead of the full PUS TC secondary header.
|
||||
pub fn new_simple(
|
||||
sph: &mut SpHeader,
|
||||
service: u8,
|
||||
@ -402,6 +402,10 @@ pub mod legacy_tc {
|
||||
|
||||
/// Create a [PusTc] instance from a raw slice. On success, it returns a tuple containing
|
||||
/// the instance and the found byte length of the packet.
|
||||
#[deprecated(
|
||||
since = "0.7.0",
|
||||
note = "Use specialized PusTcCreator or PusTcReader classes instead"
|
||||
)]
|
||||
pub fn from_bytes(slice: &'raw_data [u8]) -> Result<(Self, usize), PusError> {
|
||||
let raw_data_len = slice.len();
|
||||
if raw_data_len < PUS_TC_MIN_LEN_WITHOUT_APP_DATA {
|
||||
|
@ -378,6 +378,10 @@ pub mod legacy_tm {
|
||||
/// Create a [PusTm] instance from a raw slice. On success, it returns a tuple containing
|
||||
/// the instance and the found byte length of the packet. The timestamp length needs to be
|
||||
/// known beforehand.
|
||||
#[deprecated(
|
||||
since = "0.7.0",
|
||||
note = "Use specialized PusTmCreator or PusTmReader classes instead"
|
||||
)]
|
||||
pub fn from_bytes(
|
||||
slice: &'raw_data [u8],
|
||||
timestamp_len: usize,
|
||||
@ -1209,7 +1213,7 @@ mod tests {
|
||||
writer.finish();
|
||||
// This performs all necessary checks, including the CRC check.
|
||||
let (tm_read_back, tm_size_read_back) =
|
||||
PusTm::from_bytes(&buf, 7).expect("Re-creating PUS TM failed");
|
||||
PusTmReader::new(&buf, 7).expect("Re-creating PUS TM failed");
|
||||
assert_eq!(tm_size_read_back, tm_size);
|
||||
assert_eq!(tm_read_back.msg_counter(), 100);
|
||||
assert_eq!(tm_read_back.dest_id(), 55);
|
||||
|
Loading…
Reference in New Issue
Block a user