CFDP destination handler #62

Merged
muellerr merged 49 commits from cfdp-state-machines into main 2023-09-21 18:47:07 +02:00
3 changed files with 4 additions and 3 deletions
Showing only changes of commit 520ee17551 - Show all commits

View File

@ -319,6 +319,7 @@ impl DestinationHandler {
Ok(())
}
#[allow(clippy::needless_if)]
pub fn handle_eof_pdu(&mut self, raw_packet: &[u8]) -> Result<(), DestError> {
if self.state == State::Idle || self.step != TransactionStep::ReceivingFileDataPdus {
return Err(DestError::WrongStateForFileDataAndEof);
@ -367,7 +368,6 @@ impl DestinationHandler {
}
fn fsm_nacked(&mut self, cfdp_user: &mut impl CfdpUser) -> Result<(), DestError> {
if self.step == TransactionStep::Idle {}
if self.step == TransactionStep::TransactionStart {
self.transaction_start(cfdp_user)?;
}

View File

@ -1,3 +1,4 @@
#![allow(dead_code)]
use spacepackets::util::UnsignedByteField;
pub struct SourceHandler {

View File

@ -29,7 +29,7 @@ pub trait Executable: Send {
fn periodic_op(&mut self, op_code: i32) -> Result<OpResult, Self::Error>;
}
/// This function allows executing one task which implements the [Executable][Executable] trait
/// This function allows executing one task which implements the [Executable] trait
///
/// # Arguments
///
@ -78,7 +78,7 @@ pub fn exec_sched_single<
}
/// This function allows executing multiple tasks as long as the tasks implement the
/// [Executable][Executable] trait
/// [Executable] trait
///
/// # Arguments
///