From 0b0a929a11e96dee8cad1ec99a76c0785272a6fc Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 21 Dec 2022 20:02:29 +0100 Subject: [PATCH] impl ReceivesTc for TC UDP server --- satrs-core/src/hal/host/udp_server.rs | 8 ++++++++ satrs-example/src/main.rs | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/satrs-core/src/hal/host/udp_server.rs b/satrs-core/src/hal/host/udp_server.rs index 84a40b7..ce600d0 100644 --- a/satrs-core/src/hal/host/udp_server.rs +++ b/satrs-core/src/hal/host/udp_server.rs @@ -89,6 +89,14 @@ impl PartialEq for ReceiveResult { impl Eq for ReceiveResult {} +impl ReceivesTc for UdpTcServer { + type Error = E; + + fn pass_tc(&mut self, tc_raw: &[u8]) -> Result<(), Self::Error> { + self.tc_receiver.pass_tc(tc_raw) + } +} + impl UdpTcServer { pub fn new( addr: A, diff --git a/satrs-example/src/main.rs b/satrs-example/src/main.rs index fe7e88e..fddd1b1 100644 --- a/satrs-example/src/main.rs +++ b/satrs-example/src/main.rs @@ -44,8 +44,6 @@ struct UdpTmtcServer { tm_store: SharedPool, } -unsafe impl Send for UdpTmtcServer {} - #[derive(Clone)] struct EventTmSender { store_helper: TmStore,