diff --git a/a653rs-router/src/ports.rs b/a653rs-router/src/ports.rs index 2c4b757..c4685ff 100644 --- a/a653rs-router/src/ports.rs +++ b/a653rs-router/src/ports.rs @@ -6,14 +6,6 @@ use crate::{ router::{RouterInput, RouterOutput}, }; -#[derive(Debug)] -pub(crate) enum Port { - SamplingIn(SamplingPortDestination), - SamplingOut(SamplingPortSource), - QueuingIn(QueuingPortReceiver), - QueuingOut(QueuingPortSender), -} - impl RouterInput for SamplingPortDestination { fn receive<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], PortError> { router_bench!(begin_apex_receive, self.id() as u16); diff --git a/a653rs-router/src/router.rs b/a653rs-router/src/router.rs index 52370c9..62c3960 100644 --- a/a653rs-router/src/router.rs +++ b/a653rs-router/src/router.rs @@ -6,7 +6,7 @@ use crate::{ }, error::Error, network::{CreateNetworkInterface, NetworkInterface, PayloadSize, PlatformNetworkInterface}, - ports::{Port, PortError}, + ports::PortError, prelude::InterfaceName, scheduler::{DeadlineRrScheduler, ScheduleError, Scheduler, TimeSource}, types::VirtualLinkId, @@ -14,11 +14,22 @@ use crate::{ use a653rs::{ bindings::{ApexQueuingPortP4, ApexSamplingPortP4}, - prelude::StartContext, + prelude::{ + QueuingPortReceiver, QueuingPortSender, SamplingPortDestination, SamplingPortSource, + StartContext, + }, }; use core::{fmt::Debug, marker::PhantomData, ops::Deref, str::FromStr, time::Duration}; use heapless::{FnvIndexMap, LinearMap, Vec}; +#[derive(Debug)] +enum Port { + SamplingIn(SamplingPortDestination), + SamplingOut(SamplingPortSource), + QueuingIn(QueuingPortReceiver), + QueuingOut(QueuingPortSender), +} + /// Router resources #[derive(Debug)] pub struct RouterResources