optimize PUS stack code
Some checks are pending
Rust/sat-rs/pipeline/head Build started...

This commit is contained in:
2024-05-02 11:58:46 +02:00
parent c586fd7fef
commit a00c843698
5 changed files with 87 additions and 107 deletions

View File

@ -234,6 +234,15 @@ pub trait TargetedPusService {
fn check_for_request_timeouts(&mut self);
}
/// Generic trait for services which handle packets directly. Kept minimal right now because
/// of the difficulty to allow flexible user code for these services..
pub trait DirectPusService {
const SERVICE_ID: u8;
const SERVICE_STR: &'static str;
fn poll_and_handle_next_tc(&mut self, timestamp: &[u8]) -> HandlingStatus;
}
/// This is a generic handler class for all PUS services where a PUS telecommand is converted
/// to a targeted request.
///
@ -524,11 +533,6 @@ pub fn generic_pus_request_timeout_handler(
Ok(())
}
pub trait DirectPusService {
const SERVICE_ID: u8;
const SERVICE_STR: &'static str;
}
#[cfg(test)]
pub(crate) mod tests {
use std::time::Duration;