Compare commits
3 Commits
satrs-shar
...
move-to-cc
| Author | SHA1 | Date | |
|---|---|---|---|
| fef8d6a792 | |||
| b2bc87641c | |||
|
|
c8245772bb |
@@ -29,11 +29,6 @@ rtic = { version = "2", features = ["thumbv7-backend"] }
|
||||
rtic-sync = { version = "1" }
|
||||
rtic-monotonics = { version = "2", features = ["cortex-m-systick"] }
|
||||
|
||||
#[dependencies.satrs]
|
||||
# path = "../../satrs"
|
||||
#default-features = false
|
||||
# features = ["defmt"]
|
||||
|
||||
[dev-dependencies]
|
||||
defmt-test = "0.4"
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ features = ["cortex-m-systick"]
|
||||
|
||||
[dependencies.satrs]
|
||||
path = "../../satrs"
|
||||
# version = "0.2"
|
||||
default-features = false
|
||||
features = ["defmt", "heapless"]
|
||||
|
||||
|
||||
@@ -26,16 +26,9 @@ bitbybit = "1.4"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
|
||||
[dependencies.satrs]
|
||||
path = "../satrs"
|
||||
features = ["test_util"]
|
||||
|
||||
[dependencies.satrs-minisim]
|
||||
path = "../satrs-minisim"
|
||||
|
||||
[dependencies.satrs-mib]
|
||||
version = "0.1.1"
|
||||
path = "../satrs-mib"
|
||||
satrs = { path = "../satrs", features = ["test_util"] }
|
||||
satrs-minisim = { path = "../satrs-minisim" }
|
||||
satrs-mib = { path = "../satrs-mib" }
|
||||
|
||||
[features]
|
||||
default = ["heap_tmtc"]
|
||||
|
||||
@@ -39,6 +39,7 @@ pub fn create_verification_reporter(owner_id: ComponentId, apid: Apid) -> Verifi
|
||||
VerificationReporter::new(owner_id, &verif_cfg)
|
||||
}
|
||||
|
||||
/*
|
||||
/// Simple router structure which forwards PUS telecommands to dedicated handlers.
|
||||
pub struct PusTcMpscRouter {
|
||||
pub test_tc_sender: mpsc::SyncSender<EcssTcAndToken>,
|
||||
@@ -187,6 +188,7 @@ impl PusTcDistributor {
|
||||
Ok(HandlingStatus::HandledOne)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
pub trait TargetedPusService {
|
||||
const SERVICE_ID: u8;
|
||||
@@ -18,6 +18,7 @@ use interface::{
|
||||
};
|
||||
use log::info;
|
||||
use logger::setup_logger;
|
||||
/*
|
||||
use pus::{
|
||||
action::create_action_service,
|
||||
event::create_event_service,
|
||||
@@ -28,6 +29,7 @@ use pus::{
|
||||
test::create_test_service,
|
||||
PusTcDistributor, PusTcMpscRouter,
|
||||
};
|
||||
*/
|
||||
use requests::GenericRequestRouter;
|
||||
use satrs::{
|
||||
hal::std::{tcp_server::ServerConfig, udp_server::UdpTcServer},
|
||||
@@ -78,7 +80,7 @@ mod events;
|
||||
mod hk;
|
||||
mod interface;
|
||||
mod logger;
|
||||
mod pus;
|
||||
//mod pus;
|
||||
mod requests;
|
||||
mod spi;
|
||||
mod tmtc;
|
||||
@@ -177,6 +179,7 @@ fn main() {
|
||||
let tc_releaser = TcReleaser::Heap(tc_source_tx.clone());
|
||||
}
|
||||
}
|
||||
/*
|
||||
let pus_router = PusTcMpscRouter {
|
||||
test_tc_sender: pus_test_tx,
|
||||
event_tc_sender: pus_event_tx,
|
||||
@@ -233,6 +236,7 @@ fn main() {
|
||||
pus_scheduler_service,
|
||||
pus_mode_service,
|
||||
);
|
||||
*/
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(not(feature = "heap_tmtc"))] {
|
||||
|
||||
@@ -2,8 +2,12 @@ use satrs::{
|
||||
pool::PoolProvider,
|
||||
pus::HandlingStatus,
|
||||
tmtc::{PacketAsVec, PacketInPool, SharedPacketPool},
|
||||
ComponentId,
|
||||
};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
sync::mpsc::{self, TryRecvError},
|
||||
};
|
||||
use std::sync::mpsc::{self, TryRecvError};
|
||||
|
||||
use crate::pus::PusTcDistributor;
|
||||
|
||||
@@ -65,18 +69,24 @@ impl TcSourceTaskStatic {
|
||||
}
|
||||
}
|
||||
|
||||
pub type CcsdsDistributorDyn = HashMap<ComponentId, std::sync::mpsc::SyncSender<PacketAsVec>>;
|
||||
pub type CcsdsDistributorStatic = HashMap<ComponentId, std::sync::mpsc::SyncSender<PacketInPool>>;
|
||||
|
||||
// TC source components where the heap is the backing memory of the received telecommands.
|
||||
pub struct TcSourceTaskDynamic {
|
||||
pub tc_receiver: mpsc::Receiver<PacketAsVec>,
|
||||
pus_distributor: PusTcDistributor,
|
||||
ccsds_distributor: CcsdsDistributorDyn,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl TcSourceTaskDynamic {
|
||||
pub fn new(tc_receiver: mpsc::Receiver<PacketAsVec>, pus_receiver: PusTcDistributor) -> Self {
|
||||
pub fn new(
|
||||
tc_receiver: mpsc::Receiver<PacketAsVec>,
|
||||
ccsds_distributor: CcsdsDistributorDyn,
|
||||
) -> Self {
|
||||
Self {
|
||||
tc_receiver,
|
||||
pus_distributor: pus_receiver,
|
||||
ccsds_distributor,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "satrs"
|
||||
version = "0.3.0-alpha.2"
|
||||
version = "0.3.0-alpha.3"
|
||||
edition = "2024"
|
||||
rust-version = "1.85.0"
|
||||
authors = ["Robin Mueller <muellerr@irs.uni-stuttgart.de>"]
|
||||
|
||||
Reference in New Issue
Block a user