some docs and corrections
This commit is contained in:
parent
607d53942a
commit
6b93a9fce1
@ -35,7 +35,7 @@ pub mod stdmod {
|
|||||||
use std::sync::atomic::{AtomicU16, Ordering};
|
use std::sync::atomic::{AtomicU16, Ordering};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone, Default)]
|
||||||
pub struct SyncSeqCountProvider {
|
pub struct SyncSeqCountProvider {
|
||||||
seq_count: Arc<AtomicU16>,
|
seq_count: Arc<AtomicU16>,
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ use satrs_core::pus::verification::{
|
|||||||
CrossbeamVerifSender, FailParams, RequestId, VerificationReporterCfg,
|
CrossbeamVerifSender, FailParams, RequestId, VerificationReporterCfg,
|
||||||
VerificationReporterWithSender,
|
VerificationReporterWithSender,
|
||||||
};
|
};
|
||||||
use satrs_core::seq_count::SimpleSeqCountProvider;
|
use satrs_core::seq_count::SyncSeqCountProvider;
|
||||||
use spacepackets::ecss::{EcssEnumU16, EcssEnumU8, PusPacket};
|
use spacepackets::ecss::{EcssEnumU16, EcssEnumU8, PusPacket};
|
||||||
use spacepackets::tc::{PusTc, PusTcSecondaryHeader};
|
use spacepackets::tc::{PusTc, PusTcSecondaryHeader};
|
||||||
use spacepackets::tm::PusTm;
|
use spacepackets::tm::PusTm;
|
||||||
@ -26,9 +26,12 @@ const PACKETS_SENT: u8 = 8;
|
|||||||
/// threads have sent the correct expected verification reports
|
/// threads have sent the correct expected verification reports
|
||||||
#[test]
|
#[test]
|
||||||
fn test_shared_reporter() {
|
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(
|
let cfg = VerificationReporterCfg::new(
|
||||||
TEST_APID,
|
TEST_APID,
|
||||||
Box::new(SimpleSeqCountProvider::default()),
|
Box::new(SyncSeqCountProvider::default()),
|
||||||
1,
|
1,
|
||||||
2,
|
2,
|
||||||
8,
|
8,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user