This commit is contained in:
parent
0e2a413505
commit
beebf00565
@ -1,13 +1,25 @@
|
|||||||
use super::{TransactionStep, State};
|
use spacepackets::cfdp::{pdu::FileDirectiveType, PduType};
|
||||||
|
|
||||||
|
use super::{State, TransactionStep};
|
||||||
|
|
||||||
pub struct DestinationHandler {
|
pub struct DestinationHandler {
|
||||||
step: TransactionStep,
|
step: TransactionStep,
|
||||||
state: State
|
state: State,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl DestinationHandler {
|
impl DestinationHandler {
|
||||||
|
pub fn insert_packet(
|
||||||
pub fn state_machine() {}
|
&mut self,
|
||||||
|
pdu_type: PduType,
|
||||||
|
pdu_directive: Option<FileDirectiveType>,
|
||||||
|
raw_packet: &[u8],
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
pub fn state_machine(&mut self) {
|
||||||
|
match self.state {
|
||||||
|
State::Idle => todo!(),
|
||||||
|
State::BusyClass1Nacked => todo!(),
|
||||||
|
State::BusyClass2Acked => todo!(),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ pub enum TransactionStep {
|
|||||||
ReceivingFileDataPdus = 2,
|
ReceivingFileDataPdus = 2,
|
||||||
SendingAckPdu = 3,
|
SendingAckPdu = 3,
|
||||||
TransferCompletion = 4,
|
TransferCompletion = 4,
|
||||||
SendingFinishedPdu = 5
|
SendingFinishedPdu = 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Eq)]
|
#[derive(Copy, Clone, PartialEq, Eq)]
|
||||||
@ -20,6 +20,5 @@ pub enum State {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn basic_test() {
|
fn basic_test() {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ extern crate downcast_rs;
|
|||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
extern crate std;
|
extern crate std;
|
||||||
|
|
||||||
|
pub mod cfdp;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
#[cfg(feature = "alloc")]
|
#[cfg(feature = "alloc")]
|
||||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
|
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
|
||||||
@ -40,7 +41,6 @@ pub mod request;
|
|||||||
pub mod res_code;
|
pub mod res_code;
|
||||||
pub mod seq_count;
|
pub mod seq_count;
|
||||||
pub mod tmtc;
|
pub mod tmtc;
|
||||||
pub mod cfdp;
|
|
||||||
|
|
||||||
pub use spacepackets;
|
pub use spacepackets;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user