Compare commits
6 Commits
cb0ddb1338
...
v0.13.0
Author | SHA1 | Date | |
---|---|---|---|
a03d26a49c | |||
026173514f | |||
2d7ccc0909 | |||
05d3bac927
|
|||
d58df5fee2 | |||
9d23ac5b9b |
@ -8,10 +8,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
# [v0.13.0] 2024-11-08
|
||||||
|
|
||||||
- Bumped MSRV to 1.81.0
|
- Bumped MSRV to 1.81.0
|
||||||
- Bump `zerocopy` to v0.8.0
|
- Bump `zerocopy` to v0.8.0
|
||||||
- Bump `thiserror` to v2.0.0
|
- Bump `thiserror` to v2.0.0
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Migrated all Error implementations to thiserror, improved some naming and error handling in
|
||||||
|
general
|
||||||
|
|
||||||
# [v0.12.0] 2024-09-10
|
# [v0.12.0] 2024-09-10
|
||||||
|
|
||||||
- Bumped MSRV to 1.70.0
|
- Bumped MSRV to 1.70.0
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "spacepackets"
|
name = "spacepackets"
|
||||||
version = "0.12.0"
|
version = "0.13.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.81.0"
|
rust-version = "1.81.0"
|
||||||
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||||
|
@ -42,7 +42,9 @@ pub enum PduError {
|
|||||||
/// Invalid length for the entity ID detected. Only the values 1, 2, 4 and 8 are supported.
|
/// Invalid length for the entity ID detected. Only the values 1, 2, 4 and 8 are supported.
|
||||||
#[error("invalid transaction ID length {0}")]
|
#[error("invalid transaction ID length {0}")]
|
||||||
InvalidTransactionSeqNumLen(u8),
|
InvalidTransactionSeqNumLen(u8),
|
||||||
#[error("missmatch of PDU source ID length {src_id_len} and destination ID length {dest_id_len}")]
|
#[error(
|
||||||
|
"missmatch of PDU source ID length {src_id_len} and destination ID length {dest_id_len}"
|
||||||
|
)]
|
||||||
SourceDestIdLenMissmatch {
|
SourceDestIdLenMissmatch {
|
||||||
src_id_len: usize,
|
src_id_len: usize,
|
||||||
dest_id_len: usize,
|
dest_id_len: usize,
|
||||||
|
@ -273,6 +273,15 @@ pub mod alloc_mod {
|
|||||||
data: Vec::new(),
|
data: Vec::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn as_tlv(&self) -> Tlv<'_> {
|
||||||
|
Tlv {
|
||||||
|
tlv_type_field: self.tlv_type_field,
|
||||||
|
// The API should ensure that the data length is never to large, so the unwrap for the
|
||||||
|
// LV creation should never be an issue.
|
||||||
|
lv: Lv::new(&self.data).expect("lv creation failed unexpectedly"),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ReadableTlv for TlvOwned {
|
impl ReadableTlv for TlvOwned {
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
#[cfg(feature = "alloc")]
|
#[cfg(feature = "alloc")]
|
||||||
use super::TlvOwned;
|
use super::TlvOwned;
|
||||||
use super::{GenericTlv, ReadableTlv, Tlv, TlvLvError, TlvType, TlvTypeField, WritableTlv};
|
use super::{GenericTlv, ReadableTlv, Tlv, TlvLvError, TlvType, TlvTypeField, WritableTlv};
|
||||||
use crate::{cfdp::{InvalidTlvTypeFieldError, TlvLvDataTooLargeError}, ByteConversionError};
|
use crate::{
|
||||||
|
cfdp::{InvalidTlvTypeFieldError, TlvLvDataTooLargeError},
|
||||||
|
ByteConversionError,
|
||||||
|
};
|
||||||
use delegate::delegate;
|
use delegate::delegate;
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||||
@ -65,14 +68,16 @@ impl<'data> MsgToUserTlv<'data> {
|
|||||||
return Err(InvalidTlvTypeFieldError {
|
return Err(InvalidTlvTypeFieldError {
|
||||||
found: tlv_type as u8,
|
found: tlv_type as u8,
|
||||||
expected: Some(TlvType::MsgToUser as u8),
|
expected: Some(TlvType::MsgToUser as u8),
|
||||||
}.into());
|
}
|
||||||
|
.into());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TlvTypeField::Custom(raw) => {
|
TlvTypeField::Custom(raw) => {
|
||||||
return Err(InvalidTlvTypeFieldError {
|
return Err(InvalidTlvTypeFieldError {
|
||||||
found: raw,
|
found: raw,
|
||||||
expected: Some(TlvType::MsgToUser as u8),
|
expected: Some(TlvType::MsgToUser as u8),
|
||||||
}.into());
|
}
|
||||||
|
.into());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(msg_to_user)
|
Ok(msg_to_user)
|
||||||
|
Reference in New Issue
Block a user