clean up code
Some checks failed
Rust/sat-rs/pipeline/pr-main There was a failure building this commit

This commit is contained in:
2024-03-21 13:17:27 +01:00
parent 309d0101a0
commit f5e56c5bf8
8 changed files with 34 additions and 27 deletions

View File

@ -46,7 +46,7 @@ impl<
}
}
pub fn handle_one_tc(
pub fn poll_and_handle_next_tc(
&mut self,
time_stamp: &[u8],
) -> Result<PusPacketHandlerResult, PusPacketHandlingError> {
@ -213,7 +213,7 @@ mod tests {
impl SimplePusPacketHandler for Pus5HandlerWithStoreTester {
fn handle_one_tc(&mut self) -> Result<PusPacketHandlerResult, PusPacketHandlingError> {
let time_stamp = cds::TimeProvider::new_with_u16_days(0, 0).to_vec().unwrap();
self.handler.handle_one_tc(&time_stamp)
self.handler.poll_and_handle_next_tc(&time_stamp)
}
}

View File

@ -73,7 +73,7 @@ impl<
&self.scheduler
}
pub fn handle_one_tc(
pub fn poll_and_handle_next_tc(
&mut self,
time_stamp: &[u8],
sched_tc_pool: &mut (impl PoolProvider + ?Sized),
@ -279,7 +279,7 @@ mod tests {
pub fn handle_one_tc(&mut self) -> Result<PusPacketHandlerResult, PusPacketHandlingError> {
let time_stamp = cds::TimeProvider::new_with_u16_days(0, 0).to_vec().unwrap();
self.handler
.handle_one_tc(&time_stamp, &mut self.sched_tc_pool)
.poll_and_handle_next_tc(&time_stamp, &mut self.sched_tc_pool)
}
}
@ -351,7 +351,7 @@ mod tests {
let time_stamp = cds::TimeProvider::new_with_u16_days(0, 0).to_vec().unwrap();
test_harness
.handler
.handle_one_tc(&time_stamp, &mut test_harness.sched_tc_pool)
.poll_and_handle_next_tc(&time_stamp, &mut test_harness.sched_tc_pool)
.unwrap();
test_harness.check_next_verification_tm(1, request_id);
test_harness.check_next_verification_tm(3, request_id);

View File

@ -47,7 +47,7 @@ impl<
Self { service_helper }
}
pub fn handle_one_tc(
pub fn poll_and_handle_next_tc(
&mut self,
time_stamp: &[u8],
) -> Result<PusPacketHandlerResult, PusPacketHandlingError> {
@ -212,7 +212,7 @@ mod tests {
impl SimplePusPacketHandler for Pus17HandlerWithStoreTester {
fn handle_one_tc(&mut self) -> Result<PusPacketHandlerResult, PusPacketHandlingError> {
let time_stamp = cds::TimeProvider::new_with_u16_days(0, 0).to_vec().unwrap();
self.handler.handle_one_tc(&time_stamp)
self.handler.poll_and_handle_next_tc(&time_stamp)
}
}
@ -254,7 +254,7 @@ mod tests {
impl SimplePusPacketHandler for Pus17HandlerWithVecTester {
fn handle_one_tc(&mut self) -> Result<PusPacketHandlerResult, PusPacketHandlingError> {
let time_stamp = cds::TimeProvider::new_with_u16_days(0, 0).to_vec().unwrap();
self.handler.handle_one_tc(&time_stamp)
self.handler.poll_and_handle_next_tc(&time_stamp)
}
}