WIP: Mode Tree #130

Closed
muellerr wants to merge 25 commits from mode-tree-init into main
8 changed files with 1003 additions and 39 deletions
Showing only changes of commit a47bec7ffe - Show all commits

View File

@ -1,3 +1,6 @@
use satrs_shared::res_code::ResultU16;
use spacepackets::util::UnsignedByteField;
use crate::{pool::StoreAddr, TargetId}; use crate::{pool::StoreAddr, TargetId};
pub type ActionId = u32; pub type ActionId = u32;
@ -41,23 +44,18 @@ impl TargetedActionRequest {
} }
} }
/// A reply to an action request. /// A reply to an action request specific to PUS.
#[non_exhaustive] #[non_exhaustive]
#[derive(Clone, Eq, PartialEq, Debug)] #[derive(Clone, Eq, PartialEq, Debug)]
pub enum ActionReply { pub enum ActionReplyPus {
CompletionFailed(ActionId), CompletionFailed {
action_id: ActionId,
error_code: ResultU16,
},
StepFailed { StepFailed {
id: ActionId, id: ActionId,
step: u32, error_code: ResultU16,
step: UnsignedByteField,
}, },
Completed(ActionId), Completed(ActionId),
#[cfg(feature = "alloc")]
CompletedStringId(alloc::string::String),
#[cfg(feature = "alloc")]
CompletionFailedStringId(alloc::string::String),
#[cfg(feature = "alloc")]
StepFailedStringId {
id: alloc::string::String,
step: u32,
},
} }