This commit is contained in:
parent
b760d1ea57
commit
fe5d178b7f
@ -123,5 +123,4 @@ doc-images = []
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]
|
||||
|
@ -221,7 +221,7 @@ pub trait 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.
|
||||
///
|
||||
/// 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.
|
||||
fn read_with_guard(&mut self, addr: StoreAddr) -> PoolGuard<Self>;
|
||||
|
||||
/// This function behaves like [PoolProvider::modify], but consumes the provided address
|
||||
/// and returns a RAII conformant guard object.
|
||||
/// This function behaves like [PoolProviderMemInPlace::modify], but consumes the provided
|
||||
/// address and returns a RAII conformant guard object.
|
||||
///
|
||||
/// Unless the guard [PoolRwGuard::release] method is called, the data for the
|
||||
/// given address will be deleted automatically when the guard is dropped.
|
||||
|
@ -712,7 +712,7 @@ pub mod std_mod {
|
||||
|
||||
/// 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
|
||||
/// [SharedPool].
|
||||
/// [SharedStaticMemoryPool].
|
||||
#[derive(Default, Clone)]
|
||||
pub struct EcssTcInVecConverter {
|
||||
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.
|
||||
/// This is useful if run-time allocation for these packets should be avoided. Please note
|
||||
/// that this structure is not able to convert TCs which are stored as a `Vec<u8>`.
|
||||
/// Converter structure for PUS telecommands which are stored inside
|
||||
/// [SharedStaticMemoryPool] structure. This is useful if run-time allocation for these
|
||||
/// 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 {
|
||||
shared_tc_store: SharedStaticMemoryPool,
|
||||
pus_buf: Vec<u8>,
|
||||
|
@ -315,11 +315,11 @@ pub mod alloc_mod {
|
||||
/// 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
|
||||
/// a [crate::pool::PoolProvider] API. This data structure just tracks the store addresses and their
|
||||
/// release times and offers a convenient API to insert and release telecommands and perform
|
||||
/// other functionality specified by the ECSS standard in section 6.11. The time is tracked
|
||||
/// as a [spacepackets::time::UnixTimestamp] but the only requirement to the timekeeping of
|
||||
/// the user is that it is convertible to that timestamp.
|
||||
/// a [crate::pool::PoolProviderMemInPlace] API. This data structure just tracks the store
|
||||
/// addresses and their release times and offers a convenient API to insert and release
|
||||
/// telecommands and perform other functionality specified by the ECSS standard in section 6.11.
|
||||
/// The time is tracked as a [spacepackets::time::UnixTimestamp] but the only requirement to
|
||||
/// 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.
|
||||
/// A disabled scheduler should still delete commands where the execution time has been reached
|
||||
|
@ -1,7 +1,10 @@
|
||||
#[cfg(feature = "crossbeam")]
|
||||
pub mod crossbeam_test {
|
||||
use hashbrown::HashMap;
|
||||
use satrs_core::pool::{PoolProviderMemInPlace, StaticMemoryPool, StaticPoolConfig};
|
||||
use satrs_core::pool::{
|
||||
PoolProviderMemInPlace, PoolProviderMemInPlaceWithGuards, StaticMemoryPool,
|
||||
StaticPoolConfig,
|
||||
};
|
||||
use satrs_core::pus::verification::{
|
||||
FailParams, RequestId, VerificationReporterCfg, VerificationReporterWithSender,
|
||||
};
|
||||
@ -34,7 +37,7 @@ pub mod crossbeam_test {
|
||||
let cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, 8).unwrap();
|
||||
// Shared pool object to store the verification PUS telemetry
|
||||
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_1 = shared_tc_pool_0.clone();
|
||||
let (tx, rx) = crossbeam_channel::bounded(10);
|
||||
|
Loading…
Reference in New Issue
Block a user