move generic struct
This commit is contained in:
parent
c9e5b9ffdb
commit
e47523a734
@ -2,12 +2,11 @@ use std::net::{SocketAddr, UdpSocket};
|
|||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
|
|
||||||
use log::{info, warn};
|
use log::{info, warn};
|
||||||
|
use ops_sat_rs::HandlingStatus;
|
||||||
use satrs::hal::std::udp_server::{ReceiveResult, UdpTcServer};
|
use satrs::hal::std::udp_server::{ReceiveResult, UdpTcServer};
|
||||||
use satrs::queue::GenericSendError;
|
use satrs::queue::GenericSendError;
|
||||||
use satrs::tmtc::PacketAsVec;
|
use satrs::tmtc::PacketAsVec;
|
||||||
|
|
||||||
use crate::pus::HandlingStatus;
|
|
||||||
|
|
||||||
pub trait UdpTmHandler {
|
pub trait UdpTmHandler {
|
||||||
fn send_tm_to_udp_client(&mut self, socket: &UdpSocket, recv_addr: &SocketAddr);
|
fn send_tm_to_udp_client(&mut self, socket: &UdpSocket, recv_addr: &SocketAddr);
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,12 @@ use satrs::spacepackets::time::TimeWriter;
|
|||||||
|
|
||||||
pub mod config;
|
pub mod config;
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
|
||||||
|
pub enum HandlingStatus {
|
||||||
|
Empty,
|
||||||
|
HandledOne,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct TimeStampHelper {
|
pub struct TimeStampHelper {
|
||||||
stamper: CdsTime,
|
stamper: CdsTime,
|
||||||
|
@ -10,7 +10,7 @@ use crate::requests::GenericRequestRouter;
|
|||||||
use log::warn;
|
use log::warn;
|
||||||
use ops_sat_rs::config::components::PUS_ROUTING_SERVICE;
|
use ops_sat_rs::config::components::PUS_ROUTING_SERVICE;
|
||||||
use ops_sat_rs::config::{tmtc_err, CustomPusServiceId};
|
use ops_sat_rs::config::{tmtc_err, CustomPusServiceId};
|
||||||
use ops_sat_rs::TimeStampHelper;
|
use ops_sat_rs::{HandlingStatus, TimeStampHelper};
|
||||||
use satrs::pus::verification::{
|
use satrs::pus::verification::{
|
||||||
self, FailParams, TcStateAccepted, TcStateStarted, VerificationReporter,
|
self, FailParams, TcStateAccepted, TcStateStarted, VerificationReporter,
|
||||||
VerificationReporterCfg, VerificationReportingProvider, VerificationToken,
|
VerificationReporterCfg, VerificationReportingProvider, VerificationToken,
|
||||||
@ -30,13 +30,6 @@ use satrs::ComponentId;
|
|||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::sync::mpsc::{self, Sender};
|
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 {
|
pub fn create_verification_reporter(owner_id: ComponentId, apid: Apid) -> VerificationReporter {
|
||||||
let verif_cfg = VerificationReporterCfg::new(apid, 1, 2, 8).unwrap();
|
let verif_cfg = VerificationReporterCfg::new(apid, 1, 2, 8).unwrap();
|
||||||
// Every software component which needs to generate verification telemetry, gets a cloned
|
// Every software component which needs to generate verification telemetry, gets a cloned
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
use std::sync::mpsc::{self, TryRecvError};
|
use std::sync::mpsc::{self, TryRecvError};
|
||||||
|
|
||||||
|
use ops_sat_rs::HandlingStatus;
|
||||||
use satrs::{pus::MpscTmAsVecSender, tmtc::PacketAsVec};
|
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.
|
// TC source components where the heap is the backing memory of the received telecommands.
|
||||||
pub struct TcSourceTaskDynamic {
|
pub struct TcSourceTaskDynamic {
|
||||||
|
Loading…
Reference in New Issue
Block a user