diff --git a/src/interface/can.rs b/src/interface/can.rs new file mode 100644 index 0000000..af12524 --- /dev/null +++ b/src/interface/can.rs @@ -0,0 +1 @@ +//! This is a preliminary implementation of the necessary infrastructure to enable communication over OPS-SAT's internal CAN Bus. diff --git a/src/interface/mod.rs b/src/interface/mod.rs index f7a6a76..cc4703d 100644 --- a/src/interface/mod.rs +++ b/src/interface/mod.rs @@ -1,2 +1,3 @@ +pub mod can; pub mod tcp; pub mod udp; diff --git a/src/interface/tcp.rs b/src/interface/tcp.rs index 99e3805..59a521b 100644 --- a/src/interface/tcp.rs +++ b/src/interface/tcp.rs @@ -13,7 +13,7 @@ use satrs::{ tmtc::{CcsdsDistributor, CcsdsError, ReceivesCcsdsTc, TmPacketSourceCore}, }; -use crate::ccsds::CcsdsReceiver; +use crate::tmtc::ccsds::CcsdsReceiver; #[derive(Default, Clone)] pub struct SyncTcpTmSource { diff --git a/src/main.rs b/src/main.rs index 236b245..b61904f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,13 +20,13 @@ use satrs::{ use crate::pus::test::create_test_service; use crate::pus::{PusReceiver, PusTcMpscRouter}; -use crate::tm_funnel::TmFunnelDynamic; +use crate::tmtc::tm_funnel::TmFunnelDynamic; use crate::tmtc::TcSourceTaskDynamic; use crate::{ - ccsds::CcsdsReceiver, interface::tcp::{SyncTcpTmSource, TcpTask}, interface::udp::{DynamicUdpTmHandler, UdpTmtcServer}, logger::setup_logger, + tmtc::ccsds::CcsdsReceiver, tmtc::PusTcSourceProviderDynamic, }; use crate::{ @@ -34,12 +34,10 @@ use crate::{ requests::GenericRequestRouter, }; -mod ccsds; mod interface; mod logger; mod pus; mod requests; -mod tm_funnel; mod tmtc; fn main() { diff --git a/src/ccsds.rs b/src/tmtc/ccsds.rs similarity index 100% rename from src/ccsds.rs rename to src/tmtc/ccsds.rs diff --git a/src/tmtc.rs b/src/tmtc/mod.rs similarity index 98% rename from src/tmtc.rs rename to src/tmtc/mod.rs index 85eb5e6..fc28a37 100644 --- a/src/tmtc.rs +++ b/src/tmtc/mod.rs @@ -10,6 +10,9 @@ use satrs::{ use std::sync::mpsc::{self, SendError, Sender, TryRecvError}; use thiserror::Error; +pub mod ccsds; +pub mod tm_funnel; + #[derive(Debug, Clone, PartialEq, Eq, Error)] pub enum MpscStoreAndSendError { #[error("Store error: {0}")] diff --git a/src/tm_funnel.rs b/src/tmtc/tm_funnel.rs similarity index 100% rename from src/tm_funnel.rs rename to src/tmtc/tm_funnel.rs