diff --git a/satrs-core/src/hal/host/mod.rs b/satrs-core/src/hal/host/mod.rs deleted file mode 100644 index 5e98061..0000000 --- a/satrs-core/src/hal/host/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -//! Helper modules intended to be used on hosts with a full [std] runtime -pub mod tcp_server; -mod tcp_with_cobs_server; -pub mod udp_server; diff --git a/satrs-core/src/hal/mod.rs b/satrs-core/src/hal/mod.rs index c422a72..b6ab984 100644 --- a/satrs-core/src/hal/mod.rs +++ b/satrs-core/src/hal/mod.rs @@ -1,4 +1,4 @@ //! # Hardware Abstraction Layer module #[cfg(feature = "std")] #[cfg_attr(doc_cfg, doc(cfg(feature = "std")))] -pub mod host; +pub mod std; diff --git a/satrs-core/src/hal/std/mod.rs b/satrs-core/src/hal/std/mod.rs new file mode 100644 index 0000000..7ac107b --- /dev/null +++ b/satrs-core/src/hal/std/mod.rs @@ -0,0 +1,5 @@ +//! Helper modules intended to be used on systems with a full [std] runtime. +pub mod tcp_server; +pub mod udp_server; + +mod tcp_with_cobs_server; diff --git a/satrs-core/src/hal/host/tcp_server.rs b/satrs-core/src/hal/std/tcp_server.rs similarity index 93% rename from satrs-core/src/hal/host/tcp_server.rs rename to satrs-core/src/hal/std/tcp_server.rs index 11818c5..1195dd1 100644 --- a/satrs-core/src/hal/host/tcp_server.rs +++ b/satrs-core/src/hal/std/tcp_server.rs @@ -1,3 +1,4 @@ +//! Generic TCP TMTC servers with different TMTC format flavours. use alloc::vec; use alloc::{boxed::Box, vec::Vec}; use std::net::SocketAddr; @@ -7,7 +8,7 @@ use crate::tmtc::{ReceivesTc, TmPacketSource}; use thiserror::Error; // Re-export the TMTC in COBS server. -pub use crate::hal::host::tcp_with_cobs_server::{ +pub use crate::hal::std::tcp_with_cobs_server::{ parse_buffer_for_cobs_encoded_packets, TcpTmtcInCobsServer, }; diff --git a/satrs-core/src/hal/host/tcp_spacepackets_server.rs b/satrs-core/src/hal/std/tcp_spacepackets_server.rs similarity index 100% rename from satrs-core/src/hal/host/tcp_spacepackets_server.rs rename to satrs-core/src/hal/std/tcp_spacepackets_server.rs diff --git a/satrs-core/src/hal/host/tcp_with_cobs_server.rs b/satrs-core/src/hal/std/tcp_with_cobs_server.rs similarity index 99% rename from satrs-core/src/hal/host/tcp_with_cobs_server.rs rename to satrs-core/src/hal/std/tcp_with_cobs_server.rs index b2d4720..c59367f 100644 --- a/satrs-core/src/hal/host/tcp_with_cobs_server.rs +++ b/satrs-core/src/hal/std/tcp_with_cobs_server.rs @@ -8,7 +8,7 @@ use std::io::Write; use std::net::ToSocketAddrs; use std::vec::Vec; -use crate::hal::host::tcp_server::TcpTmtcServerBase; +use crate::hal::std::tcp_server::TcpTmtcServerBase; use crate::tmtc::ReceivesTc; use crate::tmtc::TmPacketSource; diff --git a/satrs-core/src/hal/host/udp_server.rs b/satrs-core/src/hal/std/udp_server.rs similarity index 99% rename from satrs-core/src/hal/host/udp_server.rs rename to satrs-core/src/hal/std/udp_server.rs index 3459212..83ad6f2 100644 --- a/satrs-core/src/hal/host/udp_server.rs +++ b/satrs-core/src/hal/std/udp_server.rs @@ -1,4 +1,4 @@ -//! UDP server helper components +//! Generic UDP TC server. use crate::tmtc::{ReceivesTc, ReceivesTcCore}; use std::boxed::Box; use std::io::{Error, ErrorKind};