From 977ff1d4beb81de6127844408781b2c8581c222a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 21 Jan 2026 16:01:07 +0100 Subject: [PATCH] some more minor improvements --- satrs-example/client/src/main.rs | 4 ++-- satrs-example/models/src/lib.rs | 1 - satrs-example/src/eps/pcdu.rs | 2 +- satrs-example/src/main.rs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/satrs-example/client/src/main.rs b/satrs-example/client/src/main.rs index 2257837..8294107 100644 --- a/satrs-example/client/src/main.rs +++ b/satrs-example/client/src/main.rs @@ -78,6 +78,7 @@ fn main() -> anyhow::Result<()> { } let mut recv_buf: Box<[u8; 2048]> = Box::new([0; 2048]); + log::info!("entering listening loop"); loop { if kill_signal.load(std::sync::atomic::Ordering::Relaxed) { log::info!("received kill signal, exiting"); @@ -132,7 +133,7 @@ fn handle_raw_tm_packet(data: &[u8]) -> anyhow::Result<()> { return Ok(()); } match tm_header.sender_id { - models::ComponentId::Pcdu => { + models::ComponentId::EpsPcdu => { let response = postcard::from_bytes::(remainder); log::info!("Received response from PCDU: {:?}", response.unwrap()); @@ -147,7 +148,6 @@ fn handle_raw_tm_packet(data: &[u8]) -> anyhow::Result<()> { models::ComponentId::AcsMgm0 => todo!(), models::ComponentId::AcsMgm1 => todo!(), models::ComponentId::EpsSubsystem => todo!(), - models::ComponentId::EpsPcdu => todo!(), models::ComponentId::UdpServer => todo!(), models::ComponentId::TcpServer => todo!(), models::ComponentId::Ground => todo!(), diff --git a/satrs-example/models/src/lib.rs b/satrs-example/models/src/lib.rs index 474f2ed..0eb97a4 100644 --- a/satrs-example/models/src/lib.rs +++ b/satrs-example/models/src/lib.rs @@ -23,7 +23,6 @@ pub mod pcdu; )] #[repr(u64)] pub enum ComponentId { - Pcdu, Controller, AcsSubsystem, diff --git a/satrs-example/src/eps/pcdu.rs b/satrs-example/src/eps/pcdu.rs index dc17433..99b07ad 100644 --- a/satrs-example/src/eps/pcdu.rs +++ b/satrs-example/src/eps/pcdu.rs @@ -396,7 +396,7 @@ impl PcduHandler { } pub fn send_tm(&self, tc_id: Option, response: pcdu::response::Response) { - match pack_ccsds_tm_packet_for_now(ComponentId::Pcdu, tc_id, &response) { + match pack_ccsds_tm_packet_for_now(ComponentId::EpsPcdu, tc_id, &response) { Ok(packet) => { if let Err(e) = self.tm_tx.send(packet) { log::warn!("failed to send TM packet: {}", e); diff --git a/satrs-example/src/main.rs b/satrs-example/src/main.rs index 1fa85b5..0a1e157 100644 --- a/satrs-example/src/main.rs +++ b/satrs-example/src/main.rs @@ -206,7 +206,7 @@ fn main() { SerialSimInterfaceWrapper::Dummy(SerialInterfaceDummy::default()) }; let pcdu_mode_node = - ModeRequestHandlerMpscBounded::new(ComponentId::Pcdu as u32, pcdu_handler_mode_rx); + ModeRequestHandlerMpscBounded::new(ComponentId::EpsPcdu as u32, pcdu_handler_mode_rx); let mut pcdu_handler = PcduHandler::new( pcdu_mode_node, pcdu_handler_tc_rx,