diff --git a/src/runtime/src/mgmt.rs b/src/runtime/src/mgmt.rs index 1ddd55b..a2687bc 100644 --- a/src/runtime/src/mgmt.rs +++ b/src/runtime/src/mgmt.rs @@ -13,7 +13,9 @@ use log::{self, debug, error, info, warn, LevelFilter}; use num_derive::FromPrimitive; use num_traits::FromPrimitive; -use crate::{proto_async::*, rtio_mgt::*}; +use crate::proto_async::*; +#[cfg(has_drtio)] +use crate::rtio_mgt::*; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Error { @@ -640,13 +642,13 @@ async fn handle_connection( cfg: Rc, _aux_mutex: &Rc>, _routing_table: &RoutingTable, - timer: GlobalTimer, + _timer: GlobalTimer, ) -> Result<()> { if !expect(&stream, b"ARTIQ management\n").await? { return Err(Error::UnexpectedPattern); } - let destination: u8 = read_i8(stream).await? as u8; + let _destination: u8 = read_i8(stream).await? as u8; stream.send_slice("e".as_bytes()).await?; loop { @@ -656,14 +658,14 @@ async fn handle_connection( } let msg: Request = FromPrimitive::from_i8(msg?).ok_or(Error::UnrecognizedPacket)?; match msg { - Request::GetLog => process!(stream, timer, _aux_mutex, _routing_table, destination, get_log), - Request::ClearLog => process!(stream, timer, _aux_mutex, _routing_table, destination, clear_log), + Request::GetLog => process!(stream, _timer, _aux_mutex, _routing_table, _destination, get_log), + Request::ClearLog => process!(stream, _timer, _aux_mutex, _routing_table, _destination, clear_log), Request::PullLog => process!( stream, - timer, + _timer, _aux_mutex, _routing_table, - destination, + _destination, pull_log, &pull_id ), @@ -671,10 +673,10 @@ async fn handle_connection( let lvl = read_log_level_filter(stream).await?; process!( stream, - timer, + _timer, _aux_mutex, _routing_table, - destination, + _destination, set_log_filter, lvl ) @@ -683,10 +685,10 @@ async fn handle_connection( let lvl = read_log_level_filter(stream).await?; process!( stream, - timer, + _timer, _aux_mutex, _routing_table, - destination, + _destination, set_uart_log_filter, lvl ) @@ -695,10 +697,10 @@ async fn handle_connection( let key = read_key(stream).await?; process!( stream, - timer, + _timer, _aux_mutex, _routing_table, - destination, + _destination, config_read, &cfg, &key @@ -715,10 +717,10 @@ async fn handle_connection( read_chunk(stream, &mut buffer).await?; process!( stream, - timer, + _timer, _aux_mutex, _routing_table, - destination, + _destination, config_write, &cfg, &key, @@ -729,17 +731,17 @@ async fn handle_connection( let key = read_key(stream).await?; process!( stream, - timer, + _timer, _aux_mutex, _routing_table, - destination, + _destination, config_remove, &cfg, &key ) } Request::Reboot => { - process!(stream, timer, _aux_mutex, _routing_table, destination, reboot) + process!(stream, _timer, _aux_mutex, _routing_table, _destination, reboot) } }?; }