From 15bc12aede5210b695c08b4c82650600b372ac4a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 12 Jun 2023 04:02:18 +0200 Subject: [PATCH] that should be sufficient for the first FSM approach --- src/cfdp/tlv.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/cfdp/tlv.rs b/src/cfdp/tlv.rs index d7a7376..3a44b0b 100644 --- a/src/cfdp/tlv.rs +++ b/src/cfdp/tlv.rs @@ -30,6 +30,21 @@ pub enum TlvTypeField { Custom(u8), } +#[derive(Debug, Copy, Clone, PartialEq, Eq, TryFromPrimitive, IntoPrimitive)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[repr(u8)] +pub enum FsRequestActionCode { + CreateFile = 0b0000, + DeleteFile = 0b0001, + RenameFile = 0b0010, + AppendFile = 0b0011, + ReplaceFile = 0b0100, + CreateDirectory = 0b0101, + RemoveDirectory = 0b0110, + DenyFile = 0b0111, + DenyDirectory = 0b1000, +} + impl From for TlvTypeField { fn from(value: u8) -> Self { match TlvType::try_from(value) {