moved some requests
All checks were successful
Rust/sat-rs/pipeline/head This commit looks good

This commit is contained in:
2024-02-13 11:05:59 +01:00
parent d4a122e462
commit e426a7cef1
7 changed files with 39 additions and 13 deletions

21
satrs/src/action.rs Normal file
View File

@ -0,0 +1,21 @@
use crate::{pool::StoreAddr, tmtc::TargetId};
pub type ActionId = u32;
#[derive(Clone, Eq, PartialEq, Debug)]
pub enum ActionRequest {
ActionIdAndStoreData((ActionId, StoreAddr)),
ActionIdAndVecData((ActionId, alloc::vec::Vec<u8>)),
StringIdAndVecData((alloc::string::String, alloc::vec::Vec<u8>)),
StringIdAndStoreData((alloc::string::String, StoreAddr)),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct TargetedActionRequest {
target: TargetId,
hk_request: ActionRequest,
}
pub trait ActionRequestProvider {
fn route_action_request(&self, targeted_request: TargetedActionRequest);
}

View File

@ -1,3 +1,5 @@
use crate::tmtc::TargetId;
pub type CollectionIntervalFactor = u32;
pub type UniqueId = u32;
@ -11,6 +13,10 @@ pub enum HkRequest {
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct TargetedHkRequest {
target: u32,
target: TargetId,
hk_request: HkRequest,
}
pub trait HkRequestProvider {
fn route_hk_request(&self, targeted_request: TargetedHkRequest);
}

View File

@ -22,6 +22,8 @@ extern crate downcast_rs;
#[cfg(any(feature = "std", test))]
extern crate std;
#[cfg(feature = "alloc")]
pub mod action;
#[cfg(feature = "alloc")]
#[cfg_attr(doc_cfg, doc(cfg(feature = "alloc")))]
pub mod cfdp;

View File

@ -47,12 +47,12 @@ impl ModeAndSubmode {
}
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct ModeCommand {
pub struct TargetedModeCommand {
pub address: TargetId,
pub mode_submode: ModeAndSubmode,
}
impl ModeCommand {
impl TargetedModeCommand {
pub const fn new(address: TargetId, mode_submode: ModeAndSubmode) -> Self {
Self {
address,

View File

@ -1 +1,3 @@
pub trait RequestRouter {
//fn route_request(&self, request: Request);
}