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

This commit is contained in:
Robin Müller 2024-02-26 10:46:27 +01:00
parent 97a8035333
commit 7380a3b24c
Signed by: muellerr
GPG Key ID: A649FB78196E3849
3 changed files with 11 additions and 17 deletions

View File

@ -7,7 +7,7 @@ use spacepackets::ByteConversionError;
use std::error::Error;
use std::path::Path;
#[cfg(feature = "std")]
pub use stdmod::*;
pub use std_mod::*;
pub const CRC_32: Crc<u32> = Crc::<u32>::new(&CRC_32_CKSUM);
@ -148,12 +148,11 @@ pub trait VirtualFilestore {
}
#[cfg(feature = "std")]
pub mod stdmod {
pub mod std_mod {
use super::*;
use std::{
fs::{self, File, OpenOptions},
io::{BufReader, Read, Seek, SeekFrom, Write},
path::Path,
};
#[derive(Default)]

View File

@ -429,10 +429,7 @@ pub mod alloc_mod {
#[cfg(feature = "std")]
pub mod std_mod {
use super::*;
use crate::event_man::{EventReceiveProvider, EventWithAuxData};
use crate::events::{EventU16, EventU32, GenericEvent};
use crate::params::Params;
use std::sync::mpsc::{self};
use std::sync::mpsc;
pub struct MpscEventReceiver<Event: GenericEvent + Send = EventU32> {
mpsc_receiver: mpsc::Receiver<(Event, Option<Params>)>,

View File

@ -952,13 +952,11 @@ impl VerificationReporterCore {
#[cfg(feature = "alloc")]
pub mod alloc_mod {
use super::*;
use crate::pus::{TmAsVecSenderWithId, TmInSharedPoolSenderWithId};
use crate::seq_count::SequenceCountProvider;
use alloc::boxed::Box;
use alloc::vec;
use alloc::vec::Vec;
use crate::{
pus::{TmAsVecSenderWithId, TmInSharedPoolSenderWithId},
seq_count::SequenceCountProvider,
};
use core::cell::RefCell;
use spacepackets::ecss::tc::IsPusTelecommand;
#[derive(Clone)]
pub struct VerificationReporterCfg {
@ -993,9 +991,9 @@ pub mod alloc_mod {
/// TM funnel. This helper will always set those fields to 0.
#[derive(Clone)]
pub struct VerificationReporter {
source_data_buf: RefCell<Vec<u8>>,
pub seq_count_provider: Option<Box<dyn SequenceCountProvider<u16> + Send>>,
pub msg_count_provider: Option<Box<dyn SequenceCountProvider<u16> + Send>>,
source_data_buf: RefCell<alloc::vec::Vec<u8>>,
pub seq_count_provider: Option<alloc::boxed::Box<dyn SequenceCountProvider<u16> + Send>>,
pub msg_count_provider: Option<alloc::boxed::Box<dyn SequenceCountProvider<u16> + Send>>,
pub reporter: VerificationReporterCore,
}
@ -1003,7 +1001,7 @@ pub mod alloc_mod {
pub fn new(cfg: &VerificationReporterCfg) -> Self {
let reporter = VerificationReporterCore::new(cfg.apid).unwrap();
Self {
source_data_buf: RefCell::new(vec![
source_data_buf: RefCell::new(alloc::vec![
0;
RequestId::SIZE_AS_BYTES
+ cfg.step_field_width