doc update
All checks were successful
Rust/sat-rs/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2024-02-02 00:06:17 +01:00
parent 145b50347d
commit 317a3b833d
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 25 additions and 25 deletions

View File

@ -1,16 +1,6 @@
//! # Pool implementation providing pre-allocated sub-pools with fixed size memory blocks
//! # Pool implementation providing memory pools for packet storage.
//!
//! This is a simple memory pool implementation which pre-allocates all sub-pools using a given pool
//! configuration. After the pre-allocation, no dynamic memory allocation will be performed
//! during run-time. This makes the implementation suitable for real-time applications and
//! embedded environments. The pool implementation will also track the size of the data stored
//! inside it.
//!
//! Transactions with the [pool][LocalPool] are done using a special [address][StoreAddr] type.
//! Adding any data to the pool will yield a store address. Modification and read operations are
//! done using a reference to a store address. Deletion will consume the store address.
//!
//! # Example
//! # Example for the [StaticMemoryPool]
//!
//! ```
//! use satrs_core::pool::{StaticMemoryPool, StaticPoolConfig, PoolProvider};
@ -247,7 +237,7 @@ mod alloc_mod {
const STORE_FREE: PoolSize = PoolSize::MAX;
pub const POOL_MAX_SIZE: PoolSize = STORE_FREE - 1;
/// Configuration structure of the [local pool][LocalPool]
/// Configuration structure of the [static memory pool][StaticMemoryPool]
///
/// # Parameters
///
@ -341,8 +331,8 @@ mod alloc_mod {
}
pub trait PoolProviderWithGuards: PoolProvider {
/// This function behaves like [Self::read], but consumes the provided address and returns a
/// RAII conformant guard object.
/// This function behaves like [PoolProvider::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
/// given address will be deleted automatically when the guard is dropped.
@ -351,8 +341,8 @@ mod alloc_mod {
/// manual deletion is necessary when returning from a processing function prematurely.
fn read_with_guard(&mut self, addr: StoreAddr) -> PoolGuard;
/// This function behaves like [Self::modify], but consumes the provided address and returns a
/// RAII conformant guard object.
/// This function behaves like [PoolProvider::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.
@ -362,8 +352,18 @@ mod alloc_mod {
fn modify_with_guard(&mut self, addr: StoreAddr) -> PoolRwGuard;
}
/// Pool implementation providing sub-pools with fixed size memory blocks. More details in
/// the [module documentation][crate::pool]
/// Pool implementation providing sub-pools with fixed size memory blocks.
///
/// This is a simple memory pool implementation which pre-allocates all sub-pools using a given pool
/// configuration. After the pre-allocation, no dynamic memory allocation will be performed
/// during run-time. This makes the implementation suitable for real-time applications and
/// embedded environments. The pool implementation will also track the size of the data stored
/// inside it.
///
/// Transactions with the [pool][StaticMemoryPool] are done using a generic
/// [address][StoreAddr] type.
/// Adding any data to the pool will yield a store address. Modification and read operations are
/// done using a reference to a store address. Deletion will consume the store address.
pub struct StaticMemoryPool {
pool_cfg: StaticPoolConfig,
pool: Vec<Vec<u8>>,
@ -371,8 +371,8 @@ mod alloc_mod {
}
impl StaticMemoryPool {
/// Create a new local pool from the [given configuration][PoolCfg]. This function will sanitize
/// the given configuration as well.
/// Create a new local pool from the [given configuration][StaticPoolConfig]. This function
/// will sanitize the given configuration as well.
pub fn new(mut cfg: StaticPoolConfig) -> StaticMemoryPool {
let subpools_num = cfg.sanitize();
let mut local_pool = StaticMemoryPool {

View File

@ -195,8 +195,8 @@ pub trait EcssTcSenderCore: EcssChannel {
}
/// A PUS telecommand packet can be stored in memory using different methods. Right now,
/// storage inside a pool structure like [LocalPool], and storage inside a `Vec<u8>` are
/// supported.
/// storage inside a pool structure like [crate::pool::StaticMemoryPool], and storage inside a
/// `Vec<u8>` are supported.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum TcInMemory {

View File

@ -6,8 +6,8 @@ use spacepackets::ecss::{scheduling, PusPacket};
use spacepackets::time::cds::TimeProvider;
/// This is a helper class for [std] environments to handle generic PUS 11 (scheduling service)
/// packets. This handler is constrained to using the [PusScheduler], but is able to process
/// the most important PUS requests for a scheduling service.
/// packets. This handler is able to handle the most important PUS requests for a scheduling
/// service which provides the [PusSchedulerInterface].
///
/// Please note that this class does not do the regular periodic handling like releasing any
/// telecommands inside the scheduler. The user can retrieve the wrapped scheduler via the