CFDP initial packet support #14
@ -0,0 +1,38 @@
|
|||||||
|
use num_enum::{IntoPrimitive, TryFromPrimitive};
|
||||||
|
#[cfg(feature = "serde")]
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
pub const CFDP_VERSION_2_NAME: &str = "CCSDS 727.0-B-5";
|
||||||
|
pub const CFDP_VERSION_2: u8 = 0b001;
|
||||||
|
|
||||||
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, TryFromPrimitive, IntoPrimitive)]
|
||||||
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
|
#[repr(u8)]
|
||||||
|
pub enum PduType {
|
||||||
|
FileDirective = 0,
|
||||||
|
FileData = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, TryFromPrimitive, IntoPrimitive)]
|
||||||
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
|
#[repr(u8)]
|
||||||
|
pub enum Direction {
|
||||||
|
TowardsReceiver = 0,
|
||||||
|
TowardsSender = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, TryFromPrimitive, IntoPrimitive)]
|
||||||
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
|
#[repr(u8)]
|
||||||
|
pub enum TransmissionMode {
|
||||||
|
Acknowledged = 0,
|
||||||
|
Unacknowledged = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, TryFromPrimitive, IntoPrimitive)]
|
||||||
|
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
|
||||||
|
#[repr(u8)]
|
||||||
|
pub enum CrcFlag {
|
||||||
|
NoCrc = 0,
|
||||||
|
WithCrc = 1,
|
||||||
|
}
|
@ -68,6 +68,7 @@ use std::error::Error;
|
|||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
pub mod cfdp;
|
||||||
pub mod ecss;
|
pub mod ecss;
|
||||||
pub mod tc;
|
pub mod tc;
|
||||||
pub mod time;
|
pub mod time;
|
||||||
|
Loading…
Reference in New Issue
Block a user