From d3aa56a95413f6d5cea647e19a4723229a769df6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 19 Aug 2024 11:03:09 +0200 Subject: [PATCH] use same spacepackets version --- satrs-shared/Cargo.toml | 2 +- satrs/Cargo.toml | 2 +- satrs/src/cfdp/source.rs | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/satrs-shared/Cargo.toml b/satrs-shared/Cargo.toml index 628ffa1..a840192 100644 --- a/satrs-shared/Cargo.toml +++ b/satrs-shared/Cargo.toml @@ -25,7 +25,7 @@ optional = true version = ">0.9" default-features = false git = "https://egit.irs.uni-stuttgart.de/rust/spacepackets" -branch = "all-cfdp-updates" +branch = "main" [features] serde = ["dep:serde", "spacepackets/serde"] diff --git a/satrs/Cargo.toml b/satrs/Cargo.toml index a322896..8e9c11e 100644 --- a/satrs/Cargo.toml +++ b/satrs/Cargo.toml @@ -31,7 +31,7 @@ default-features = false version = "0.12" default-features = false git = "https://egit.irs.uni-stuttgart.de/rust/spacepackets" -branch = "eof-pdu-update" +branch = "main" [dependencies.cobs] git = "https://github.com/robamu/cobs.rs.git" diff --git a/satrs/src/cfdp/source.rs b/satrs/src/cfdp/source.rs index 7a77704..f3d02fa 100644 --- a/satrs/src/cfdp/source.rs +++ b/satrs/src/cfdp/source.rs @@ -352,6 +352,7 @@ impl< } if self.state_helper.step == TransactionStep::NoticeOfCompletion { self.notice_of_completion(cfdp_user); + self.reset(); /* def _notice_of_completion(self): if self.cfg.indication_cfg.transaction_finished_indication_required: @@ -709,6 +710,8 @@ impl< /// This function is public to allow completely resetting the handler, but it is explicitely /// discouraged to do this. CFDP has mechanism to detect issues and errors on itself. + /// Resetting the handler might interfere with these mechanisms and lead to unexpected + /// behaviour. pub fn reset(&mut self) { self.state_helper = Default::default(); self.tstate = None; @@ -767,7 +770,7 @@ mod tests { let fault_handler = TestFaultHandler::default(); let test_sender = TestCfdpSender::default(); let source_handler = default_source_handler(fault_handler, test_sender); - // assert!(dest_handler.transmission_mode().is_none()); + assert!(source_handler.transmission_mode().is_none()); // assert!(fault_handler.all_queues_empty()); } }