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 04bb136..c78b3e7 100644 --- a/src/interface/tcp.rs +++ b/src/interface/tcp.rs @@ -11,7 +11,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/interface/udp.rs b/src/interface/udp.rs index 5c45e9e..65193a9 100644 --- a/src/interface/udp.rs +++ b/src/interface/udp.rs @@ -82,6 +82,7 @@ mod tests { sync::{Arc, Mutex}, }; + use ops_sat_rs::config::{components, OBSW_SERVER_ADDR}; use satrs::{ spacepackets::{ ecss::{tc::PusTcCreator, WritablePusPacket}, @@ -89,7 +90,6 @@ mod tests { }, tmtc::ReceivesTcCore, }; - use ops_sat_rs::config::{components, OBSW_SERVER_ADDR}; use super::*; diff --git a/src/main.rs b/src/main.rs index 2db5ca5..4bbcd4d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,22 +18,20 @@ use satrs::{ use crate::pus::stack::PusStack; use crate::pus::test::create_test_service_dynamic; 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, }; -mod ccsds; mod interface; mod logger; mod pus; mod requests; -mod tm_funnel; mod tmtc; #[allow(dead_code)] 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