start adding CFDP state machines
Some checks failed
Rust/sat-rs/pipeline/head There was a failure building this commit
Some checks failed
Rust/sat-rs/pipeline/head There was a failure building this commit
This commit is contained in:
parent
698c2edb93
commit
0e2a413505
13
satrs-core/src/cfdp/dest.rs
Normal file
13
satrs-core/src/cfdp/dest.rs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
use super::{TransactionStep, State};
|
||||||
|
|
||||||
|
pub struct DestinationHandler {
|
||||||
|
step: TransactionStep,
|
||||||
|
state: State
|
||||||
|
}
|
||||||
|
|
||||||
|
impl DestinationHandler {
|
||||||
|
|
||||||
|
pub fn state_machine() {}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
25
satrs-core/src/cfdp/mod.rs
Normal file
25
satrs-core/src/cfdp/mod.rs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
pub mod dest;
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, PartialEq, Eq)]
|
||||||
|
pub enum TransactionStep {
|
||||||
|
Idle = 0,
|
||||||
|
TransactionStart = 1,
|
||||||
|
ReceivingFileDataPdus = 2,
|
||||||
|
SendingAckPdu = 3,
|
||||||
|
TransferCompletion = 4,
|
||||||
|
SendingFinishedPdu = 5
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, PartialEq, Eq)]
|
||||||
|
pub enum State {
|
||||||
|
Idle = 0,
|
||||||
|
BusyClass1Nacked = 2,
|
||||||
|
BusyClass2Acked = 3,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
#[test]
|
||||||
|
fn basic_test() {
|
||||||
|
}
|
||||||
|
}
|
@ -40,6 +40,7 @@ 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