pub struct Router<N, G, A, C, const MTU: usize = 1024, const OUT: usize = 2048> { /* private fields */ }Expand description
A SpacePacket router with per-direction output queues.
ISL directions (N/S/E/W) share link type N. The ground
link has an independent type G since it may use a
different physical layer. Both must implement Datalink
so the router can split them into read/write halves for
concurrent I/O.
The read() loop uses select_biased! to poll all 5
readers and all 5 writers concurrently, eliminating
head-of-line blocking and deadlock.
Implementations§
Trait Implementations§
Source§impl<N, G, A, C, const MTU: usize, const OUT: usize> NetworkRead for Router<N, G, A, C, MTU, OUT>
impl<N, G, A, C, const MTU: usize, const OUT: usize> NetworkRead for Router<N, G, A, C, MTU, OUT>
Source§impl<N, G, A, C, const MTU: usize, const OUT: usize> NetworkWrite for Router<N, G, A, C, MTU, OUT>
impl<N, G, A, C, const MTU: usize, const OUT: usize> NetworkWrite for Router<N, G, A, C, MTU, OUT>
Source§type Error = RouterError<<N as Datalink>::WriteError, <G as Datalink>::WriteError>
type Error = RouterError<<N as Datalink>::WriteError, <G as Datalink>::WriteError>
Error type for write operations.
Auto Trait Implementations§
impl<N, G, A, C, const MTU: usize, const OUT: usize> Freeze for Router<N, G, A, C, MTU, OUT>
impl<N, G, A, C, const MTU: usize, const OUT: usize> RefUnwindSafe for Router<N, G, A, C, MTU, OUT>
impl<N, G, A, C, const MTU: usize, const OUT: usize> Send for Router<N, G, A, C, MTU, OUT>
impl<N, G, A, C, const MTU: usize, const OUT: usize> Sync for Router<N, G, A, C, MTU, OUT>
impl<N, G, A, C, const MTU: usize, const OUT: usize> Unpin for Router<N, G, A, C, MTU, OUT>
impl<N, G, A, C, const MTU: usize, const OUT: usize> UnsafeUnpin for Router<N, G, A, C, MTU, OUT>
impl<N, G, A, C, const MTU: usize, const OUT: usize> UnwindSafe for Router<N, G, A, C, MTU, OUT>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more