trying to avoid locking whole verification reporter
This commit is contained in:
@ -13,9 +13,7 @@ use satrs_core::pus::event_man::{
|
||||
DefaultPusMgmtBackendProvider, EventReporter, EventRequest, EventRequestWithToken,
|
||||
PusEventDispatcher,
|
||||
};
|
||||
use satrs_core::pus::verification::{
|
||||
MpscVerifSender, VerificationReporterCfg, VerificationReporterWithSender,
|
||||
};
|
||||
use satrs_core::pus::verification::{MpscVerifSender, VerificationReporterCfg, VerificationReporterWithSender};
|
||||
use satrs_core::pus::{EcssTmError, EcssTmSender};
|
||||
use satrs_core::tmtc::CcsdsError;
|
||||
use satrs_example::{OBSW_SERVER_ADDR, SERVER_PORT};
|
||||
@ -25,6 +23,7 @@ use std::net::{IpAddr, SocketAddr};
|
||||
use std::sync::mpsc::channel;
|
||||
use std::sync::{mpsc, Arc, Mutex, RwLock};
|
||||
use std::thread;
|
||||
use satrs_core::seq_count::SimpleSeqCountProvider;
|
||||
|
||||
struct TmFunnel {
|
||||
tm_funnel_rx: mpsc::Receiver<StoreAddr>,
|
||||
@ -73,9 +72,9 @@ fn main() {
|
||||
let (tm_funnel_tx, tm_funnel_rx) = channel();
|
||||
let (tm_server_tx, tm_server_rx) = channel();
|
||||
let sender = MpscVerifSender::new(tm_store.clone(), tm_funnel_tx.clone());
|
||||
let verif_cfg = VerificationReporterCfg::new(PUS_APID, 1, 2, 8).unwrap();
|
||||
let verif_cfg = VerificationReporterCfg::new(PUS_APID, Box::new(SimpleSeqCountProvider::default()), 1, 2, 8).unwrap();
|
||||
let reporter_with_sender_0 = Arc::new(Mutex::new(VerificationReporterWithSender::new(
|
||||
verif_cfg,
|
||||
&verif_cfg,
|
||||
Box::new(sender),
|
||||
)));
|
||||
|
||||
|
Reference in New Issue
Block a user