Flip T3 to substrate-initiated actuator commands
This commit is contained in:
@@ -12,8 +12,8 @@ use std::time::Duration;
|
||||
use anyhow::Result;
|
||||
use simulator::client::SimulatorClient;
|
||||
use substrate::config::QuicConfig;
|
||||
use substrate::transport::server::{accept_loop, bind_endpoint};
|
||||
use substrate::transport::{QuicMessage, SensorType, T1Sender, T2Sender, T3Sender};
|
||||
use substrate::transport::server::{accept_loop, bind_endpoint, new_connection_registry};
|
||||
use substrate::transport::{OutboundT3, QuicMessage, SensorType, T1Sender, T2Sender};
|
||||
use tokio::sync::mpsc;
|
||||
use uuid::Uuid;
|
||||
|
||||
@@ -30,6 +30,7 @@ fn loopback_config(cert: PathBuf, key: PathBuf) -> QuicConfig {
|
||||
t1_capacity: 1024,
|
||||
t2_capacity: 512,
|
||||
t3_capacity: 256,
|
||||
synthetic_t3_rate_hz: 0.0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,13 +47,17 @@ async fn t2_single_stream_preserves_order() -> Result<()> {
|
||||
|
||||
let (t1_tx, _t1_rx) = mpsc::channel(64);
|
||||
let (t2_tx, mut t2_rx) = mpsc::channel(64);
|
||||
let (t3_tx, _t3_rx) = mpsc::channel(64);
|
||||
let (t3_out_tx, t3_out_rx) = mpsc::channel::<OutboundT3>(64);
|
||||
let registry = new_connection_registry();
|
||||
|
||||
let server_task = tokio::spawn(accept_loop(
|
||||
endpoint,
|
||||
T1Sender::new(t1_tx),
|
||||
T2Sender::new(t2_tx),
|
||||
T3Sender::new(t3_tx),
|
||||
registry,
|
||||
t3_out_rx,
|
||||
t3_out_tx,
|
||||
0.0,
|
||||
));
|
||||
|
||||
let client = SimulatorClient::connect(server_addr, "localhost", &cert).await?;
|
||||
@@ -98,13 +103,17 @@ async fn t2_concurrent_streams_each_internally_ordered() -> Result<()> {
|
||||
|
||||
let (t1_tx, _t1_rx) = mpsc::channel(64);
|
||||
let (t2_tx, mut t2_rx) = mpsc::channel(256);
|
||||
let (t3_tx, _t3_rx) = mpsc::channel(64);
|
||||
let (t3_out_tx, t3_out_rx) = mpsc::channel::<OutboundT3>(64);
|
||||
let registry = new_connection_registry();
|
||||
|
||||
let server_task = tokio::spawn(accept_loop(
|
||||
endpoint,
|
||||
T1Sender::new(t1_tx),
|
||||
T2Sender::new(t2_tx),
|
||||
T3Sender::new(t3_tx),
|
||||
registry,
|
||||
t3_out_rx,
|
||||
t3_out_tx,
|
||||
0.0,
|
||||
));
|
||||
|
||||
let client = SimulatorClient::connect(server_addr, "localhost", &cert).await?;
|
||||
|
||||
Reference in New Issue
Block a user