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