forked from M-Labs/artiq-zynq
Compare commits
No commits in common. "5364e0fe6e6c7d1dc33815d259e0c25679c09ae7" and "844c083ee4c3eca10b81f2788a22a43af56459fe" have entirely different histories.
5364e0fe6e
...
844c083ee4
|
@ -13,9 +13,7 @@ use log::{self, debug, error, info, warn, LevelFilter};
|
|||
use num_derive::FromPrimitive;
|
||||
use num_traits::FromPrimitive;
|
||||
|
||||
use crate::proto_async::*;
|
||||
#[cfg(has_drtio)]
|
||||
use crate::rtio_mgt::*;
|
||||
use crate::{proto_async::*, rtio_mgt::*};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Error {
|
||||
|
@ -241,7 +239,7 @@ mod remote_coremgmt {
|
|||
)
|
||||
.await
|
||||
{
|
||||
Ok(Packet::CoreMgmtGetLogReply { last: _, length, data }) => {
|
||||
Ok(Packet::CoreMgmtGetLogReply { last, length, data }) => {
|
||||
write_chunk(stream, &data[..length as usize]).await?;
|
||||
}
|
||||
|
||||
|
@ -642,13 +640,13 @@ async fn handle_connection(
|
|||
cfg: Rc<Config>,
|
||||
_aux_mutex: &Rc<Mutex<bool>>,
|
||||
_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 {
|
||||
|
@ -658,14 +656,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
|
||||
),
|
||||
|
@ -673,10 +671,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
|
||||
)
|
||||
|
@ -685,10 +683,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
|
||||
)
|
||||
|
@ -697,10 +695,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
|
||||
|
@ -717,10 +715,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,
|
||||
|
@ -731,17 +729,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)
|
||||
}
|
||||
}?;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue