diff --git a/Cargo.lock b/Cargo.lock index bfbcfa3..18e967e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -776,7 +776,7 @@ checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "satrs" version = "0.2.0-rc.5" -source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=rework-params-a-bit#2cc7f03a05eecd7e3f9d33d73651c1ecc230aa6a" +source = "git+https://egit.irs.uni-stuttgart.de/rust/sat-rs.git?branch=main#c7a74a844ce7894a87d6765f0ada4a8b95ecc545" dependencies = [ "bus", "cobs", diff --git a/Cargo.toml b/Cargo.toml index adeb082..3f999f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ once_cell = "1.19" [dependencies.satrs] version = "0.2.0-rc.5" git = "https://egit.irs.uni-stuttgart.de/rust/sat-rs.git" -branch = "rework-params-a-bit" +branch = "main" features = ["test_util"] [dependencies.satrs-mib] diff --git a/src/interface/udp_server.rs b/src/interface/udp_server.rs index 9a6cfb8..858ce27 100644 --- a/src/interface/udp_server.rs +++ b/src/interface/udp_server.rs @@ -2,12 +2,11 @@ use std::net::{SocketAddr, UdpSocket}; use std::sync::mpsc; use log::{info, warn}; +use ops_sat_rs::HandlingStatus; use satrs::hal::std::udp_server::{ReceiveResult, UdpTcServer}; use satrs::queue::GenericSendError; use satrs::tmtc::PacketAsVec; -use crate::pus::HandlingStatus; - pub trait UdpTmHandler { fn send_tm_to_udp_client(&mut self, socket: &UdpSocket, recv_addr: &SocketAddr); } diff --git a/src/lib.rs b/src/lib.rs index 2b6f688..698da0b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,12 @@ use satrs::spacepackets::time::TimeWriter; pub mod config; +#[derive(Debug, PartialEq, Eq, Copy, Clone)] +pub enum HandlingStatus { + Empty, + HandledOne, +} + #[derive(Debug)] pub struct TimeStampHelper { stamper: CdsTime, diff --git a/src/pus/mod.rs b/src/pus/mod.rs index e34c565..a89570c 100644 --- a/src/pus/mod.rs +++ b/src/pus/mod.rs @@ -10,7 +10,7 @@ use crate::requests::GenericRequestRouter; use log::warn; use ops_sat_rs::config::components::PUS_ROUTING_SERVICE; use ops_sat_rs::config::{tmtc_err, CustomPusServiceId}; -use ops_sat_rs::TimeStampHelper; +use ops_sat_rs::{HandlingStatus, TimeStampHelper}; use satrs::pus::verification::{ self, FailParams, TcStateAccepted, TcStateStarted, VerificationReporter, VerificationReporterCfg, VerificationReportingProvider, VerificationToken, @@ -30,13 +30,6 @@ use satrs::ComponentId; use std::fmt::Debug; use std::sync::mpsc::{self, Sender}; -#[derive(Debug, PartialEq, Eq, Copy, Clone)] -#[allow(dead_code)] -pub enum HandlingStatus { - Empty, - HandledOne, -} - pub fn create_verification_reporter( owner_id: ComponentId, apid: Apid, diff --git a/src/tmtc/tc_source.rs b/src/tmtc/tc_source.rs index 02cf5d0..055628e 100644 --- a/src/tmtc/tc_source.rs +++ b/src/tmtc/tc_source.rs @@ -1,8 +1,9 @@ use std::sync::mpsc::{self, TryRecvError}; +use ops_sat_rs::HandlingStatus; use satrs::{pus::MpscTmAsVecSender, tmtc::PacketAsVec}; -use crate::pus::{HandlingStatus, PusTcDistributor}; +use crate::pus::PusTcDistributor; // TC source components where the heap is the backing memory of the received telecommands. pub struct TcSourceTaskDynamic {