move generic struct

This commit is contained in:
Robin Müller 2024-04-29 21:18:32 +02:00
parent c9e5b9ffdb
commit e47523a734
4 changed files with 10 additions and 11 deletions

View File

@ -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);
}

View File

@ -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,

View File

@ -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) -> VerificationReporter {
let verif_cfg = VerificationReporterCfg::new(apid, 1, 2, 8).unwrap();
// Every software component which needs to generate verification telemetry, gets a cloned

View File

@ -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 {