merge main
Some checks are pending
Rust/sat-rs/pipeline/head Build started...

This commit is contained in:
Robin Müller 2024-02-03 13:56:27 +01:00
parent b760d1ea57
commit fe5d178b7f
Signed by: muellerr
GPG Key ID: A649FB78196E3849
5 changed files with 18 additions and 15 deletions

View File

@ -123,5 +123,4 @@ doc-images = []
[package.metadata.docs.rs] [package.metadata.docs.rs]
all-features = true all-features = true
targets = ["x86_64-unknown-linux-gnu"]
rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"] rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]

View File

@ -221,7 +221,7 @@ pub trait PoolProviderMemInPlace {
} }
pub trait PoolProviderMemInPlaceWithGuards: PoolProviderMemInPlace { pub trait PoolProviderMemInPlaceWithGuards: PoolProviderMemInPlace {
/// This function behaves like [PoolProvider::read], but consumes the provided address /// This function behaves like [PoolProviderMemInPlace::read], but consumes the provided address
/// and returns a RAII conformant guard object. /// and returns a RAII conformant guard object.
/// ///
/// Unless the guard [PoolRwGuard::release] method is called, the data for the /// Unless the guard [PoolRwGuard::release] method is called, the data for the
@ -231,8 +231,8 @@ pub trait PoolProviderMemInPlaceWithGuards: PoolProviderMemInPlace {
/// manual deletion is necessary when returning from a processing function prematurely. /// manual deletion is necessary when returning from a processing function prematurely.
fn read_with_guard(&mut self, addr: StoreAddr) -> PoolGuard<Self>; fn read_with_guard(&mut self, addr: StoreAddr) -> PoolGuard<Self>;
/// This function behaves like [PoolProvider::modify], but consumes the provided address /// This function behaves like [PoolProviderMemInPlace::modify], but consumes the provided
/// and returns a RAII conformant guard object. /// address and returns a RAII conformant guard object.
/// ///
/// Unless the guard [PoolRwGuard::release] method is called, the data for the /// Unless the guard [PoolRwGuard::release] method is called, the data for the
/// given address will be deleted automatically when the guard is dropped. /// given address will be deleted automatically when the guard is dropped.

View File

@ -712,7 +712,7 @@ pub mod std_mod {
/// Converter structure for PUS telecommands which are stored inside a `Vec<u8>` structure. /// Converter structure for PUS telecommands which are stored inside a `Vec<u8>` structure.
/// Please note that this structure is not able to convert TCs which are stored inside a /// Please note that this structure is not able to convert TCs which are stored inside a
/// [SharedPool]. /// [SharedStaticMemoryPool].
#[derive(Default, Clone)] #[derive(Default, Clone)]
pub struct EcssTcInVecConverter { pub struct EcssTcInVecConverter {
pub pus_tc_raw: Option<Vec<u8>>, pub pus_tc_raw: Option<Vec<u8>>,
@ -745,9 +745,10 @@ pub mod std_mod {
} }
} }
/// Converter structure for PUS telecommands which are stored inside a [SharedPool] structure. /// Converter structure for PUS telecommands which are stored inside
/// This is useful if run-time allocation for these packets should be avoided. Please note /// [SharedStaticMemoryPool] structure. This is useful if run-time allocation for these
/// that this structure is not able to convert TCs which are stored as a `Vec<u8>`. /// packets should be avoided. Please note that this structure is not able to convert TCs which
/// are stored as a `Vec<u8>`.
pub struct EcssTcInSharedStoreConverter { pub struct EcssTcInSharedStoreConverter {
shared_tc_store: SharedStaticMemoryPool, shared_tc_store: SharedStaticMemoryPool,
pus_buf: Vec<u8>, pus_buf: Vec<u8>,

View File

@ -315,11 +315,11 @@ pub mod alloc_mod {
/// This is the core data structure for scheduling PUS telecommands with [alloc] support. /// This is the core data structure for scheduling PUS telecommands with [alloc] support.
/// ///
/// It is assumed that the actual telecommand data is stored in a separate TC pool offering /// It is assumed that the actual telecommand data is stored in a separate TC pool offering
/// a [crate::pool::PoolProvider] API. This data structure just tracks the store addresses and their /// a [crate::pool::PoolProviderMemInPlace] API. This data structure just tracks the store
/// release times and offers a convenient API to insert and release telecommands and perform /// addresses and their release times and offers a convenient API to insert and release
/// other functionality specified by the ECSS standard in section 6.11. The time is tracked /// telecommands and perform other functionality specified by the ECSS standard in section 6.11.
/// as a [spacepackets::time::UnixTimestamp] but the only requirement to the timekeeping of /// The time is tracked as a [spacepackets::time::UnixTimestamp] but the only requirement to
/// the user is that it is convertible to that timestamp. /// the timekeeping of the user is that it is convertible to that timestamp.
/// ///
/// The standard also specifies that the PUS scheduler can be enabled and disabled. /// The standard also specifies that the PUS scheduler can be enabled and disabled.
/// A disabled scheduler should still delete commands where the execution time has been reached /// A disabled scheduler should still delete commands where the execution time has been reached

View File

@ -1,7 +1,10 @@
#[cfg(feature = "crossbeam")] #[cfg(feature = "crossbeam")]
pub mod crossbeam_test { pub mod crossbeam_test {
use hashbrown::HashMap; use hashbrown::HashMap;
use satrs_core::pool::{PoolProviderMemInPlace, StaticMemoryPool, StaticPoolConfig}; use satrs_core::pool::{
PoolProviderMemInPlace, PoolProviderMemInPlaceWithGuards, StaticMemoryPool,
StaticPoolConfig,
};
use satrs_core::pus::verification::{ use satrs_core::pus::verification::{
FailParams, RequestId, VerificationReporterCfg, VerificationReporterWithSender, FailParams, RequestId, VerificationReporterCfg, VerificationReporterWithSender,
}; };
@ -34,7 +37,7 @@ pub mod crossbeam_test {
let cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, 8).unwrap(); let cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, 8).unwrap();
// Shared pool object to store the verification PUS telemetry // Shared pool object to store the verification PUS telemetry
let pool_cfg = StaticPoolConfig::new(vec![(10, 32), (10, 64), (10, 128), (10, 1024)]); let pool_cfg = StaticPoolConfig::new(vec![(10, 32), (10, 64), (10, 128), (10, 1024)]);
let shared_tm_store = SharedTmStore::new(Box::new(StaticMemoryPool::new(pool_cfg.clone()))); let shared_tm_store = SharedTmStore::new(StaticMemoryPool::new(pool_cfg.clone()));
let shared_tc_pool_0 = Arc::new(RwLock::new(StaticMemoryPool::new(pool_cfg))); let shared_tc_pool_0 = Arc::new(RwLock::new(StaticMemoryPool::new(pool_cfg)));
let shared_tc_pool_1 = shared_tc_pool_0.clone(); let shared_tc_pool_1 = shared_tc_pool_0.clone();
let (tx, rx) = crossbeam_channel::bounded(10); let (tx, rx) = crossbeam_channel::bounded(10);