From 7a2d518a8c77688a45b63a6f6f25a307227efbb0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 25 Jan 2023 10:52:24 +0100 Subject: [PATCH] docs fixes --- satrs-core/src/pus/mod.rs | 13 +++++++------ satrs-core/src/pus/scheduling.rs | 10 +++++++++- satrs-core/src/pus/verification.rs | 2 +- satrs-core/src/seq_count.rs | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/satrs-core/src/pus/mod.rs b/satrs-core/src/pus/mod.rs index 6bbc165..d0c1964 100644 --- a/satrs-core/src/pus/mod.rs +++ b/satrs-core/src/pus/mod.rs @@ -1,8 +1,4 @@ -//! All PUS support modules -//! -//! Currenty includes: -//! -//! 1. PUS Verification Service 1 module inside [verification]. Requires [alloc] support. +//! # PUS support modules #[cfg(feature = "alloc")] use downcast_rs::{impl_downcast, Downcast}; #[cfg(feature = "alloc")] @@ -19,6 +15,9 @@ pub mod hk; pub mod scheduling; pub mod verification; +#[cfg(feature = "alloc")] +pub use alloc_mod::*; + #[derive(Debug, Clone)] pub enum EcssTmErrorWithSend { /// Errors related to sending the verification telemetry to a TM recipient @@ -65,7 +64,7 @@ pub trait EcssTmSenderCore: Send { } #[cfg(feature = "alloc")] -pub mod alloc_mod { +mod alloc_mod { use super::*; /// Extension trait for [EcssTmSenderCore]. @@ -78,6 +77,8 @@ pub mod alloc_mod { /// /// [DynClone] allows cloning the trait object as long as the boxed object implements /// [Clone]. + #[cfg(feature = "alloc")] + #[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))] pub trait EcssTmSender: EcssTmSenderCore + Downcast + DynClone {} /// Blanket implementation for all types which implement [EcssTmSenderCore] and are clonable. diff --git a/satrs-core/src/pus/scheduling.rs b/satrs-core/src/pus/scheduling.rs index 58ae535..2f91483 100644 --- a/satrs-core/src/pus/scheduling.rs +++ b/satrs-core/src/pus/scheduling.rs @@ -1,3 +1,4 @@ +//! # PUS Service 11 Scheduling Module use crate::pool::{PoolProvider, StoreAddr, StoreError}; use alloc::collections::btree_map::{Entry, Range}; use alloc::vec; @@ -10,7 +11,14 @@ use std::time::SystemTimeError; /// This is the core data structure for scheduling PUS telecommands with [alloc] support. /// -/// The ECSS standard specifies that the PUS scheduler can be enabled and disabled. +/// 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. +/// +/// 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 /// but should not release them to be executed. /// diff --git a/satrs-core/src/pus/verification.rs b/satrs-core/src/pus/verification.rs index 8fba721..96c1073 100644 --- a/satrs-core/src/pus/verification.rs +++ b/satrs-core/src/pus/verification.rs @@ -1,4 +1,4 @@ -//! # PUS Verification Service 1 Module +//! # PUS Service 1 Verification Module //! //! This module allows packaging and sending PUS Service 1 packets. It is conforming to section //! 8 of the PUS standard ECSS-E-ST-70-41C. diff --git a/satrs-core/src/seq_count.rs b/satrs-core/src/seq_count.rs index 6871491..b299756 100644 --- a/satrs-core/src/seq_count.rs +++ b/satrs-core/src/seq_count.rs @@ -9,7 +9,7 @@ pub use stdmod::*; /// /// The core functions are not mutable on purpose to allow easier usage with /// static structs when using the interior mutability pattern. This can be achieved by using -/// [Cell], [RefCell] or atomic types. +/// [Cell], [core::cell::RefCell] or atomic types. pub trait SequenceCountProviderCore { fn get(&self) -> Raw;