Compare commits
5 Commits
add-basic-
...
add-pus-a-
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a294a63b63
|
||
6e2c35e0c0 | |||
![]() |
026e1a50b9
|
||
440b836b70 | |||
![]() |
00e28e4a96
|
16
CHANGELOG.md
16
CHANGELOG.md
@@ -8,6 +8,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
# [unreleased]
|
||||
|
||||
## Changed
|
||||
|
||||
- `PusVersion::VersionNotSupported` contains raw version number instead of `PusVersion` enum now
|
||||
to make it more flexible.
|
||||
|
||||
## Added
|
||||
|
||||
- Added PUS A legacy support for telecommands inside the `ecss.tc_pus_a` module
|
||||
|
||||
# [v0.15.0] 2025-07-18
|
||||
|
||||
## Added
|
||||
|
||||
- `PusTcCreatorWithReservedAppData` and `PusTmCreatorWithReservedSourceData` constructor variants
|
||||
@@ -33,7 +44,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
# [v0.13.1] 2025-03-21
|
||||
|
||||
- Bugfix due to operator precendence for `PusTcSecondaryHeader::pus_version`,
|
||||
- Bugfix due to operator precendence for `PusTcSecondaryHeader::pus_version`,
|
||||
`PusTcSecondaryHeaderWithoutTimestamp::pus_version`, `CdsTime::from_bytes_with_u16_days` and
|
||||
`CdsTime::from_bytes_with_u24_days`
|
||||
|
||||
@@ -591,7 +602,8 @@ The timestamp of `PusTm` is now optional. See Added and Changed section for deta
|
||||
Initial release with CCSDS Space Packet Primary Header implementation and basic PUS TC and TM
|
||||
implementations.
|
||||
|
||||
[unreleased]: https://egit.irs.uni-stuttgart.de/rust/spacepackets/compare/v0.14.0...HEAD
|
||||
[unreleased]: https://egit.irs.uni-stuttgart.de/rust/spacepackets/compare/v0.15.0...HEAD
|
||||
[v0.15.0]: https://egit.irs.uni-stuttgart.de/rust/spacepackets/compare/v0.14.0...v0.15.0
|
||||
[v0.14.0]: https://egit.irs.uni-stuttgart.de/rust/spacepackets/compare/v0.13.1...v0.14.0
|
||||
[v0.13.1]: https://egit.irs.uni-stuttgart.de/rust/spacepackets/compare/v0.13.0...v0.13.1
|
||||
[v0.13.0]: https://egit.irs.uni-stuttgart.de/rust/spacepackets/compare/v0.12.0...v0.13.0
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "spacepackets"
|
||||
version = "0.14.0"
|
||||
version = "0.15.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.70.0"
|
||||
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||
@@ -13,7 +13,7 @@ categories = ["aerospace", "aerospace::space-protocols", "no-std", "hardware-sup
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
crc = "3.3"
|
||||
crc = "3"
|
||||
delegate = ">=0.8, <=0.13"
|
||||
paste = "1"
|
||||
zerocopy = { version = "0.8", features = ["derive"] }
|
||||
|
@@ -19,6 +19,7 @@ pub mod event;
|
||||
pub mod hk;
|
||||
pub mod scheduling;
|
||||
pub mod tc;
|
||||
pub mod tc_pus_a;
|
||||
pub mod tm;
|
||||
pub mod verification;
|
||||
|
||||
@@ -154,7 +155,7 @@ pub enum PfcReal {
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
pub enum PusError {
|
||||
#[error("PUS version {0:?} not supported")]
|
||||
VersionNotSupported(PusVersion),
|
||||
VersionNotSupported(u8),
|
||||
#[error("checksum verification for crc16 {0:#06x} failed")]
|
||||
ChecksumFailure(u16),
|
||||
/// CRC16 needs to be calculated first
|
||||
@@ -536,9 +537,9 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_pus_error_display() {
|
||||
let unsupport_version = PusError::VersionNotSupported(super::PusVersion::EsaPus);
|
||||
let unsupport_version = PusError::VersionNotSupported(super::PusVersion::EsaPus as u8);
|
||||
let write_str = unsupport_version.to_string();
|
||||
assert_eq!(write_str, "PUS version EsaPus not supported")
|
||||
assert_eq!(write_str, "PUS version 0 not supported")
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -572,8 +573,8 @@ mod tests {
|
||||
#[test]
|
||||
fn test_pus_error_eq_impl() {
|
||||
assert_eq!(
|
||||
PusError::VersionNotSupported(PusVersion::EsaPus),
|
||||
PusError::VersionNotSupported(PusVersion::EsaPus)
|
||||
PusError::VersionNotSupported(PusVersion::EsaPus as u8),
|
||||
PusError::VersionNotSupported(PusVersion::EsaPus as u8)
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -104,7 +104,7 @@ pub mod zc {
|
||||
type Error = PusError;
|
||||
fn try_from(value: crate::ecss::tc::PusTcSecondaryHeader) -> Result<Self, Self::Error> {
|
||||
if value.version != PusVersion::PusC {
|
||||
return Err(PusError::VersionNotSupported(value.version));
|
||||
return Err(PusError::VersionNotSupported(value.version as u8));
|
||||
}
|
||||
Ok(PusTcSecondaryHeader {
|
||||
version_ack: ((value.version as u8) << 4) | value.ack,
|
||||
|
1353
src/ecss/tc_pus_a.rs
Normal file
1353
src/ecss/tc_pus_a.rs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -107,7 +107,7 @@ pub mod zc {
|
||||
type Error = PusError;
|
||||
fn try_from(header: crate::ecss::tm::PusTmSecondaryHeader) -> Result<Self, Self::Error> {
|
||||
if header.pus_version != PusVersion::PusC {
|
||||
return Err(PusError::VersionNotSupported(header.pus_version));
|
||||
return Err(PusError::VersionNotSupported(header.pus_version as u8));
|
||||
}
|
||||
Ok(PusTmSecHeaderWithoutTimestamp {
|
||||
pus_version_and_sc_time_ref_status: ((header.pus_version as u8) << 4)
|
||||
|
Reference in New Issue
Block a user