some docs and corrections

This commit is contained in:
Robin Müller 2022-11-21 10:39:48 +01:00
parent 607d53942a
commit 6b93a9fce1
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 6 additions and 3 deletions

View File

@ -35,7 +35,7 @@ pub mod stdmod {
use std::sync::atomic::{AtomicU16, Ordering};
use std::sync::Arc;
#[derive(Clone)]
#[derive(Clone, Default)]
pub struct SyncSeqCountProvider {
seq_count: Arc<AtomicU16>,
}

View File

@ -4,7 +4,7 @@ use satrs_core::pus::verification::{
CrossbeamVerifSender, FailParams, RequestId, VerificationReporterCfg,
VerificationReporterWithSender,
};
use satrs_core::seq_count::SimpleSeqCountProvider;
use satrs_core::seq_count::SyncSeqCountProvider;
use spacepackets::ecss::{EcssEnumU16, EcssEnumU8, PusPacket};
use spacepackets::tc::{PusTc, PusTcSecondaryHeader};
use spacepackets::tm::PusTm;
@ -26,9 +26,12 @@ const PACKETS_SENT: u8 = 8;
/// threads have sent the correct expected verification reports
#[test]
fn test_shared_reporter() {
// We use a synced sequence count provider here because both verification reporters have the
// the same APID. If they had distinct APIDs, the more correct approach would be to have
// each reporter have an own sequence count provider.
let cfg = VerificationReporterCfg::new(
TEST_APID,
Box::new(SimpleSeqCountProvider::default()),
Box::new(SyncSeqCountProvider::default()),
1,
2,
8,