diff --git a/satrs-example/src/pus/action.rs b/satrs-example/src/pus/action.rs index 75a5411..9ce9891 100644 --- a/satrs-example/src/pus/action.rs +++ b/satrs-example/src/pus/action.rs @@ -437,13 +437,13 @@ mod tests { pub fn verify_next_reply_is_handled_properly(&mut self, time_stamp: &[u8]) { let result = self.service.poll_and_check_next_reply(time_stamp); assert!(result.is_ok()); - assert!(!result.unwrap()); + assert_eq!(result.unwrap(), HandlingStatus::HandledOne); } pub fn verify_all_replies_handled(&mut self, time_stamp: &[u8]) { let result = self.service.poll_and_check_next_reply(time_stamp); assert!(result.is_ok()); - assert!(result.unwrap()); + assert_eq!(result.unwrap(), HandlingStatus::Empty); } pub fn add_tc(&mut self, tc: &PusTcCreator) { diff --git a/satrs/src/pus/verification.rs b/satrs/src/pus/verification.rs index e790b43..0678e68 100644 --- a/satrs/src/pus/verification.rs +++ b/satrs/src/pus/verification.rs @@ -39,7 +39,7 @@ //! let (verif_tx, verif_rx) = mpsc::channel(); //! let sender = MpscTmInSharedPoolSender::new(shared_tm_store, verif_tx); //! let cfg = VerificationReporterCfg::new(TEST_APID, 1, 2, 8).unwrap(); -//! let mut reporter = VerificationReporter::new(&cfg); +//! let mut reporter = VerificationReporter::new(TEST_COMPONENT_ID.id(), &cfg); //! //! let mut sph = SpHeader::tc_unseg(TEST_APID, 0, 0).unwrap(); //! let tc_header = PusTcSecondaryHeader::new_simple(17, 1); @@ -47,9 +47,9 @@ //! let init_token = reporter.add_tc(&pus_tc_0); //! //! // Complete success sequence for a telecommand -//! let accepted_token = reporter.acceptance_success(TEST_COMPONENT_ID.id(), &sender, init_token, &EMPTY_STAMP).unwrap(); -//! let started_token = reporter.start_success(TEST_COMPONENT_ID.id(), &sender, accepted_token, &EMPTY_STAMP).unwrap(); -//! reporter.completion_success(TEST_COMPONENT_ID.id(), &sender, started_token, &EMPTY_STAMP).unwrap(); +//! let accepted_token = reporter.acceptance_success(&sender, init_token, &EMPTY_STAMP).unwrap(); +//! let started_token = reporter.start_success(&sender, accepted_token, &EMPTY_STAMP).unwrap(); +//! reporter.completion_success(&sender, started_token, &EMPTY_STAMP).unwrap(); //! //! // Verify it arrives correctly on receiver end //! let mut tm_buf: [u8; 1024] = [0; 1024];